-
Notifications
You must be signed in to change notification settings - Fork 8
Authoring Content
Pages are authored in the routes
folder as .svx
or MDSVex files, a superset of Markdown that enables mixing js
, svelte
components and frontmatter. You can also write .svelte
files without leveraging MDSVEX, though it makes your life harder as the frontmatter is quite important.
The location of the files in the hierarchy of the repository are important, when the website is constructed depending on where a file is located generates the route or URL that will request that page. For example, routes/test/index.svx
will become https://learn.flucoma.org/test
. A file named index will always resolve to the parent folder, whereas files with other names become their own routes. routes/sound/speakers.svx
will become https://learn.flucoma.org/sound/speakers
which could have an equivalent page at routes/sound/speakers/index.svx
.
Authoring content starts by making an .svx
file in the intended location. If you want to write an overview, it will go in overviews. If you want to make a reference, make a new file in reference.
Writing accurate and helpful frontmatter is the first part of your document. For example, take the fronmatter from the KDTree reference.
---
title: KDTree
blurb: K-Dimensional tree for searching data
tags:
- data
- querying
flair: reference
category: Analyse Data
---
The title
field is the title of your document and will **automatically be rendered as a
blurb
is also rendered just below the main title. Providing accurate and meaningful tags
aids the gloabl search of learn so using words that will help people get to where they want to go is critical. Again, snooping around other relevant files will help you decide what a good tag might be. The flair
determines what kind of document it is. See flairs for a list of options. category
is specific to references and determines the grouping of URLs on the reference
index.
Once you've added frontmatter, You can start writing in github flavoured markdown. If you need to weave in a svelte
component or some js
this needs to be enclosed in a <script></script>
tag just after the frontmatter. For an example of that, see the KMeans reference
Your options for flairs are:
- article
- reference
- event
- podcast
- tutorial
All components, widgets and js
code should be isolated to the lib
directory unless you can very succintly inline that code into the .svx
document.