Skip to content

Commit

Permalink
theme: convert front matter to TOML matcornic#52
Browse files Browse the repository at this point in the history
remove date field
  • Loading branch information
McShelby committed Aug 25, 2021
1 parent 96c9898 commit 15cfc82
Show file tree
Hide file tree
Showing 44 changed files with 153 additions and 170 deletions.
5 changes: 2 additions & 3 deletions archetypes/chapter.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
+++
title = "{{ replace .Name "-" " " | title }}"
date = {{ .Date }}
weight = 5
chapter = true
pre = "<b>X. </b>"
title = "{{ replace .Name "-" " " | title }}"
weight = 5
+++

### Chapter X
Expand Down
1 change: 0 additions & 1 deletion archetypes/default.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
+++
title = "{{ replace .Name "-" " " | title }}"
date = {{ .Date }}
weight = 5
+++

Expand Down
6 changes: 3 additions & 3 deletions exampleSite/content/_index.en.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Relearn Theme for Hugo"
---
+++
title = "Relearn Theme for Hugo"
+++

# Hugo Relearn Theme

Expand Down
12 changes: 6 additions & 6 deletions exampleSite/content/basics/_index.en.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Basics
weight: 5
pre: "<b>1. </b>"
chapter: true
---
+++
chapter = true
pre = "<b>1. </b>"
title = "Basics"
weight = 5
+++

### Chapter 1

Expand Down
9 changes: 4 additions & 5 deletions exampleSite/content/basics/configuration/_index.en.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
date: 2016-04-09T16:50:16+02:00
title: Configuration
weight: 20
---
+++
title = "Configuration"
weight = 20
+++

## Global site parameters

Expand Down
9 changes: 4 additions & 5 deletions exampleSite/content/basics/customization/_index.en.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
date: 2016-04-09T16:50:16+02:00
title: Customization
weight: 25
---
+++
title = "Customization"
weight = 25
+++

**Hugo-theme-relearn** has been built to be as configurable as possible by defining multiple [partials](https://gohugo.io/templates/partials/)

Expand Down
9 changes: 4 additions & 5 deletions exampleSite/content/basics/history/_index.en.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
date: 2021-08-23T16:50:16+02:00
title: History
weight: 30
---
+++
title = "History"
weight = 30
+++
{{% include "basics/CHANGELOG.md" %}}
8 changes: 4 additions & 4 deletions exampleSite/content/basics/installation/_index.en.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Installation
weight: 15
---
+++
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/).

Expand Down
9 changes: 4 additions & 5 deletions exampleSite/content/basics/migration/_index.en.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
date: 2021-08-23T16:50:16+02:00
title: Migration
weight: 17
---
+++
title = "Migration"
weight = 17
+++

If you are coming from a previous version of the theme or even from the hugo-theme-learn. You may want to achieve old behaviour in case of an update.
10 changes: 5 additions & 5 deletions exampleSite/content/basics/requirements/_index.en.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Requirements
weight: 10
disableToc: true
---
+++
disableToc = true
title = "Requirements"
weight = 10
+++

Thanks to the simplicity of Hugo, this page is as empty as this theme needs requirements.

Expand Down
12 changes: 6 additions & 6 deletions exampleSite/content/cont/_index.en.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Content
weight: 10
chapter: true
pre: "<b>2. </b>"
---
+++
chapter = true
pre = "<b>2. </b>"
title = "Content"
weight = 10
+++

### Chapter 2

Expand Down
14 changes: 6 additions & 8 deletions exampleSite/content/cont/archetypes.en.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Archetypes
weight: 10
---
+++
title = "Archetypes"
weight = 10
+++

