Commit 8405d19e authored by Greenscreener's avatar Greenscreener

Added baseURL to config.

parent 5f0d2357
Pipeline #100972965 passed with stage
in 1 minute and 18 seconds
{
"baseURL":"/",
"baseURL":"https://patek.cz/",
"languageCode":"cs-cz",
"title": "Pátek",
"theme":"patek",
......
  • Why do we want to do this? I find it much better (e.g. for local testing) to keep the baseURL as /

    1. Hugo is clever enough, that when using hugo serve, baseURL is automatically set according to the address it is hosted on. If needed, it can be overwritten using a command line parameter.
    2. We use .Permalink, which should include the entire href. If we want to not have the domain part in a link somewhere, we should use .RelPermalink, as that is the "proper" method of getting a link relative to "/", not to the domain.

    It's the same reason, why we have "title" set in the config, instead of having it hardcoded in the <title>. I need to know the domain during generation for the og stuff.

Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment