mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 15:57:57 +00:00
1.6 KiB
1.6 KiB
+++ categories = ["explanation", "howto"] description = "Adding Custom Output Formats" title = "Output Formats" weight = 6 +++
In addition to the output formats coming with the theme, you can create your own output formats.
Starting from Scratch
If you want to add a new output format called myformat
that outputs HTML and you want to build everything yourself without using the theme's components:
- Create a file
layouts/_default/baseof.myformat.html
- Implement all the necessary code in this file
Using the Theme's Structure
If you want to keep the general framework and only change specific parts, you can override these files:
layouts/_default/views/article.html
: Controls how a page's content and title are displayedlayouts/_default/views/body.html
: Determines the page body structurelayouts/_default/views/menu.html
: Defines the sidebar menu layoutlayouts/_default/views/storeOutputFormat.html
: Stores the output format name for use in the framework
For a real-world example, check out the print
output format implementations