Skip to content

Commit

Permalink
Merge branch 'deining-bring-up-to-date'
Browse files Browse the repository at this point in the history
  • Loading branch information
thingsym committed Mar 13, 2024
2 parents ea1682d + be5dd4a commit d0bd2d8
Show file tree
Hide file tree
Showing 15 changed files with 47 additions and 45 deletions.
File renamed without changes.
10 changes: 5 additions & 5 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish demo site to Github Pages
name: Publish demo site to GitHub Pages

on:
push:
Expand All @@ -11,23 +11,23 @@ jobs:
timeout-minutes: 30

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.101.0'
hugo-version: '0.121.2'
extended: true

- name: Build demo website to public directory
run: |
cd ./exampleSite
hugo --config ../.github/demo_config.toml --themesDir ../.. --minify
hugo --config ../.github/demo_hugo.toml --themesDir ../.. --minify
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./exampleSite/public
commit_message: 'deploy to GitHub Pages via GitHub Actions'
commit_message: 'Deploy to GitHub Pages via GitHub Actions'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.DS_Store
node_modules
public
.hugo_build.lock
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ git clone https://github.com/thingsym/hugo-theme-techdoc.git

### Configure

You may specify options in config.toml (or config.yaml/config.json) of your site to make use of this theme's features.
You may specify options in hugo.toml (or hugo.yaml/hugo.json) of your site to make use of this theme's features.

