Test: `adfads
Wikilinks
E.g. [[<page ID> | <optional link text>]]
.
Wikilinks cannot be used to refer to pages in other website sections.
Wikitooltips
E.g. [[@<tooltip ID>]]
or [[@<display text> | <tooltip text>]]
.
Invalid tooltip IDs will be rendered as regular text (without the ‘@’).
Defining tooltips
Tooltips are defined in config.toml
as a site-wide param. Each key is an ID, and each value is a 2-element array, where the first element is the display text, and the second is the tooltip text.
Tooltip rendering and javascript
Tooltips are identified in the partial content-with-wikilinks
, then created in the partial make-tooltip
.
Tooltip javascript is built in content-with-wikilinks
, but only if at least one tooltip is found.
Adding content Sections
New sections need a folder with an _index.md
file to show in navigation menus. _index.md
has two important front matter variables:
title
: visible name in nav menu.weight
: if provided, will be used to sort pages instead of title.
Adding search
Create search.md
with title: Search
in the first level of the relevant section. It will be automatically unlisted via cascaded params in config.toml
.
Adding unlisted pages
Create a 2nd level subdirectory /*/unlisted/
(no _index.md
required). Anything placed in here will be automatically unlisted via cascaded params in config.toml
.
Expanding JSON search index
Everything in a page’s info
Param will be included as relevant content for searches. Additionally, if a page X is referenced in the info
Param of other pages, the titles of those other pages will be treated as relevant to X during searches.
To expand search further, edit either or both of layouts/search/single.searchindex.json
and layouts/partials/util/search-info.html
.
Then make any necessary changes in static/js/search.js
; in particular, see the code under idx = lunr(function ()...
.
Hugo dependencies
To add a dependency, first import it in config.toml
:
1[module]
2 [[module.imports]]
3 path = "github.com/ORawle/floating-ui"
Then specific files/subdirectories can be mounted to the hugo directories, and used as if they were a part of the project:
1[[module.imports.mounts]]
2 source = "packages/dom/dist/floating-ui.dom.browser.mjs"
3 target = "assets/@floating-ui/dom/floating-ui.dom.browser.mjs"
4[[module.imports.mounts]]
5 source = "packages/core/dist/floating-ui.core.browser.mjs"
6 target = "assets/@floating-ui/core/floating-ui.core.browser.mjs"
For some relevant commands, see Git and Hugo.
Dependency branches
If the module import doesn’t retrieve the desired branch, replace the dependency version in go.mod
with the desired branch name:
1require (
2 github.com/FortAwesome/Font-Awesome <branch name, e.g. master> // indirect
3)