diff --git a/README.md b/README.md index cd5fdd91..d6fd30ab 100644 --- a/README.md +++ b/README.md @@ -87,13 +87,21 @@ Client side highlighting does not require pygments to be installed. This will us ### Disqus support -To use this feature, uncomment and fill out the `disqusShortname` parameter in `config.toml`. +To use this feature add your disqus shortname to the hugo.toml file like this: + +```toml +[services] + [services.disqus] + shortname = '' +``` + +For further reference see [hugo config](https://gohugo.io/methods/site/config/) ### Staticman support -Add *Staticman* configuration section in `config.toml` or `config.yaml` +Add *Staticman* configuration section in `hugo.toml` or `hugo.yaml` -Sample `config.toml` configuration +Sample `hugo.toml` configuration ``` [Params.staticman] @@ -134,26 +142,26 @@ comments: secret: "hsGjWtWHR4HK4pT7cUsWTArJdZDxxE2pkdg/ArwCguqYQrhuubjj3RS9C5qa8xu4cx/Y9EwHwAMEeXPCZbLR9eW1K9LshissvNcYFfC/b8KKb4deH4V1+oqJEk/JcoK6jp6Rr2nZV4rjDP9M7nunC3WR5UGwMIYb8kKhur9pAic=" ``` -If you *don't* have the section `[Params.staticman]` in `config.toml`, you *won't* need the section `reCaptcha` in `staticman.yml` +If you *don't* have the section `[Params.staticman]` in `hugo.toml`, you *won't* need the section `reCaptcha` in `staticman.yml` ### Site Disclaimer If you need to put a Disclaimer on your website (e.g. "My views are my own and not my employer's"), you can do so via the following: -* Uncomment and edit the `disclaimerText` parameter in `config.toml`. +* Uncomment and edit the `disclaimerText` parameter in `hugo.toml`. * If you need to adjust the disclaimer's styling, modify the declarations within the `footer div.disclaimer` selector in `static/css/main.css`. > The code for the disclaimer text is in `layouts/partials/footer.html`. Moving this code block to another partial file (or relocating it within `footer.html`) will require changes to the css selector in `main.css` as well. ### Google Analytics -To add Google Analytics, simply sign up to [Google Analytics](https://www.google.com/analytics/) to obtain your Google Tracking ID, and add this tracking ID to the `googleAnalytics` parameter in `config.toml`. +To add Google Analytics, simply sign up to [Google Analytics](https://www.google.com/analytics/) to obtain your Google Tracking ID, and add this tracking ID to the `googleAnalytics` parameter in `hugo.toml`. Note that the Google Analytics tracking code will only be inserted into the page when the site isn't served on Hugo's built-in server, to prevent tracking from local testing environments. ### Commit SHA on the footer -If the source of your site is in a Git repo, the SHA corresponding to the commit the site is built from can be shown on the footer. To do so, two site parameters `commit` has to be defined in the config file `config.toml`: +If the source of your site is in a Git repo, the SHA corresponding to the commit the site is built from can be shown on the footer. To do so, two site parameters `commit` has to be defined in the config file `hugo.toml`: ``` enableGitInfo = true @@ -166,7 +174,7 @@ See at [vincenttam/vincenttam.gitlab.io](https://gitlab.com/vincenttam/vincentta ### Multilingual To allow Beautiful Hugo to go multilingual, you need to define the languages -you want to use inside the `languages` parameter on `config.toml` file, also +you want to use inside the `languages` parameter on `hugo.toml` file, also redefining the content dir for each one. Check the `i18n/` folder to see all languages available. @@ -194,7 +202,7 @@ content/ content/ content/ With default settings, visiting to a website using Beautifulhugo connects also to remote services like google fonts or jsdelivr to embed fonts, js and other assets. -To avoid this, set the following param in config.toml: +To avoid this, set the following param in hugo.toml: ``` [Params] @@ -229,7 +237,7 @@ This is column 2. ### Social Media Icons -In order to show social media icons in the footer, add a section like this to your `config.yaml`. You can see the full list of supported social media sites in `data/beautifulhugo/social.toml`. +In order to show social media icons in the footer, add a section like this to your `hugo.yaml` or `hugo.toml`. You can see the full list of supported social media sites in `data/beautifulhugo/social.toml`. ```yaml author: @@ -238,6 +246,17 @@ author: github: halogenica/beautifulhugo twitter: username discord: 96VAXXvjCB + ... +``` + +```toml +[Author] + name = "Author Name" + website = "https://example.com" + github = "halogenica/beautifulhugo" + twitter = "username" + discord = "96VAXXvjCB" + ... ``` ## About diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a67d0c4b..44f42463 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,3 +1,11 @@ +{{ if le hugo.Version "0.120.0" }} + {{ errorf "Please use Hugo version 0.120.0 or higher!" }} +{{ end }} + +{{ if not (eq .Site.DisqusShortname "") }} + {{ errorf "Your use of disqusShortname is deprecated by Hugo; Please reference the README.md for further instructions. This error message will be removed in the future because we are also using .Site.DisqusShortname for checking this." }} +{{ end }} +
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7e4c43d1..27334c3b 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -76,7 +76,7 @@