Initial Commit
@@ -0,0 +1,228 @@
|
||||
# Changelog
|
||||
|
||||
## 2.6.0 (2021-10-21)
|
||||
|
||||
### Fixes
|
||||
|
||||
- [**bug**] theme: generate correct links if theme served from subdirectory [#120](https://github.com/McShelby/hugo-theme-relearn/issues/120)
|
||||
|
||||
+++
|
||||
|
||||
## 2.5.1 (2021-10-12)
|
||||
|
||||
### Fixes
|
||||
|
||||
- [**bug**] security: fix XSS for malicioius image URLs [#117](https://github.com/McShelby/hugo-theme-relearn/issues/117)
|
||||
|
||||
+++
|
||||
|
||||
## 2.5.0 (2021-10-08)
|
||||
|
||||
### Enhancements
|
||||
|
||||
- [**feature**] syntax highlight: provide default colors for unknown languages [#113](https://github.com/McShelby/hugo-theme-relearn/issues/113)
|
||||
|
||||
### Fixes
|
||||
|
||||
- [**bug**] security: fix XSS for malicioius URLs [#114](https://github.com/McShelby/hugo-theme-relearn/issues/114)
|
||||
- [**bug**] menu: write correct local shortcut links [#112](https://github.com/McShelby/hugo-theme-relearn/issues/112)
|
||||
|
||||
+++
|
||||
|
||||
## 2.4.1 (2021-10-07)
|
||||
|
||||
### Fixes
|
||||
|
||||
- [**bug**] theme: remove runtime styles from print [#111](https://github.com/McShelby/hugo-theme-relearn/issues/111)
|
||||
|
||||
+++
|
||||
|
||||
## 2.4.0 (2021-10-07)
|
||||
|
||||
### Enhancements
|
||||
|
||||
- [**feature**] lang: add vietnamese translation [#109](https://github.com/McShelby/hugo-theme-relearn/issues/109)
|
||||
- [**feature**] theme: simplify stylesheet for color variants [#107](https://github.com/McShelby/hugo-theme-relearn/issues/107)
|
||||
- [**feature**] hidden pages: remove from RSS feed, JSON, taxonomy etc [#102](https://github.com/McShelby/hugo-theme-relearn/issues/102)
|
||||
- [**feature**] theme: announce alternative content in header [#101](https://github.com/McShelby/hugo-theme-relearn/issues/101)
|
||||
- [**feature**] menu: frontmatter option to change sort predicate [#98](https://github.com/McShelby/hugo-theme-relearn/issues/98)
|
||||
- [**feature**] menu: add default setting for menu expansion [#97](https://github.com/McShelby/hugo-theme-relearn/issues/97)
|
||||
- [**feature**] theme: improve print style [#93](https://github.com/McShelby/hugo-theme-relearn/issues/93)
|
||||
- [**feature**] theme: improve style [#92](https://github.com/McShelby/hugo-theme-relearn/issues/92)
|
||||
|
||||
### Fixes
|
||||
|
||||
- [**bug**] include: don't generate additional HTML if file should be displayed "as is" [#110](https://github.com/McShelby/hugo-theme-relearn/issues/110)
|
||||
- [**bug**] attachments: fix broken links if multilang config is used [#105](https://github.com/McShelby/hugo-theme-relearn/issues/105)
|
||||
- [**bug**] theme: fix sticky header to remove horizontal scrollbar [#82](https://github.com/McShelby/hugo-theme-relearn/issues/82)
|
||||
|
||||
### Maintenance
|
||||
|
||||
- [**task**] chore: update fontawesome [#94](https://github.com/McShelby/hugo-theme-relearn/issues/94)
|
||||
|
||||
+++
|
||||
|
||||
## 2.3.2 (2021-09-20)
|
||||
|
||||
### Fixes
|
||||
|
||||
- [**bug**] docs: rename history pirate translation [#91](https://github.com/McShelby/hugo-theme-relearn/issues/91)
|
||||
|
||||
+++
|
||||
|
||||
## 2.3.1 (2021-09-20)
|
||||
|
||||
### Fixes
|
||||
|
||||
- [**bug**] docs: rename english pirate translation to avoid crash on rendering [#90](https://github.com/McShelby/hugo-theme-relearn/issues/90)
|
||||
|
||||
+++
|
||||
|
||||
## 2.3.0 (2021-09-13)
|
||||
|
||||
### Fixes
|
||||
|
||||
- [**bug**] theme: fix usage of section element [#88](https://github.com/McShelby/hugo-theme-relearn/issues/88)
|
||||
|
||||
### Maintenance
|
||||
|
||||
- [**task**] theme: ensure IE11 compatiblity [#89](https://github.com/McShelby/hugo-theme-relearn/issues/89)
|
||||
- [**task**] docs: Arrr! showcase multilang featurrre [#87](https://github.com/McShelby/hugo-theme-relearn/issues/87)
|
||||
|
||||
+++
|
||||
|
||||
## 2.2.0 (2021-09-09)
|
||||
|
||||
### Enhancements
|
||||
|
||||
- [**feature**] sitemap: hide hidden pages from sitemap and SEO indexing [#85](https://github.com/McShelby/hugo-theme-relearn/issues/85)
|
||||
|
||||
### Fixes
|
||||
|
||||
- [**bug**] theme: fix showVisitedLinks in case Hugo is configured to modify relative URLs [#86](https://github.com/McShelby/hugo-theme-relearn/issues/86)
|
||||
|
||||
### Maintenance
|
||||
|
||||
- [**task**] theme: switch from data-vocabulary to schema [#84](https://github.com/McShelby/hugo-theme-relearn/issues/84)
|
||||
|
||||
+++
|
||||
|
||||
## 2.1.0 (2021-09-07)
|
||||
|
||||
### Enhancements
|
||||
|
||||
- [**feature**] search: open expand if it contains search term [#80](https://github.com/McShelby/hugo-theme-relearn/issues/80)
|
||||
- [**feature**] menu: scroll active item into view [#79](https://github.com/McShelby/hugo-theme-relearn/issues/79)
|
||||
- [**feature**] search: disable search in hidden pages [#76](https://github.com/McShelby/hugo-theme-relearn/issues/76)
|
||||
- [**feature**] search: improve readablility of index.json [#75](https://github.com/McShelby/hugo-theme-relearn/issues/75)
|
||||
- [**feature**] search: increase performance [#74](https://github.com/McShelby/hugo-theme-relearn/issues/74)
|
||||
- [**feature**] search: improve search context preview [#73](https://github.com/McShelby/hugo-theme-relearn/issues/73)
|
||||
|
||||
### Fixes
|
||||
|
||||
- [**bug**] search: hide non-site content [#81](https://github.com/McShelby/hugo-theme-relearn/issues/81)
|
||||
- [**bug**] menu: always hide hidden sub pages [#77](https://github.com/McShelby/hugo-theme-relearn/issues/77)
|
||||
|
||||
+++
|
||||
|
||||
## 2.0.0 (2021-08-28)
|
||||
|
||||
### Enhancements
|
||||
|
||||
- [**feature**] tabs: enhance styling [#65](https://github.com/McShelby/hugo-theme-relearn/issues/65)
|
||||
- [**feature**] theme: improve readability [#64](https://github.com/McShelby/hugo-theme-relearn/issues/64)
|
||||
- [**feature**] menu: show hidden pages if accessed directly [#60](https://github.com/McShelby/hugo-theme-relearn/issues/60)
|
||||
- [**feature**] theme: treat pages without title as hidden [#59](https://github.com/McShelby/hugo-theme-relearn/issues/59)
|
||||
- [**feature**] search: show search results if field gains focus [#58](https://github.com/McShelby/hugo-theme-relearn/issues/58)
|
||||
- [**feature**] theme: add partial templates for pre/post menu entries [#56](https://github.com/McShelby/hugo-theme-relearn/issues/56)
|
||||
- [**feature**] theme: make chapter archetype more readable [#55](https://github.com/McShelby/hugo-theme-relearn/issues/55)
|
||||
- [**feature**] children: add parameter for container style [#53](https://github.com/McShelby/hugo-theme-relearn/issues/53)
|
||||
- [**feature**] theme: make content a template [#50](https://github.com/McShelby/hugo-theme-relearn/issues/50)
|
||||
- [**feature**] menu: control menu expansion with alwaysopen parameter [#49](https://github.com/McShelby/hugo-theme-relearn/issues/49)
|
||||
- [**feature**] include: new shortcode to include other files [#43](https://github.com/McShelby/hugo-theme-relearn/issues/43)
|
||||
- [**feature**] theme: adjust print styles [#35](https://github.com/McShelby/hugo-theme-relearn/issues/35)
|
||||
- [**feature**] code highligher: switch to standard hugo highlighter [#32](https://github.com/McShelby/hugo-theme-relearn/issues/32)
|
||||
|
||||
### Fixes
|
||||
|
||||
- [**bug**] arrow-nav: default sorting ignores ordersectionsby [#63](https://github.com/McShelby/hugo-theme-relearn/issues/63)
|
||||
- [**bug**] children: default sorting ignores ordersectionsby [#62](https://github.com/McShelby/hugo-theme-relearn/issues/62)
|
||||
- [**bug**] arrow-nav: fix broken links on (and below) hidden pages [#61](https://github.com/McShelby/hugo-theme-relearn/issues/61)
|
||||
- [**bug**] theme: remove superflous singular taxonomy from taxonomy title [#46](https://github.com/McShelby/hugo-theme-relearn/issues/46)
|
||||
- [**bug**] theme: missing --MENU-HOME-LINK-HOVER-color in documentation [#45](https://github.com/McShelby/hugo-theme-relearn/issues/45)
|
||||
- [**bug**] theme: fix home link when base URL has some path [#44](https://github.com/McShelby/hugo-theme-relearn/issues/44)
|
||||
|
||||
### Maintenance
|
||||
|
||||
- [**task**] docs: include changelog in exampleSite [#33](https://github.com/McShelby/hugo-theme-relearn/issues/33)
|
||||
|
||||
+++
|
||||
|
||||
## 1.2.0 (2021-07-26)
|
||||
|
||||
### Enhancements
|
||||
|
||||
- [**feature**] theme: adjust copy-to-clipboard [#29](https://github.com/McShelby/hugo-theme-relearn/issues/29)
|
||||
- [**feature**] attachments: adjust style between notice boxes and attachments [#28](https://github.com/McShelby/hugo-theme-relearn/issues/28)
|
||||
- [**feature**] theme: adjust blockquote contrast [#27](https://github.com/McShelby/hugo-theme-relearn/issues/27)
|
||||
- [**feature**] expand: add option to open on page load [#25](https://github.com/McShelby/hugo-theme-relearn/issues/25)
|
||||
- [**feature**] expand: rework styling [#24](https://github.com/McShelby/hugo-theme-relearn/issues/24)
|
||||
- [**feature**] attachments: sort output [#23](https://github.com/McShelby/hugo-theme-relearn/issues/23)
|
||||
- [**feature**] notice: make restyling of notice boxes more robust [#20](https://github.com/McShelby/hugo-theme-relearn/issues/20)
|
||||
- [**feature**] notice: fix contrast issues [#19](https://github.com/McShelby/hugo-theme-relearn/issues/19)
|
||||
- [**feature**] notice: align box colors to common standards [#18](https://github.com/McShelby/hugo-theme-relearn/issues/18)
|
||||
- [**feature**] notice: use distinct icons for notice box type [#17](https://github.com/McShelby/hugo-theme-relearn/issues/17)
|
||||
|
||||
### Fixes
|
||||
|
||||
- [**bug**] attachments: support i18n for attachment size [#21](https://github.com/McShelby/hugo-theme-relearn/issues/21)
|
||||
- [**bug**] notice: support i18n for box labels [#16](https://github.com/McShelby/hugo-theme-relearn/issues/16)
|
||||
- [**bug**] notice: support multiple blocks in one box [#15](https://github.com/McShelby/hugo-theme-relearn/issues/15)
|
||||
|
||||
### Maintenance
|
||||
|
||||
- [**task**] dependency: upgrade jquery to 3.6.0 [#30](https://github.com/McShelby/hugo-theme-relearn/issues/30)
|
||||
|
||||
+++
|
||||
|
||||
## 1.1.1 (2021-07-04)
|
||||
|
||||
### Maintenance
|
||||
|
||||
- [**task**] theme: prepare for new hugo theme registration [#13](https://github.com/McShelby/hugo-theme-relearn/issues/13)
|
||||
|
||||
+++
|
||||
|
||||
## 1.1.0 (2021-07-02)
|
||||
|
||||
### Enhancements
|
||||
|
||||
- [**feature**] mermaid: expose options in config.toml [#4](https://github.com/McShelby/hugo-theme-relearn/issues/4)
|
||||
|
||||
### Fixes
|
||||
|
||||
- [**bug**] mermaid: config option for CDN url not used [#12](https://github.com/McShelby/hugo-theme-relearn/issues/12)
|
||||
- [**bug**] mermaid: only highlight text in HTML elements [#10](https://github.com/McShelby/hugo-theme-relearn/issues/10)
|
||||
- [**bug**] mermaid: support pan & zoom for graphs [#9](https://github.com/McShelby/hugo-theme-relearn/issues/9)
|
||||
- [**bug**] mermaid: code fences not always rendered [#6](https://github.com/McShelby/hugo-theme-relearn/issues/6)
|
||||
- [**bug**] mermaid: search term on load may bomb chart [#5](https://github.com/McShelby/hugo-theme-relearn/issues/5)
|
||||
|
||||
### Maintenance
|
||||
|
||||
- [**task**] mermaid: update to 8.10.2 [#7](https://github.com/McShelby/hugo-theme-relearn/issues/7)
|
||||
|
||||
+++
|
||||
|
||||
## 1.0.1 (2021-07-01)
|
||||
|
||||
### Maintenance
|
||||
|
||||
- [**task**] Prepare for hugo showcase [#3](https://github.com/McShelby/hugo-theme-relearn/issues/3)
|
||||
|
||||
+++
|
||||
|
||||
## 1.0.0 (2021-07-01)
|
||||
|
||||
### Maintenance
|
||||
|
||||
- [**task**] Fork project [#1](https://github.com/McShelby/hugo-theme-relearn/issues/1)
|
||||
11
themes/hugo-theme-relearn/exampleSite/content/basics/_index.en.md
Executable file
@@ -0,0 +1,11 @@
|
||||
+++
|
||||
chapter = true
|
||||
title = "Basics"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
### Chapter 1
|
||||
|
||||
# Basics
|
||||
|
||||
Discover what this Hugo theme is all about and the core-concepts behind it.
|
||||
@@ -0,0 +1,6 @@
|
||||
+++
|
||||
chapter = true
|
||||
title = "Basics"
|
||||
weight = 1
|
||||
+++
|
||||
{{< piratify >}}
|
||||
@@ -0,0 +1,135 @@
|
||||
+++
|
||||
title = "Configuration"
|
||||
weight = 20
|
||||
+++
|
||||
|
||||
## Global site parameters
|
||||
|
||||
On top of [Hugo global configuration](https://gohugo.io/overview/configuration/), the Relearn theme lets you define the following parameters in your `config.toml` (here, values are default).
|
||||
|
||||
Note that some of these parameters are explained in details in other sections of this documentation.
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# This controls whether submenus will be expanded (true), or collapsed (false) in the
|
||||
# menu; if no setting is given, the first menu level is set to false, all others to true;
|
||||
# this can be overridden in the pages frontmatter
|
||||
alwaysopen = true
|
||||
# Prefix URL to edit current page. Will display an "Edit this page" button on top right hand corner of every page.
|
||||
# Useful to give opportunity to people to create merge request for your doc.
|
||||
# See the config.toml file from this documentation site to have an example.
|
||||
editURL = ""
|
||||
# Author of the site, will be used in meta information
|
||||
author = ""
|
||||
# Description of the site, will be used in meta information
|
||||
description = ""
|
||||
# Shows a checkmark for visited pages on the menu
|
||||
showVisitedLinks = false
|
||||
# Disable search function. It will hide search bar
|
||||
disableSearch = false
|
||||
# Disable search in hidden pages, otherwise they will be shown in search box
|
||||
disableSearchHiddenPages = false
|
||||
# Disables hidden pages from showing up in the sitemap and on Google (et all), otherwise they may be indexed by search engines
|
||||
disableSeoHiddenPages = false
|
||||
# Disables hidden pages from showing up on the tags page although the tag term will be displayed even if all pages are hidden
|
||||
disableTagHiddenPages = false
|
||||
# Javascript and CSS cache are automatically busted when new version of site is generated.
|
||||
# Set this to true to disable this behavior (some proxies don't handle well this optimization)
|
||||
disableAssetsBusting = false
|
||||
# Set this to true to disable copy-to-clipboard button for inline code.
|
||||
disableInlineCopyToClipBoard = false
|
||||
# A title for shortcuts in menu is set by default. Set this to true to disable it.
|
||||
disableShortcutsTitle = false
|
||||
# If set to false, a Home button will appear below the search bar on the menu.
|
||||
# It is redirecting to the landing page of the current language if specified. (Default is "/")
|
||||
disableLandingPageButton = true
|
||||
# When using mulitlingual website, disable the switch language button.
|
||||
disableLanguageSwitchingButton = false
|
||||
# Hide breadcrumbs in the header and only show the current page title
|
||||
disableBreadcrumb = true
|
||||
# If set to true, prevents Hugo from including the Mermaid module if not needed (will reduce load times and traffic)
|
||||
disableMermaid = false
|
||||
# Specifies the remote location of the Mermaid js
|
||||
customMermaidURL = "https://unpkg.com/mermaid@8.8.0/dist/mermaid.min.js"
|
||||
# Initialization parameter for Mermaid, see Mermaid documentation
|
||||
mermaidInitialize = "{ \"theme\": \"default\" }"
|
||||
# Hide Next and Previous page buttons normally displayed full height beside content
|
||||
disableNextPrev = true
|
||||
# Order sections in menu by "weight" or "title". Default to "weight";
|
||||
# this can be overridden in the pages frontmatter
|
||||
ordersectionsby = "weight"
|
||||
# Change default color scheme with a variant one. Can be "red", "blue", "green".
|
||||
themeVariant = ""
|
||||
# Provide a list of custom css files to load relative from the `static/` folder in the site root.
|
||||
custom_css = ["css/foo.css", "css/bar.css"]
|
||||
# Change the title separator. Default to "::".
|
||||
titleSeparator = "-"
|
||||
```
|
||||
|
||||
## A word on running your site in a subfolder
|
||||
|
||||
The theme runs best if your site is installed in the root of your webserver. If your site is served from a subfolder, eg. `https://example.com/mysite/`, you have to set the following lines to your `config.toml`
|
||||
|
||||
````toml
|
||||
baseURL = "https://example.com/mysite/"
|
||||
canonifyURLs = true
|
||||
````
|
||||
|
||||
Without `canonifyURLs=true` URLs in sublemental pages (like `sitemap.xml`, `rss.xml`) will be generated falsly while your HTML files will still work. See https://github.com/gohugoio/hugo/issues/5226.
|
||||
|
||||
## Activate search
|
||||
|
||||
If not already present, add the follow lines in the same `config.toml` file.
|
||||
|
||||
```toml
|
||||
[outputs]
|
||||
home = [ "HTML", "RSS", "JSON"]
|
||||
```
|
||||
|
||||
Relearn theme uses the last improvement available in hugo version 20+ to generate a json index file ready to be consumed by lunr.js javascript search engine.
|
||||
|
||||
> Hugo generate lunrjs index.json at the root of public folder.
|
||||
> When you build the site with `hugo server`, hugo generates it internally and of course it doesn’t show up in the filesystem
|
||||
|
||||
## Mermaid
|
||||
|
||||
The Mermaid configuration parameters can also be set on a specific page. In this case, the global parameter would be overwritten by the local one. See [Mermaid]({{< relref "shortcodes/mermaid.md" >}}) for additional documentation.
|
||||
|
||||
> Example:
|
||||
>
|
||||
> Mermaid is globally disabled. By default it won't be loaded by any page.
|
||||
> On page "Architecture" you need a class diagram. You can set the Mermaid parameters locally to only load mermaid on this page (not on the others).
|
||||
|
||||
You also can disable Mermaid for specific pages while globally enabled.
|
||||
|
||||
## Home Button Configuration
|
||||
|
||||
If the `disableLandingPageButton` option is set to `false`, a Home button will appear
|
||||
on the left menu. It is an alternative for clicking on the logo. To edit the
|
||||
appearance, you will have to configure two parameters for the defined languages:
|
||||
|
||||
```toml
|
||||
[Lanugages]
|
||||
[Lanugages.en]
|
||||
...
|
||||
landingPageURL = "/"
|
||||
landingPageName = "<i class='fas fa-home'></i> Home"
|
||||
...
|
||||
[Lanugages.pir]
|
||||
...
|
||||
landingPageURL = "/pir/"
|
||||
landingPageName = "<i class='fas fa-home'></i> Arrr! Homme"
|
||||
...
|
||||
```
|
||||
|
||||
If those params are not configured for a specific language, they will get their
|
||||
default values:
|
||||
|
||||
```toml
|
||||
landingPageURL = "/"
|
||||
landingPageName = "<i class='fas fa-home'></i> Home"
|
||||
```
|
||||
|
||||
The home button is going to look like this:
|
||||
|
||||

|
||||
@@ -0,0 +1,5 @@
|
||||
+++
|
||||
title = "Configurrrat'n"
|
||||
weight = 20
|
||||
+++
|
||||
{{< piratify >}}
|
||||
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,133 @@
|
||||
+++
|
||||
title = "Customization"
|
||||
weight = 25
|
||||
+++
|
||||
|
||||
The Relearn theme has been built to be as configurable as possible by defining multiple [partials](https://gohugo.io/templates/partials/)
|
||||
|
||||
In `themes/hugo-theme-relearn/layouts/partials/`, you will find all the partials defined for this theme. If you need to overwrite something, don't change the code directly. Instead [follow this page](https://gohugo.io/themes/customizing/). You'd create a new partial in the `layouts/partials` folder of your local project. This partial will have the priority.
|
||||
|
||||
This theme defines the following partials :
|
||||
|
||||
- *content*: the content page itself. This can be overridden if you wan't to display page's meta data above or below the content.
|
||||
- *header*: the header of the content page (contains the breadcrumbs). _Not meant to be overwritten_
|
||||
- *custom-header*: custom headers in page. Meant to be overwritten when adding CSS imports. Don't forget to include `style` HTML tag directive in your file
|
||||
- *footer*: the footer of the content page (contains the arrows). _Not meant to be overwritten_
|
||||
- *custom-footer*: custom footer in page. Meant to be overwritten when adding Javacript. Don't forget to include `javascript` HTML tag directive in your file
|
||||
- *favicon*: the favicon
|
||||
- *logo*: the logo, on top left hand corner.
|
||||
- *meta*: HTML meta tags, if you want to change default behavior
|
||||
- *menu*: left menu. _Not meant to be overwritten_
|
||||
- *menu-pre*: side-wide configuration to prepend to menu items. If you override this, it is your responsiblity to take the page's `pre` setting into account.
|
||||
- *menu-post*: side-wide configuration to append to menu items. If you override this, it is your responsiblity to take the page's `post` setting into account.
|
||||
- *menu-footer*: footer of the the left menu
|
||||
- *search*: search box
|
||||
- *toc*: table of contents
|
||||
|
||||
## Change the logo
|
||||
|
||||
Create a new file in `layouts/partials/` named `logo.html`. Then write any HTML you want.
|
||||
You could use an `img` HTML tag and reference an image created under the *static* folder, or you could paste a SVG definition!
|
||||
|
||||
{{% notice note %}}
|
||||
The size of the logo will adapt automatically
|
||||
{{% /notice %}}
|
||||
|
||||
## Change the favicon
|
||||
|
||||
If your favicon is a png, just drop off your image in your local `static/images/` folder and name it `favicon.png`
|
||||
|
||||
If you need to change this default behavior, create a new file in `layouts/partials/` named `favicon.html`. Then write something like this:
|
||||
|
||||
```html
|
||||
<link rel="shortcut icon" href="/images/favicon.png" type="image/x-icon" />
|
||||
```
|
||||
|
||||
## Change default colors {#theme-variant}
|
||||
|
||||
The Relearn theme let you choose between some predefined color scheme variants, but feel free to add one yourself!
|
||||
|
||||
### Standard variant
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# Change default color scheme with a variant one. Can be empty, "red", "blue", "green".
|
||||
themeVariant = ""
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Red variant
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# Change default color scheme with a variant one. Can be empty, "red", "blue", "green".
|
||||
themeVariant = "red"
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Blue variant
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# Change default color scheme with a variant one. Can be empty, "red", "blue", "green".
|
||||
themeVariant = "blue"
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Green variant
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# Change default color scheme with a variant one. Can be empty, "red", "blue", "green".
|
||||
themeVariant = "green"
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 'Mine‘ variant
|
||||
|
||||
First, create a new CSS file in your local `static/css` folder prefixed by `theme` (e.g. with _mine_ theme `static/css/theme-mine.css`). Copy the following content and modify colors in CSS variables.
|
||||
|
||||
```css
|
||||
:root {
|
||||
--MAIN-TEXT-color: #323232; /* Color of text by default */
|
||||
--MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5-h6 */
|
||||
--MAIN-LINK-color: #1C90F3; /* Color of links */
|
||||
--MAIN-LINK-HOVER-color: #167ad0; /* Color of hovered links */
|
||||
--MAIN-ANCHOR-color: #1C90F3; /* color of anchors on titles */
|
||||
|
||||
--MAIN-CODE-color: #e2e4e5; /* fallback color for code background */
|
||||
--MAIN-CODE-BG-color: #282a36; /* fallback color for code text */
|
||||
|
||||
--MENU-HOME-LINK-color: #323232; /* Color of the home button text */
|
||||
--MENU-HOME-LINK-HOVER-color: #5e5e5e; /* Color of the hovered home button text */
|
||||
|
||||
--MENU-HEADER-BG-color: #1C90F3; /* Background color of menu header */
|
||||
--MENU-HEADER-BORDER-color: #33a1ff; /*Color of menu header border */
|
||||
|
||||
--MENU-SEARCH-BG-color: #167ad0; /* Search field background color (by default borders + icons) */
|
||||
--MENU-SEARCH-BOX-color: #33a1ff; /* Override search field border color */
|
||||
--MENU-SEARCH-BOX-ICONS-color: #a1d2fd; /* Override search field icons color */
|
||||
|
||||
--MENU-SECTIONS-ACTIVE-BG-color: #20272b; /* Background color of the active section and its children */
|
||||
--MENU-SECTIONS-BG-color: #252c31; /* Background color of other sections */
|
||||
--MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */
|
||||
--MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */
|
||||
--MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */
|
||||
--MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */
|
||||
|
||||
--MENU-VISITED-color: #33a1ff; /* Color of 'page visited' icons in menu */
|
||||
--MENU-SECTION-HR-color: #20272b; /* Color of <hr> separator in menu */
|
||||
}
|
||||
```
|
||||
|
||||
Then, set the `themeVariant` value with the name of your custom theme file. That's it!
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# Change default color scheme with a variant one. Can be "red", "blue", "green".
|
||||
themeVariant = "mine"
|
||||
```
|
||||
@@ -0,0 +1,5 @@
|
||||
+++
|
||||
title = "Customizat'n"
|
||||
weight = 25
|
||||
+++
|
||||
{{< piratify >}}
|
||||
|
After Width: | Height: | Size: 232 KiB |
|
After Width: | Height: | Size: 233 KiB |
|
After Width: | Height: | Size: 232 KiB |
|
After Width: | Height: | Size: 233 KiB |
@@ -0,0 +1,5 @@
|
||||
+++
|
||||
title = "History"
|
||||
weight = 30
|
||||
+++
|
||||
{{% include "basics/CHANGELOG.md" false %}}
|
||||
@@ -0,0 +1,5 @@
|
||||
+++
|
||||
title = "Historrry"
|
||||
weight = 30
|
||||
+++
|
||||
{{< piratify >}}
|
||||
@@ -0,0 +1,102 @@
|
||||
+++
|
||||
title = "Installation"
|
||||
weight = 15
|
||||
+++
|
||||
|
||||
The following steps are here to help you initialize your new website. If you don't know Hugo at all, we strongly suggest you learn more about it by following this [great documentation for beginners](https://gohugo.io/overview/quickstart/).
|
||||
|
||||
## Create your project
|
||||
|
||||
Hugo provides a `new` command to create a new website.
|
||||
|
||||
```
|
||||
hugo new site <new_project>
|
||||
```
|
||||
|
||||
## Install the theme
|
||||
|
||||
Install the Relearn theme by following [this documentation](https://gohugo.io/getting-started/quick-start/#step-3-add-a-theme)
|
||||
|
||||
This theme's repository is: https://github.com/McShelby/hugo-theme-relearn.git
|
||||
|
||||
Alternatively, you can [download the theme as .zip](https://github.com/McShelby/hugo-theme-relearn/archive/main.zip) file and extract it in the `themes` directory
|
||||
|
||||
## Basic configuration
|
||||
|
||||
When building the website, you can set a theme by using `--theme` option. However, we suggest you modify the configuration file (`config.toml`) and set the theme as the default. You can also add the `[outputs]` section to enable the search functionality.
|
||||
|
||||
```toml
|
||||
# Change the default theme to be use when building the site with Hugo
|
||||
theme = "hugo-theme-relearn"
|
||||
|
||||
# For search functionality
|
||||
[outputs]
|
||||
home = [ "HTML", "RSS", "JSON"]
|
||||
```
|
||||
|
||||
## Create your first chapter page
|
||||
|
||||
Chapters are pages that contain other child pages. It has a special layout style and usually just contains a _chapter name_, the _title_ and a _brief abstract_ of the section.
|
||||
|
||||
```markdown
|
||||
### Chapter 1
|
||||
|
||||
# Basics
|
||||
|
||||
Discover what this Hugo theme is all about and the core concepts behind it.
|
||||
```
|
||||
|
||||
renders as
|
||||
|
||||

|
||||
|
||||
The Relearn theme provides archetypes to create skeletons for your website. Begin by creating your first chapter page with the following command
|
||||
|
||||
```shell
|
||||
hugo new --kind chapter basics/_index.md
|
||||
```
|
||||
|
||||
By opening the given file, you should see the property `chapter=true` on top, meaning this page is a _chapter_.
|
||||
|
||||
By default all chapters and pages are created as a draft. If you want to render these pages, remove the property `draft: true` from the metadata.
|
||||
|
||||
## Create your first content pages
|
||||
|
||||
Then, create content pages inside the previously created chapter. Here are two ways to create content in the chapter:
|
||||
|
||||
```shell
|
||||
hugo new basics/first-content.md
|
||||
hugo new basics/second-content/_index.md
|
||||
```
|
||||
|
||||
Feel free to edit those files by adding some sample content and replacing the `title` value in the beginning of the files.
|
||||
|
||||
## Launching the website locally
|
||||
|
||||
Launch by using the following command:
|
||||
|
||||
```shell
|
||||
hugo serve
|
||||
```
|
||||
|
||||
Go to `http://localhost:1313`
|
||||
|
||||
You should notice three things:
|
||||
|
||||
1. You have a left-side **Basics** menu, containing two submenus with names equal to the `title` properties in the previously created files.
|
||||
2. The home page explains how to customize it by following the instructions.
|
||||
3. When you run `hugo serve`, when the contents of the files change, the page automatically refreshes with the changes. Neat!
|
||||
|
||||
## Build the website
|
||||
|
||||
When your site is ready to deploy, run the following command:
|
||||
|
||||
```shell
|
||||
hugo
|
||||
```
|
||||
|
||||
A `public` folder will be generated, containing all static content and assets for your website. It can now be deployed on any web server.
|
||||
|
||||
{{% notice note %}}
|
||||
This website can be automatically published and hosted with [Netlify](https://www.netlify.com/) (Read more about [Automated HUGO deployments with Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/)). Alternatively, you can use [GitHub pages](https://gohugo.io/hosting-and-deployment/hosting-on-github/)
|
||||
{{% /notice %}}
|
||||
@@ -0,0 +1,5 @@
|
||||
+++
|
||||
title = "Installat'n"
|
||||
weight = 15
|
||||
+++
|
||||
{{< piratify >}}
|
||||
|
After Width: | Height: | Size: 43 KiB |
@@ -0,0 +1,92 @@
|
||||
+++
|
||||
title = "What's new"
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
This document shows you what's new in the latest release. For a detailed list of changes, see the [history page]({{%relref "basics/history" %}}).
|
||||
|
||||
**Breaking**: A change that requires action by you after upgrading to assure the site is still functional.
|
||||
|
||||
**Change**: A change in default behavior. This may requires action by you / may or may not be revertable by configuration.
|
||||
|
||||
**New**: Marks new behavior you might find interesting or comes configurable.
|
||||
|
||||
+++
|
||||
|
||||
## 2.6.0
|
||||
|
||||
- **New**: Your site can now be served from a subfolder if you set `baseURL` and `canonifyURLs=true` in your `config.toml`. See the [documentation]({{% relref "basics/configuration/#a-word-on-running-your-site-in-a-subfolder" %}}) for a detailed example.
|
||||
|
||||
+++
|
||||
|
||||
## 2.5.0
|
||||
|
||||
- **Change**: Add new colors `--MAIN-CODE-color` and `--MAIN-CODE-BG-color` for syntax highlightning fallback in your stylesheet in case `guessSyntax=true` is set. Ideally they are set to the same values as the ones from your chosen chroma style.
|
||||
|
||||
+++
|
||||
|
||||
## 2.4.0
|
||||
|
||||
- **Change**: Creation of customized stylesheets was simplified down to only contain the CSS variables. Everything else can and should be deleted from your custom stylesheet to assure everything works fine. For the predefined stylesheet variants, this change is already included. The [documentation]({{%relref "basics/customization/#mine-variant" %}}) was adjusted accordingly.
|
||||
|
||||
- **New**: Hidden pages are displayed by default in their according tags page. You can now turn off this behavior by setting `disableTagHiddenPages=true` in your `config.toml`.
|
||||
|
||||
- **New**: You can define the expansion state of your menus for the whole site by setting the `alwaysopen` option in your `config.toml`. Please see further [documentation]({{%relref "cont/pages/#override-expand-state-rules-for-menu-entries" %}}) for possible values and default behavior.
|
||||
|
||||
- **New**: New frontmatter `ordersectionsby` option to change immediate children sorting in menu and `children` shortcode. Possible values are `title` or `weight`.
|
||||
|
||||
- **New**: Alternate content of a page is now advertised in the HTML meta tags. See [Hugo documentation](https://gohugo.io/templates/rss/#reference-your-rss-feed-in-head).
|
||||
|
||||
+++
|
||||
|
||||
## 2.2.0
|
||||
|
||||
- **New**: Hidden pages are displayed by default in the sitemap generated by Hugo and are therefore visible for search engine indexing. You can now turn off this behavior by setting `disableSeoHiddenPages=true` in your `config.toml`.
|
||||
|
||||
+++
|
||||
|
||||
## 2.1.0
|
||||
|
||||
- **Change**: In case the site's structure contains addional *.md files not part of the site (eg files that are meant to be included by site pages - see CHANGELOG.md in exampleSite), they will now be ignored by the search.
|
||||
|
||||
- **New**: Hidden pages are indexed for the site search by default. You can now turn off this behavior by setting `disableSearchHiddenPages=true` in your `config.toml`.
|
||||
|
||||
- **New**: If a search term is found in an `expand` shortcode, the expand will be opened.
|
||||
|
||||
- **New**: The menu will scroll the active item into view on load.
|
||||
|
||||
+++
|
||||
|
||||
## 2.0.0
|
||||
|
||||
- **Change**: Syntaxhighlightning was switched to [built in Hugo mechanism](https://gohugo.io/content-management/syntax-highlighting/). You may need to configure a new stylesheet or decide to roll you own as describedd on in the Hugo documentation
|
||||
|
||||
- **Change**: In the predefined stylesheets there was a typo and `--MENU-HOME-LINK-HOVERED-color` must be changed to `--MENU-HOME-LINK-HOVER-color`.
|
||||
|
||||
- **Change**: `--MENU-HOME-LINK-color` and `--MENU-HOME-LINK-HOVER-color` were missing in the documentation. You should add them to your custom stylesheets.
|
||||
|
||||
- **Change**: Arrow navigation and `children` shortcode were ignoring setting for `ordersectionsby`. This is now changed and may result in different sorting order of your sub pages.
|
||||
|
||||
- **Change**: If hidden pages are accessed directly by typing their URL, they will be exposed in the menu.
|
||||
|
||||
- **Change**: A page without a `title` will be treated as `hidden=true`.
|
||||
|
||||
- **New**: You can define the expansion state of your menus in the frontmatter. Please see further [documentation]({{%relref "cont/pages/#override-expand-state-rules-for-menu-entries" %}}) for possible values and default behavior.
|
||||
|
||||
- **New**: New partials for defining pre/post content for menu items and the content. See [documentation]({{% relref "basics/customization" %}}) for further reading.
|
||||
|
||||
- **New**: Shortcode [`children`]({{% relref "shortcodes/children" %}}) with new parameter `containerstyle`.
|
||||
|
||||
- **New**: New shortcode [`include`]({{% relref "shortcodes/include" %}}) to include arbitrary file content into a page.
|
||||
|
||||
+++
|
||||
|
||||
## 1.2.0
|
||||
|
||||
- **New**: Shortcode [`expand`]({{% relref "shortcodes/expand" %}}) with new parameter to open on page load.
|
||||
|
||||
+++
|
||||
|
||||
## 1.1.0
|
||||
|
||||
- **New**: [`Mermaid`]({{% relref "shortcodes/mermaid#configuration" %}}) config options can be set in `config.toml`.
|
||||
@@ -0,0 +1,5 @@
|
||||
+++
|
||||
title = "Migrrrat'n"
|
||||
weight = 17
|
||||
+++
|
||||
{{< piratify >}}
|
||||
@@ -0,0 +1,11 @@
|
||||
+++
|
||||
disableToc = true
|
||||
title = "Requirements"
|
||||
weight = 10
|
||||
+++
|
||||
|
||||
Thanks to the simplicity of Hugo, this page is as empty as this theme needs requirements.
|
||||
|
||||
Just download latest version of [Hugo binary (> 0.25)](https://gohugo.io/getting-started/installing/) for your OS (Windows, Linux, Mac) : it's that simple.
|
||||
|
||||

|
||||
@@ -0,0 +1,6 @@
|
||||
+++
|
||||
disableToc = true
|
||||
title = "Requirrrements"
|
||||
weight = 10
|
||||
+++
|
||||
{{< piratify >}}
|
||||
|
After Width: | Height: | Size: 1.4 MiB |