Statically generated using Zola.
git clone git@github.com:fribyte-code/fribyte.no.git
.zola serve
to run Zola locally in development mode.zola build
to build the finished website.Use zola --help
for more useful commands.
main
it deploys to Pengebingen via GitHub Actions.config.toml
.is_featured = true
in a news-post's frontmatter to make it featured on
the frontpage.We practice feature-branches and use PRs frequently for all our features,
bugfixes and doc changes. main
-branch is protected and should not be pushed
directly to.
Examples:
feature/<feature-name>
bugfix/<fix-name>
docs/<what-has-been-added/updated>
We have a few shortcodes available to use in Markdown, [check them out][shortcodes]:
buttons
illustration
alerts
These are simple HTML-snippets that we can provide parameters:
{{ buttons(kontakt=true) }}
Create new shortcodes if there is a component and/or HTML-snippets that can be used multiple places.
In order to publish news we need to create a new markdown-file under
content/nyheter
. For example: content/nyheter/2022-01-01-godt-nyttar.md
.
If this news were to contain pictures/images, it's neccessary to create a folder
instead of a single markdown-file. Then it would look something like this:
content/nyheter/2022-01-01-godt-nyttar/index.md
. Now it's index.md
that
contains the article, and you can add the images in the same folder.
We use these for tags/categories. You can defined new taxonomies in
config.toml
.
An example on how you can use them on pages and sections:
[taxonomies]
categories = ["Nyheter"]
# for multiple ["Nyheter", "Driftsmelding"]
The default language is Norwegian, but we are also working to add support to the
site in English. To translate a page to english, create a copy of the .md file
you want to translate, and change the extension from .md
to .en.md.
Then,
translate the content in the new file to english.
To translate buttons, add the argument english=true
, like so:
{{ buttons(tjenester=true}}
-> {{ buttons(english=true, tjenester=true}}
Translation not currently supported for:
[zola_install]: https://www.getzola.org/documentation/getting-started/installation/
[shortcodes]: https://github.com/fribyte-code/fribyte.no/tree/main/templates/shortcodes