Adding Extra Content
In Try-O-Theme, you can add extra content to your pages using Markdown inside index.md files. This guide will show you how to structure your content and use custom fields.
1. Understanding How Pages Work in Try-O-Theme
All the page content in Try-O-Theme is defined inside the src/contents/ directory.
Common pages include:
- Homepage → src/contents/home/index.md
- Search Page → src/contents/search/index.md
- Tags List → src/contents/lists/tag/index.md
- Authors List → src/contents/lists/author/index.md
- About Page → src/contents/about/index.md
- Custom Pages (like “About”) → src/contents/custom-page/index.md
Each of these pages supports custom content and metadata stored in the index.md file.
2. Adding Custom Data to Pages
To add extra content, open the index.md file of the page you want to modify and update the YAML frontmatter at the top.
Example: Adding Custom Data to index.md
---
title: "About Us"
description: "Learn more about our team and mission."
custom_message: "We value transparency and innovation."
featured: true
contact_email: "contact@example.com"
---
How to Use Custom Fields in Frontmatter
Any custom fields added to the frontmatter can be accessed dynamically in the site.
For example, if you add a scontact_emails field, you can reference it within your Markdown content like this:
# Contact Us
For inquiries, reach us at [{{ contact_email }}](mailto:{{ contact_email }})
If the contact_emails field is set in the frontmatter, the Markdown content will be replaced dynamically.
This allows you to store structured data and use it within your Markdown pages.
3. Adding Content to Pages
All extra content should be added inside the index.md file using Markdown.
Below the frontmatter, you can write Markdown content, which will be automatically rendered on the page.
Example: Markdown Content in index.md
# Welcome to Our Site
We are passionate about creating high-quality static sites using **Try-O-Theme**.
## Our Values
- 🚀 Innovation
- 🔍 Transparency
- 💡 Knowledge Sharing
## Contact Us
📧 Email: contact@example.com
📍 Address: 123 Example Street, City, Country
All this Markdown content gets inserted into the page dynamically!
4. Best Practices for Adding Extra Content
- Use frontmatter for structured data (title, description, messages).
- Use Markdown for flexible content (text, lists, images, links).
- Keep content clean & organized for better readability.
Customizing pages in Try-O-Theme is easy with index.md files.
By using YML metadata and Markdown for content, you can enhance any page dynamically!