# _ _ _ _
# | | | (_)_ __ ___ __| | ___
# | |_| | | '_ \ / _ \ / _` |/ _ \
# | _ | | | | | (_) | (_| | __/
# |_| |_|_|_| |_|\___/ \__,_|\___|
#
Hinode is a template for the Hugo static site generator, written by Mark Dumay. It’s primary emphasis is on providing a theme that allows for versioned documentation of Open Source software projects, although it can easily be adapted to suit any desired purpose, it excels at providing a layout for documentation based websites.
As has been pointed out numerous times in this website, a project is only as good as the developer who created it. Hugo stands out in excellence due to it’s creator Bjorn Erik Pedersen, in the same manner, Hinode stands out due to it’s creator Mark Dumay. Working with him is a pleasure, and his professionalism is superior.
There are three primary section layouts for the hinode template: Lists, Cards, and Navs.
The most basic sectional layout is the list layout, as it provides no additional configuration options except for the basic configuration options available to all sectional layouts. Do not get this confused with being the default layout, which is the card layout. The card layout also provides the most amount of configuration options.
So to recap, “Lists” are the most basic, but “cards” are the default.
Below we list the configuration fields for those sectional layouts.
T.B.D.
List sections only contain the basic set of configuration options, which the other two available layouts build on top of. Because fundamentally speaking all sectional layouts are lists. Of course with the rest of Hinode’s configuration, the configuration of these layouts is performed in yaml.
When inquired as to what the actual difference is between a reference shortcode and a link shortcode, the author of Hinode, Mark Dumay, gave this answer.
Let me clarify a few concepts first:
ref and relref are shortcodes provided by Hugo. They resolve to the path of a content page.
link is a custom shortcode maintained by the Hinode theme. It resolves to both content pages and site assets.
Hinode implements a render hook to handle native markdown links since release v0.26.0.
Hugo treats content pages differently than (static) site assets and page resources. In general, you cannot use relref and ref to reference a static asset such as an pdf file. Hinode tries to simplify (unify) the handling of content pages and site assets. You can use standard Markdown links to reference both a content page and a site asset.
Note
Both relref and ref are not really necessary when using the Hinode theme. The documentation only mentions them for backwards compatibility.
Consider the following example. I have a static asset available on the path ./static/img/logo512x512.png. I want the browser to open this file when I click on it. Hugo publishes static assets without the static base folder. You can use the following markdown link to reference this static file and let the browser decide what to do with it. Most browsers will simply display the image file.
`[Logo](/img/logo512x512.png)`
I hope this clarifies the concept of links. Feel free to share your experiences and let us know how we can improve the documentation further.
Below is the process followed for creating modules for the Hinode theme.
git branch develop
gethinode/mod-template
and
replacing it with {$OWNER}/mod-{$YOUR_MODULE_NAME}
. Ignoring entries in package-lock.json, as npm will
handle this for you automatically.mod-template
and replacing it with
mod-{$Your_MODULE}
.README.md
, package.json
, and .gitignore
.git add -a
, and use npx git-cz
to generate a conventional commit message.
Then push everything in the develop branch to your remote repository. git push --set-upstream origin
develop
.npm install
--save-dev {$NPM_Package}
or npm install -D {$NPM_Package}
or npm i -D {$NPM_PACKAGE}
to accomplish
this.postinstall
script in package.json
, copying required files from dist
folder of the NPM
Package to the dist
folder at the base of the repository. This folder does not have to exist, and will
be created. The cpy
package has been installed previously for this purpose. Facilitation of the --flat
flag is necessary in order to flatten the files in the destination directory. More information on the
particulars of this step can be found in the hinode module create guide.config.toml
file.
Take note, the folders layouts
, assets
, and static
are all previously assigned a mount point. This
is to prevent file mount conflicts, and ensure local folders are not replaced by mount points during use
of the module.hugo.toml
file in the examplesite
directory to mount the files located in the dist
folder
to their correct place in the website build tree.npm run mod:update
to install the hugo modules and check
for any needed updates.examplesite/layouts/_default
to include the required dependencies of our module.examplesite/content/_index.md
.npm run start
Be aware that your module might respond differently when used in a full production site, than it did in the example site.
If you attempt to load a resource solely through adding it to a shortcode template this will not work. You will need to include it as part of the site layout, through creation of a module layout file.