For an example of `config.toml`, [config.toml](https://github.com/thingsym/hugo-theme-techdoc/blob/master/exampleSite/config.toml) in exampleSite.
For an example of `hugo.toml`, [hugo.toml](https://github.com/thingsym/hugo-theme-techdoc/blob/master/exampleSite/hugo.toml) in exampleSite.

### Update Hugo theme for git submodule

Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/chapter3/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ weight: 40
---

{{% panel status="primary" title="Note" icon="far fa-lightbulb" %}}
The document hierarchy is unlimite.
The document hierarchy is unlimited.
{{% /panel %}}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
2 changes: 1 addition & 1 deletion exampleSite/content/chapter4/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ weight: 50
---

{{% panel status="primary" title="Note" icon="far fa-lightbulb" %}}
The document hierarchy is unlimite.
The document hierarchy is unlimited.
It also means that the menu levels is unlimited levels.

The menu levels has up to 5 levels of indentation. After that there is no indentation.
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ Download Hugo theme, configure, preview site ...

## [Configuration](./configuration)

You may specify options in config.toml (or config.yaml/config.json) of your site to make use of this theme's features.
You may specify options in hugo.toml (or hugo.yaml/hugo.json) of your site to make use of this theme's features.

## [Screenshot](./screenshot)
4 changes: 2 additions & 2 deletions exampleSite/content/getting-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ draft: false
weight: 20
---

You may specify options in config.toml (or config.yaml/config.json) of your site to make use of this theme’s features.
You may specify options in hugo.toml (or hugo.yaml/hugo.json) of your site to make use of this theme’s features.

For an example of `config.toml`, see [config.toml](https://github.com/thingsym/hugo-theme-techdoc/blob/master/exampleSite/config.toml) in exampleSite.
For an example of `hugo.toml`, see [hugo.toml](https://github.com/thingsym/hugo-theme-techdoc/blob/master/exampleSite/hugo.toml) in exampleSite.

## Params

Expand Down
4 changes: 2 additions & 2 deletions exampleSite/content/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ git clone https://github.com/thingsym/hugo-theme-techdoc.git

## Configure

You may specify options in config.toml (or config.yaml/config.json) of your site to make use of this theme's features.
You may specify options in hugo.toml (or hugo.yaml/hugo.json) of your site to make use of this theme's features.

For an example of `config.toml`, see [config.toml](https://github.com/thingsym/hugo-theme-techdoc/blob/master/exampleSite/config.toml) in exampleSite.
For an example of `hugo.toml`, see [hugo.toml](https://github.com/thingsym/hugo-theme-techdoc/blob/master/exampleSite/hugo.toml) in exampleSite.

See [the Configuration documentation](../configuration/).

Expand Down
36 changes: 18 additions & 18 deletions exampleSite/content/post/creating-a-new-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ total 8
drwxr-xr-x 7 quoha staff 238 Sep 29 16:49 .
drwxr-xr-x 3 quoha staff 102 Sep 29 16:49 ..
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes
-rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml
-rw-r--r-- 1 quoha staff 82 Sep 29 16:49 hugo.toml
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static
Expand All @@ -146,7 +146,7 @@ Running the `hugo` command with no options will read all the available content a

```
$ hugo --verbose
INFO: 2014/09/29 Using config file: config.toml
INFO: 2014/09/29 Using config file: hugo.toml
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
WARN: 2014/09/29 Unable to locate layout: [404.html]
Expand All @@ -167,7 +167,7 @@ We can verify that the command worked by looking at the directory again.
$ ls -l
total 8
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes
-rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml
-rw-r--r-- 1 quoha staff 82 Sep 29 16:49 hugo.toml
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts
drwxr-xr-x 4 quoha staff 136 Sep 29 17:02 public
Expand Down Expand Up @@ -195,7 +195,7 @@ Verify that you can run the built-in web server. It will dramatically shorten yo

```
$ hugo server --verbose
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/hugo.toml
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
WARN: 2014/09/29 Unable to locate layout: [404.html]
Expand Down Expand Up @@ -253,7 +253,7 @@ $ hugo new theme zafta
$ ls -l
total 8
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes
-rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml
-rw-r--r-- 1 quoha staff 82 Sep 29 16:49 hugo.toml
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts
drwxr-xr-x 4 quoha staff 136 Sep 29 17:02 public
Expand Down Expand Up @@ -311,7 +311,7 @@ Now that we've got a theme to work with, it's a good idea to add the theme name
Edit the file to add the theme, add a title for the site, and specify that all of our content will use the TOML format.

```
$ vi config.toml
$ vi hugo.toml
theme = "zafta"
baseurl = ""
languageCode = "en-us"
Expand All @@ -328,7 +328,7 @@ Now that we have an empty theme, let's generate the site again.

```
$ hugo --verbose
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/hugo.toml
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
Expand Down Expand Up @@ -450,7 +450,7 @@ Here's sample output showing Hugo detecting a change to the template for the hom
```
$ rm -rf public
$ hugo server --watch --verbose
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/hugo.toml
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
Expand Down Expand Up @@ -507,7 +507,7 @@ Build the web site and then verify the results.

```
$ hugo --verbose
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/hugo.toml
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
Expand Down Expand Up @@ -560,7 +560,7 @@ Hugo has a command to generate a skeleton post, just like it does for sites and

```
$ hugo --verbose new post/first.md
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/hugo.toml
INFO: 2014/09/29 attempting to create post/first.md of post
INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/default.md
ERROR: 2014/09/29 Unable to Cast <nil> to map[string]interface{}
Expand All @@ -586,14 +586,14 @@ $ find themes/zafta/archetypes -type f | xargs ls -l
-rw-r--r-- 1 quoha staff 51 Sep 29 21:54 themes/zafta/archetypes/post.md
$ hugo --verbose new post/first.md
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/hugo.toml
INFO: 2014/09/29 attempting to create post/first.md of post
INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/post.md
INFO: 2014/09/29 creating /Users/quoha/Sites/zafta/content/post/first.md
/Users/quoha/Sites/zafta/content/post/first.md created
$ hugo --verbose new post/second.md
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/hugo.toml
INFO: 2014/09/29 attempting to create post/second.md of post
INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/post.md
INFO: 2014/09/29 creating /Users/quoha/Sites/zafta/content/post/second.md
Expand Down Expand Up @@ -634,7 +634,7 @@ Build the web site and then verify the results.
```
$ rm -rf public
$ hugo --verbose
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/hugo.toml
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 found taxonomies: map[string]string{"category":"categories", "tag":"tags"}
Expand Down Expand Up @@ -707,7 +707,7 @@ Build the web site and then verify the results.
```
$ rm -rf public
$ hugo --verbose
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/hugo.toml
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 found taxonomies: map[string]string{"tag":"tags", "category":"categories"}
Expand Down Expand Up @@ -784,7 +784,7 @@ Build the web site and verify the results.
```
$ rm -rf public
$ hugo --verbose
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/hugo.toml
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 found taxonomies: map[string]string{"tag":"tags", "category":"categories"}
Expand Down Expand Up @@ -853,7 +853,7 @@ Build the web site and verify the results.
```
$ rm -rf public
$ hugo --verbose
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/hugo.toml
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 found taxonomies: map[string]string{"tag":"tags", "category":"categories"}
Expand Down Expand Up @@ -992,7 +992,7 @@ $ find public -name '*.html' | xargs ls -l
Knowing that hugo is using the slug to generate the file name, the simplest solution is to change the slug. Let's do it the hard way and change the permalink in the configuration file.

```
$ vi config.toml
$ vi hugo.toml
[permalinks]
page = "/:title/"
about = "/:filename/"
Expand Down Expand Up @@ -1063,7 +1063,7 @@ $ vi themes/zafta/layouts/index.html
:wq
```

Generate the web site and verify the results. The title on the home page is now "your title here", which comes from the "title" variable in the config.toml file.
Generate the web site and verify the results. The title on the home page is now "your title here", which comes from the "title" variable in the hugo.toml file.

### Update the Default Single Template to Use the Partials

Expand Down
6 changes: 3 additions & 3 deletions exampleSite/content/post/goisforlovers.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Accessing the Page Parameter "bar"
Each Go template has a struct (object) made available to it. In hugo each
template is passed either a page or a node struct depending on which type of
page you are rendering. More details are available on the
[variables](/layout/variables) page.
[variables](https://gohugo.io/quick-reference/methods/) page.

A variable is accessed by referencing the variable name.

Expand All @@ -86,7 +86,7 @@ Variables can also be defined and referenced.
Go template ship with a few functions which provide basic functionality. The Go
template system also provides a mechanism for applications to extend the
available functions with their own. [Hugo template
functions](/layout/functions) provide some additional functionality we believe
functions](https://gohugo.io/functions/templates/) provide some additional functionality we believe
are useful for building websites. Functions are called by using their name
followed by the required parameters separated by spaces. Template
functions cannot be added without recompiling hugo.
Expand Down Expand Up @@ -259,7 +259,7 @@ you want to inside of your templates.
## Using Content (page) Parameters

In each piece of content you can provide variables to be used by the
templates. This happens in the [front matter](/content/front-matter).
templates. This happens in the [front matter](https://gohugo.io/content-management/front-matter/).

An example of this is used in this documentation site. Most of the pages
benefit from having the table of contents provided. Sometimes the TOC just
Expand Down
4 changes: 2 additions & 2 deletions exampleSite/content/post/hugoisforlovers.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ you are reading right now.

Follow the following steps:

1. Clone the [Hugo repository](http://github.com/spf13/hugo)
1. Clone the [Hugo repository](https://github.com/gohugoio/hugo)
2. Go into the repo
3. Run hugo in server mode and build the docs
4. Open your browser to http://localhost:1313
Expand Down Expand Up @@ -64,7 +64,7 @@ Now we are going to run hugo again, but this time with hugo in watch mode.
> Press ctrl+c to stop


Open your [favorite editor](http://vim.spf13.com) and change one of the source
Open your [favorite editor](https://vim.spf13.com) and change one of the source
content pages. How about changing this very file to *fix the typo*. How about changing this very file to *fix the typo*.

Content files are found in `docs/content/`. Unless otherwise specified, files
Expand Down
Loading

0 comments on commit d0bd2d8

Please sign in to comment.