Skip to content

Commit

Permalink
breakup & move config files
Browse files Browse the repository at this point in the history
  • Loading branch information
onweru committed Mar 22, 2021
1 parent 1ef6657 commit 5c5e57c
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 135 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,16 @@ Going by the above 👆🏻 reason, we recommend adding custom CSS and JS via th
│   │   └── sass
│   │   ├── _custom.sass
│   │   └── _override.sass
├── config.toml
│   ├── configTaxo.toml
│   ├── config
│   │   └── _default
│   │   ├── config.toml
│   │   ├── configTaxo.toml
│   │   ├── languages.toml
│   │   ├── markup.toml
│   │   ├── menus
│   │   │   ├── menu.en.toml
│   │   │   └── menu.pt.toml
│   │   └── params.toml
│   ├── content
│   │   ├── _index.md
```
Expand Down Expand Up @@ -534,7 +542,7 @@ Things to consider in multilingual:
Check for missing translations using `hugo server --i18n-warnings`
* **taxonomy** names (tags, categories, etc...) are translated in [i18n](./i18n/) as well (translate the key)
* **menus** are translated manually in the config files [config/_default/menus/menu.xx.toml](./exampleSite/config/_default/menus/)
* **menu's languages list** are semi-hardcoded. You may chose another text for the menu entry with [languageMenuName](./exampleSite/config.toml). Please, do better and create a PR for that.
* **menu's languages list** are semi-hardcoded. You may chose another text for the menu entry with [languageMenuName](./exampleSite/config/config.toml). Please, do better and create a PR for that.
* **content** must be translated individually. Read the [official documentation](https://gohugo.io/content-management/multilingual/#translate-your-content) for information on how to do it.

**note:** if you do NOT want any translations (thus removing the translations menu entry), then you must not have any translations.
Expand Down Expand Up @@ -564,7 +572,7 @@ layouts/partials/hooks/body-end.html

### Comments

Clarity supports Hugo built-in Disqus partial. You can enable Disqus simply by setting [`disqusShortname`](https://gohugo.io/templates/internal/#configure-disqus) in your [configuration file](https://github.com/chipzoller/hugo-clarity/blob/88f6cf4ac37c12990983b92d19842524555c23d3/exampleSite/config.toml#L11).
Clarity supports Hugo built-in Disqus partial. You can enable Disqus simply by setting [`disqusShortname`](https://gohugo.io/templates/internal/#configure-disqus) in your [configuration file](https://github.com/chipzoller/hugo-clarity/blob/88f6cf4ac37c12990983b92d19842524555c23d3/exampleSite/config/config.toml#L11).

You can also override [layouts/partials/comments.html](https://github.com/chipzoller/hugo-clarity/blob/master/layouts/partials/comments.html) to take advante of [disqus comments Alternatives](https://gohugo.io/content-management/comments/#comments-alternatives) for details.

Expand Down
130 changes: 0 additions & 130 deletions exampleSite/config.toml

This file was deleted.

23 changes: 23 additions & 0 deletions exampleSite/config/_default/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# set `baseurl` to your root domain
# if you set it to "/" share icons won't work properly on production
baseurl = "https://example.com/" # Include trailing slash
title = "Clarity"
author = "Jane Doe"
copyright = "Copyright © 2008–2018, Steve Francia and the Hugo Authors; all rights reserved."
# canonifyurls = true
paginate = 10
theme = "hugo-clarity"

disqusShortname = ""

DefaultContentLanguage = "en"
# [languages]
# config/_default/languages.toml

# [menus]
# config/_default/menus/menu.xx.toml

[taxonomies]
category = "categories"
tag = "tags"
series = "series"
File renamed without changes.
18 changes: 17 additions & 1 deletion exampleSite/config/_default/markup.toml
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@

[goldmark]
[goldmark.renderer]
hardWraps = false
unsafe = true # change to false to disable inclusion of rawHTML and math functions
xhtml = false
[goldmark.extensions]
typographer = false
[highlight]
codeFences = true
guessSyntax = true
hl_Lines = "--"
lineNoStart = 1
lineNos = true # always set to true # else line numbers won't show at all! even when you toggle them on in the UI
lineNumbersInTable = false # toggling this on (i.e to true) or deleting this line will break the code blocks functionality. Will
noClasses = false
# style = "monokai"
tabWidth = 2
84 changes: 84 additions & 0 deletions exampleSite/config/_default/params.toml
Original file line number Diff line number Diff line change
@@ -1 +1,85 @@
author = "Jane Doe"
twitter = "@janedoe"
largeTwitterCard = false # set to true if you want to show a large twitter card image. The default is a small twitter card image
introDescription = "Technologist, perpetual student, teacher, continual incremental improvement."
# introURL = "about/" # set the url for the 'read more' button below the introDescription, or set to false to not show the button
# description = "" # set your site's description here. will be use for home page content meta tags (seo). Alternatively set this description in your homepage content file i.e content/_index.md. Whatever is set in the latter will take precedence

# showShare = false # Uncomment to not show share buttons on each post. Also available in each post's front matter.

# Google analytics Id
ga_analytics = "XXXXXXXXXX"

# Baidu analytics Id
# baidu_analytics = "XXXXXXXX"

# limit the number of taxonomies links shown on the sidebar of each page by default.
numberOfTagsShown = 14 # Applies for all other default & custom taxonomies. e.g categories, brands see https://gohugo.io/content-management/taxonomies#what-is-a-taxonomy

# will be used on share >> twitter, facebook, linkedin
fallBackOgImage = "images/thumbnail.png"

# sets the maximum number of lines per codeblock. The codeblock will however be scrollable and expandable.
codeMaxLines = 7

# disable showing line numbers by default. Switch to `true` if you'd rather have them on.
codeLineNumbers = false

# enable math notation. Switch to `true` to enable mathjax in your site.
enableMathNotation = false

# directory(s) where your articles are located
mainSections = ["post"] # see config details here https://gohugo.io/functions/where/#mainsections

# center logo on navbar
centerLogo = false # Set to "true" for centering or "false" for left aligned.

logo = "logos/logo.png"

# Label Non inline images on an article body
figurePositionShow = false # toggle on or off globally
# you can toggle this behaviour on or off on per page using the same variable inside your articles frontmatter
figurePositionLabel = "Figure" # the text before image number e.g Figure 1.0

# Set the collapsed mobile navigation to either appear from the left or the right
mobileNavigation = "left" # if you prefer right change to 'right'

# some site owners want to decide how they would like their sites to be introduced users. These settings give you as a site owner to decide how the user will view your site for the first time.

# please note that you cannot enforce both modes at the same time. i.e by enforcing one mode, you priotise it over the other (by setting it to true). enforceDarkMode will be commented out

# please also not that mode toggle UI will remain in place. That way, if a user prefers darkmode, they can have their way.

enforceLightMode = false
# enforceDarkMode = false

# customize footer icon. see issue https://github.com/chipzoller/hugo-clarity/issues/77
# footerLogo = "icons/copy.svg"

# Text for the languages menu.
languageMenuName = "🌐"

# Title separator, default to |.
# titleSeparator = "|"

# Enable or disable comments globally. Default to true.
# comments = false

# Maximum number of recent posts.
# numberOfRecentPosts = 8

# Maximum number of featured posts.
# numberOfFeaturedPosts = 8

# Date format. Checkout https://gohugo.io/functions/format/#hugo-date-and-time-templating-reference for details.
# dateFormat = "2006-01-02" # Default to "Jan 2, 2006".
# customFonts = false # toggle to true if you want to use custom fonts only.

# The year when ths website was created, this value is used in the copyright
# notice of the footer.
# since = 2016
[plausible_analytics]
enable = false # to enable plausible analytics set to true.
websiteDomain = "example.com" # domain name of your website, most cases same as your base url
# plausibleDomain = "plausible.io" # default is set to plausible.io, only required if plausible is selfhosted
# scritpName = "plausible" # default is set to plausible, only required if using a custome name for script

0 comments on commit 5c5e57c

Please sign in to comment.