Using the command: `hugo new [relative new content path]`, you can start a content file with the date and title automatically set. While this is a welcome feature, active writers need more: [archetypes](https://gohugo.io/content/archetypes/).

Expand All @@ -19,11 +19,10 @@ It will create a page with predefined Front-Matter:

```toml
+++
title = "{{ replace .Name "-" " " | title }}"
date = {{ .Date }}
weight = 5
chapter = true
pre = "<b>X. </b>"
title = "{{ replace .Name "-" " " | title }}"
weight = 5
+++

### Chapter X
Expand Down Expand Up @@ -52,7 +51,6 @@ It will create a page with predefined Front-Matter:
```toml
+++
title = "{{ replace .Name "-" " " | title }}"
date = {{ .Date }}
weight = 5
+++

Expand Down
9 changes: 4 additions & 5 deletions exampleSite/content/cont/i18n/_index.en.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
date: 2016-04-09T16:50:16+02:00
title: Multilingual and i18n
weight: 30
---
+++
title = "Multilingual and i18n"
weight = 30
+++

**Relearn theme** is fully compatible with Hugo multilingual mode.

Expand Down
8 changes: 4 additions & 4 deletions exampleSite/content/cont/icons.en.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Icons and logos
weight: 27
---
+++
title = "Icons and logos"
weight = 27
+++

The Relearn theme for Hugo loads the [**Font Awesome**](https://fontawesome.com) library, allowing you to easily display any icon or logo available in the Font Awesome free collection.

Expand Down
9 changes: 4 additions & 5 deletions exampleSite/content/cont/markdown.en.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
date: 2016-04-09T16:50:16+02:00
title: Markdown syntax
weight: 15
---
+++
title = "Markdown syntax"
weight = 15
+++

Let's face it: Writing content for the Web is tiresome. WYSIWYG editors help alleviate this task, but they generally result in horrible code, or worse yet, ugly web pages.

Expand Down
9 changes: 4 additions & 5 deletions exampleSite/content/cont/menushortcuts.en.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
date: 2016-04-09T16:50:16+02:00
title: Menu extra shortcuts
weight: 25
---
+++
title = "Menu extra shortcuts"
weight = 25
+++

You can define additional menu entries or shortcuts in the navigation menu without any link to content.

Expand Down
15 changes: 7 additions & 8 deletions exampleSite/content/cont/pages/_index.en.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
date: 2016-04-09T16:50:16+02:00
title: Pages organization
weight: 5
---
+++
title = "Pages organization"
weight = 5
+++

In **Hugo**, pages are the core of your site. Once it is configured, pages are definitely the added value to your documentation site.

Expand Down Expand Up @@ -51,10 +50,10 @@ You can define any HTML as prefix for the menu. In the example below, it's just

```markdown
+++
title = "Basics"
chapter = true
weight = 5
pre = "<b>1. </b>"
title = "Basics"
weight = 5
+++

### Chapter 1
Expand Down Expand Up @@ -91,7 +90,7 @@ hugo new site <new_project>

## Front Matter configuration

Each Hugo page has to define a [Front Matter](https://gohugo.io/content/front-matter/) in *yaml*, *toml* or *json*.
Each Hugo page has to define a [Front Matter](https://gohugo.io/content/front-matter/) in *toml*, *yaml* or *json*. This site will use *toml* in all cases.

**Hugo-theme-relearn** uses the following parameters on top of Hugo ones :

Expand Down
9 changes: 4 additions & 5 deletions exampleSite/content/cont/syntaxhighlight.en.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
date: 2020-06-01T13:31:12+01:00
title: Code highlighting
weight: 16
---
+++
title = "Code highlighting"
weight = 16
+++

Relearn theme uses [Hugo's built-in syntax highlighting](https://gohugo.io/content-management/syntax-highlighting/) for code.

Expand Down
24 changes: 11 additions & 13 deletions exampleSite/content/cont/tags.en.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
---
date: 2018-11-29T08:41:44+01:00
title: Tags
weight: 40
tags: ["documentation", "tutorial"]
---
+++
tags = ["documentation", "tutorial"]
title = "Tags"
weight = 40
+++

*Relearn theme* supports one default taxonomy of Hugo: the *tag* feature.

## Configuration

Just add tags to any page:

```markdown
---
date: 2018-11-29T08:41:44+01:00
title: Theme tutorial
weight: 15
tags: ["tutorial", "theme"]
---
```toml
+++
tags = ["tutorial", "theme"]
title = "Theme tutorial"
weight = 15
+++
```

## Behavior
Expand Down
8 changes: 4 additions & 4 deletions exampleSite/content/credits.en.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Credits
disableToc: true
---
+++
disableToc = true
title = "Credits"
+++

## Contributors

Expand Down
11 changes: 5 additions & 6 deletions exampleSite/content/shortcodes/_index.en.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
date: 2016-04-09T16:50:16+02:00
title: Shortcodes
pre: "<b>3. </b>"
weight: 15
---
+++
pre = "<b>3. </b>"
title = "Shortcodes"
weight = 15
+++

Hugo uses Markdown for its simple content format. However, there are a lot of things that Markdown doesn’t support well. You could use pure HTML to expand possibilities.

Expand Down
8 changes: 4 additions & 4 deletions exampleSite/content/shortcodes/attachments.en.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Attachments
description : "The Attachments shortcode displays a list of files attached to a page."
---
+++
description = "The Attachments shortcode displays a list of files attached to a page."
title = "Attachments"
+++

The Attachments shortcode displays a list of files attached to a page.

Expand Down
8 changes: 4 additions & 4 deletions exampleSite/content/shortcodes/button.en.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Button
description : "Nice buttons on your page."
---
+++
description = "Nice buttons on your page."
title = "Button"
+++

A button is a just a clickable button with optional icon.

Expand Down
10 changes: 5 additions & 5 deletions exampleSite/content/shortcodes/children/_index.en.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title : Children
description : List the child pages of a page
alwaysopen : false
---
+++
alwaysopen = false
description = "List the child pages of a page"
title = "Children"
+++

Use the children shortcode to list the child pages of a page and the further descendants (children's children). By default, the shortcode displays links to the child pages.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "page 1"
description = "This is a demo child page"
alwaysopen = false
description = "This is a demo child page"
title = "page 1"
+++

This is a demo child page
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
title = "page 1-1"
description = "This is a demo child page"
title = "page 1-1"
+++

This is a demo child page
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
title = "page 1-1-1"
description = "This is a demo child page"
title = "page 1-1-1"
+++

This is a demo child page
Loading

0 comments on commit 15cfc82

Please sign in to comment.