fribyte-code / fribyte.no

Official website for friByte 🌐
https://fribyte.no
GNU General Public License v3.0
2 stars 8 forks source link
lightweight website zola

friByte.no

Statically generated using Zola.

Getting started

  1. Install [Zola][zola_install]
  2. git clone git@github.com:fribyte-code/fribyte.no.git.
  3. Run zola serve to run Zola locally in development mode.
  4. Run zola build to build the finished website.

Use zola --help for more useful commands.

Deployment

Things to know

Git-branches

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:

Shortcodes

We have a few shortcodes available to use in Markdown, [check them out][shortcodes]:

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.

News

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.

Taxonomies

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"]

Translation

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