+++ title = "Configuring Apollo" date = "2024-07-09"
[taxonomies] tags=["documentation"]
[extra] repo_view = true comment = true +++
Enables or disables the search functionality for your blog.
- Type: Boolean
- Default: false
- Usage:
build_search_index = false
When enabled, a search index will be generated for your blog, allowing visitors to search for specific content. Additionally, a search button will be displayed in the navigation bar.
Configure the search like this:
build_search_index = true
[search]
include_title = true
include_description = true
include_path = true
include_content = true
index_format = "elasticlunr_json"
Sets the color theme for your blog.
- Type: String
- Options: "light", "dark", "auto", "toggle"
- Default: "toggle"
- Usage:
theme = "toggle"
The "toggle" option allows users to switch between light and dark modes, while "auto" typically follows the user's system preferences.
Defines the navigation menu items for your blog.
- Type: Array of objects
- Default: []
- Usage:
menu = [ { name = "/posts", url = "/posts", weight = 1 }, { name = "/projects", url = "/projects", weight = 2 }, { name = "/about", url = "/about", weight = 3 }, { name = "/tags", url = "/tags", weight = 4 }, ]
Defines the site logo image file.
- Type: String
- Usage:
logo = "site_logo.svg"
Defines the social media links.
- Type: Array of objects
- Default: []
- Usage:
socials = [ { name = "twitter", url = "https://twitter.com/not_matthias", icon = "twitter" }, { name = "github", url = "https://github.com/not-matthias/", icon = "github" }, ]
Enables or disables the table of contents for posts.
- Type: Boolean
- Default: true
- Usage:
toc = true
When enabled, a table of contents will be generated for posts, making it easier for readers to navigate through longer articles.
Note: This feature adds additional JavaScript to your site.
Determines whether to use a Content Delivery Network (CDN) for assets.
- Type: Boolean
- Default: false
- Usage:
use_cdn = false
When set to true, the theme will attempt to load assets from a CDN, which can improve loading times for visitors from different geographic locations.
Specifies the path to the favicon image for your blog.
- Type: String
- Default: "/icon/favicon.png"
- Usage:
favicon = "/icon/favicon.png"
This sets the small icon that appears in the browser tab for your website.
Enables enhanced styling for code blocks.
- Type: Boolean
- Default: true
- Usage:
fancy_code = true
This option adds the language label and a copy button.
Allows for the creation of togglable note sections in your content.
- Type: Boolean
- Default: true
- Usage:
dynamic_note = true
When enabled, you can create expandable/collapsible note sections in your blog posts.
You can add anchor links by adding the following to your _index.md
:
insert_anchor_links = "heading"
Enable or disable analytics tracking:
[extra.analytics]
enabled = false
After enabling analytics, configure GoatCounter or Umami.
Configure GoatCounter analytics:
[extra.analytics.goatcounter]
user = "your_user" # Your GoatCounter username
host = "example.com" # Optional: Custom host
Configure Umami analytics:
[extra.analytics.umami]
website_id = "43929cd1-1e83...." # Your Umami website ID
host_url = "https://stats.mywebsite.com" # Optional: Custom host URL
Do you want to link to the source code of your blog post? You can turn on the repo_view
inside the [extra]
section of your blog post.
[extra]
repo_view = true
repo_url = "https://github.com/not-matthias/apollo/tree/main/content" # Alternatively add the repo here
The repo_url
can be set in the [extra]
section or in your config.toml
.
Enables or disables the comment system for posts.
- Type: Boolean
- Default: false
- Usage:
comment = false
After making comment = true
in [extra]
section of you post, save your script from Giscus to templates/_giscus_script.html
.
When enabled, this allows readers to leave comments on your blog posts. This feature has to be set for each individual post and is not supported at higher levels.
Example configuration in content/posts/configuration.md:
+++
title = "Configuring Apollo"
[extra]
comment = true
+++
Comments via utterances can be configured in template/_giscus_script.html
like this:
<script src="https://utteranc.es/client.js"
repo="YOUR_NAME/YOUR_REPO"
issue-term="pathname"
theme="github-light"
crossorigin="anonymous"
async>
</script>