File System
Your knowledge sharing hub renders content from markdown files located in the topic directory of your content repository. There are a few conventions to keep in mind, which we will discuss on this page.
Files
TTT will automatically create routes for your content files to be accessed on your site.
| File | Route |
|---|---|
| topic/index.md | /topic |
| topic/new.md | /topic/new |
index.md is the default content for each folder.Front matter
Markdown files in your content directory can have front matter to provide structured data for the content site.
---
title: File System
description: How to add content to TTT
navigation:
icon: i-lucide-folder-tree
---
## Hello TTT
This is my typical lorem ipsum text
Folders
You can use folders to further organize your content files.
| File | Route |
|---|---|
| topic/vue/index.md | /topic/vue |
| topic/vue/composables.md | /topic/vue/composables |
topic/vue.md and topic/vue/index.md are the same route-wise.Navigation
Inside each folder you can add a special .navigation.yml file to customize how each directory shows on the rendered site's navigation.
title: Usage
navigation:
icon: i-lucide-folder-tree
Ordering
You can manually specify the order you want your files to be displayed on the side navigation by adding a prefix to the filename. Otherwise content will be displayed alphabetically. This works for both files and folders.
| File | Route | Displayed |
|---|---|---|
| topic/1.zebra.md | /topic/zebra | First |
| topic/antelope.md | /topic/antelope | Second |
The format for the prefix is X., where X is a number to sort by in ascending order. If you have a lot of files be sure to use two or three numbers in the prefix such as XX. or XXX..
topic/
1.feed/
1.forward.md
2.back.md
2.presentations/
01.explain.md
02.train.md
10.demo.md
index.md
. character. Using any other separator will not work.Ignoring
If you want to ignore a content file from navigation, search and lists you can add a . to the start of the filename. If you add this prefix to a folder all nested files will also be ignored.
topic/
feed/
.back.md
forward.md <-- Only this file will be published
.presentations/
explain.md
demo.md
train.md
index.md
Excluding
If you want to exlude a content file from navigation but include it on search and lists you can add a _ to the start of the filename. If you add this prefix to a folder all nested files will also be excluded from navigation.
topic/
feed/
_back.md
forward.md <-- Only this file will be displayed in navigation
_presentations/
explain.md
demo.md
train.md
index.md

