This is pretty minimal Hugo theme for an online cookbook, primarily
designed around converting MasterCook export format (MX2) to
TOML+Markdown. It shows off two new features added in 0.22: nested
sections and $.Site.GetPage "page"
support.
-
Copy
example/*
to yourcontent
directory and customize the contents. -
Use my MasterCook scripts to convert MX2 recipe files to Hugo content files, and store them in one or more content sections. Or use your own Markdown formatting.
-
Add an
_index.md
file to the section to add a custom title to the Collections menu and a description to the section index page. Nested sections will not be detected without this. -
(optional) To add download links in
_index.md
, use themx2
shortcode (see example incontent/mcarchive/cheesecakes
), and name the filestatic/mx2/sectionname.mx2
. -
(optional) To add emoji-based star ratings, add lines to the
[stars]
section ofdata/meta.toml
, in the form"/rel/perma/link/" = N
. The default is 0, and there's no maximum. A negative rating prints a single red "X". -
(optional) To add featured recipes on the home page, add lines to the
featured
array indata/meta.toml
. -
(optional) To add a navbar link for whatever search engine you use, uncomment the
search=
line indata/meta.toml
.
- The
xml2md
script isn't in the repo yet; still cleaning up the output. Any format will work, but the sidebar formatting assumes the use of MC-compatible parameter names in the front matter. See the provided examples.