Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
1 change: 0 additions & 1 deletion config/production/config.toml

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion content/en/docs/0.9/advanced-settings/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The other two sections of interest are `devDependencies` and `otherDependencies`

## Mounted folders

Hugo supports the [mounting of folders]({{< param "links.hugo_mounts" >}}) since version 0.56.0. Hinode takes advantage of this feature to create a virtual file system, combining assets from multiple sources. For example, the below section of the `/config/_default/config.toml` instructs Hugo to make Bootstrap's JavaScript distribution file `/node_modules/bootstrap/dist/js` available in the `/assets/js` folder. This file is then bundled with the JavaScript files defined in the `/assets/js` folder of Hinode.
Hugo supports the [mounting of folders]({{< param "links.hugo_mounts" >}}) since version 0.56.0. Hinode takes advantage of this feature to create a virtual file system, combining assets from multiple sources. For example, the below section of the `/config/_default/hugo.toml` instructs Hugo to make Bootstrap's JavaScript distribution file `/node_modules/bootstrap/dist/js` available in the `/assets/js` folder. This file is then bundled with the JavaScript files defined in the `/assets/js` folder of Hinode.

{{< alert color="primary" >}}
When you add a mount, the default mount for the concerned target root is ignored: be sure to explicitly add it.
Expand Down
6 changes: 3 additions & 3 deletions content/en/docs/0.9/advanced-settings/scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Hinodes uses npm and mounted folders to create a flexibile virtual file system t

2. **Mount the JavaScript files maintained within a node package**

Make JavaScripts defined in node packages available by mounting them into the `assets/js/vendor` folder. Define the mount points in `config/_default/config.toml`.
Make JavaScripts defined in node packages available by mounting them into the `assets/js/vendor` folder. Define the mount points in `config/_default/hugo.toml`.

3. **Bundle the JavaScript files**

Expand Down Expand Up @@ -56,6 +56,6 @@ Hinode considers all files placed in the `assets/js/critical` folder as critical

## Example

Mount the external JavaScript files to Hugo's virtual file system within the file `config/_default/config.toml`. The current configuration imports the relevant files of [Bootstrap]({{< param "links.bootstrap" >}}) and [FlexSearch]({{< param "links.flexsearch" >}}).
Mount the external JavaScript files to Hugo's virtual file system within the file `config/_default/hugo.toml`. The current configuration imports the relevant files of [Bootstrap]({{< param "links.bootstrap" >}}) and [FlexSearch]({{< param "links.flexsearch" >}}).

{{< docs name="javascript" file="config/_default/config.toml" >}}
{{< docs name="javascript" file="config/_default/hugo.toml" >}}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Hugo supports [client-side redirection using aliases]({{< param "links.hugo_alia

Hinode has defined a template in [layouts/index.redir]({{< param "links.repository_redir" >}}) to automatically generate server-side redirection rules for **Netlify**. When you add the status code `200` to such a rule, the [redirection becomes a rewrite]({{< param "links.netlify_rewrite" >}}). In a **rewrite**, the URL in the visitor's address bar remains the same, while the content is fetched from a different location behind the scenes. We will use this mechanism to fetch the content from the branch site.

The below settings creates a file `public/_redirects` when building the site. It is suggested to add these settings to your **production configuration** in `config/production/config.toml`. The setting `disableAliases` disables all client-side redirection rules. Instead, the `REDIR` output generates all redirection rules for the server, including rewrites.
The below settings creates a file `public/_redirects` when building the site. It is suggested to add these settings to your **production configuration** in `config/production/hugo.toml`. The setting `disableAliases` disables all client-side redirection rules. Instead, the `REDIR` output generates all redirection rules for the server, including rewrites.

```toml
disableAliases = true
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/0.9/configuration/analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ layout: docs

## Configuration

Hinode supports Google Universal Analytics and Google Analytics 4 out-of-the-box. Simply add your Google property (starting with `G-` or `UA-`) to the main configuration in `config/_default/config.toml`.
Hinode supports Google Universal Analytics and Google Analytics 4 out-of-the-box. Simply add your Google property (starting with `G-` or `UA-`) to the main configuration in `config/_default/hugo.toml`.

{{< alert >}}
Google has deprecrated Universal Analytics in favor of Google Analytics 4. On July 1, 2023, standard Universal Analytics properties will no longer process data. 360 Universal Analytics properties will receive a one-time processing extension ending on July 1, 2024.
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/0.9/configuration/languages.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Define the languages available to your site in the main site configuration. The

{{< docs name="lang-main" file="config/_default/languages.toml" >}}

The default behavior is set in `config/_default/config.toml`. For example, you can set the `defaultContentLanguageInSubdir` to `false` to remove the language slug `/en` from your site entirely.
The default behavior is set in `config/_default/hugo.toml`. For example, you can set the `defaultContentLanguageInSubdir` to `false` to remove the language slug `/en` from your site entirely.

{{< docs name="language" file="config/_default/config.toml" >}}
{{< docs name="language" file="config/_default/hugo.toml" >}}

## Content translation

Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/0.9/configuration/layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ The base layout uses the [main configuration]({{< param "links.hugo_config" >}})
| enableGitInfo | - | Enables git information, which is used by [documentation pages]({{< relref "content-management#documentation-layout" >}}). |
{{< /table >}}

The below configuration shows the default configuration set in `config/_default/config.toml`.
The below configuration shows the default configuration set in `config/_default/hugo.toml`.

{{< docs name="main" file="config/_default/config.toml" >}}
{{< docs name="main" file="config/_default/hugo.toml" >}}

#### Extended configuration

Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/0.9/getting-started/hosting-and-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Before deciding on your hosting and deployment approach, review the following co

2. **Configure the build timeout**

You might encounter timeout errors when you generate a large site that contains many resources (such as images). Adjust the `timout` in `config/_default/config.toml` as needed.
You might encounter timeout errors when you generate a large site that contains many resources (such as images). Adjust the `timout` in `config/_default/hugo.toml` as needed.

{{< docs name="timeout" file="config/_default/config.toml" >}}
{{< docs name="timeout" file="config/_default/hugo.toml" >}}

3. **Consider using build automation**

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/0.9/getting-started/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ The main site configuration is available in `./config/_default`. Review the foll
Set the `themeFont` and `themeFontPath` in the `style` section of `/config/_default/params.toml` to adjust the main font. Hinode includes supports for [Emoji]({{< relref "typography#emoji" >}}) by default. Review the [fonts documentation]({{< relref "fonts" >}}) for more details.
{{< /accordion-item >}}
{{< accordion-item header="Configure the supported languages">}}
Configure each supported language in `config/_default/languages.toml`. Set the default behavior in `config/_default/config.toml`. Review the [languages documentation]({{< relref "languages" >}}) for more details.
Configure each supported language in `config/_default/languages.toml`. Set the default behavior in `config/_default/hugo.toml`. Review the [languages documentation]({{< relref "languages" >}}) for more details.
{{< /accordion-item >}}
{{< accordion-item header="Define the main menu" >}}
Define the main menu entries for each language in `config/_default/menus`. For example, the English menu entries are defined in `menus.en.toml`. See the [navigation documentation]({{< relref "navigation" >}}) for more details.
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/0.9/getting-started/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Review the table below for some common issues and their potential cause. Please

**The stylesheet refers to the incorrect location**

Be sure to update the `baseURL` in `config/_default/config.toml`.
Be sure to update the `baseURL` in `config/_default/hugo.toml`.

**The certificate of your website has expired or is not set up correctly**

Expand Down
2 changes: 1 addition & 1 deletion content/en/guides/optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Hinode uses <abbr title="Sassy Cascading Style Sheets">SCSS files</abbr> as part

Next, we will need to ensure the `writeStats` setting is set to true also:

{{< docs name="build" file="config/_default/config.toml" >}}
{{< docs name="build" file="config/_default/hugo.toml" >}}

This Hugo setting generates a file `hugo_stats.json` in the repository root. The file is generated once all content files and static files have been processed by Hugo. It provides a list of HTML elements such as tags, classes, and IDs used by your site.

Expand Down
2 changes: 1 addition & 1 deletion content/en/guides/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ npm i -D leaflet

### Mounting the library to the assets folder

Using Hugo's module mounts, Hinode bundles all JavaScript files found in the `assets/js` folder into a single file. Add a link to Leaflet's core JavaScript file to include it in your project's JavaScript bundle. Add the below configuration to `config/_default/config.toml` to mount the file `leaflet.js`.
Using Hugo's module mounts, Hinode bundles all JavaScript files found in the `assets/js` folder into a single file. Add a link to Leaflet's core JavaScript file to include it in your project's JavaScript bundle. Add the below configuration to `config/_default/hugo.toml` to mount the file `leaflet.js`.

```toml
[[module.mounts]]
Expand Down
14 changes: 7 additions & 7 deletions content/en/guides/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ For the purpose of this guide we will support the English language only. Be sure
- Remove the folder `content/nl` and its nested content
- Remove the entire `[nl]` section in `config/_default/languages.toml`
- Remove the file `menus.nl.toml` section in `config/_default/menus`
- Set the value `defaultContentLanguageInSubdir` to `false` in `config/_default/config.toml`
- Set the value `defaultContentLanguageInSubdir` to `false` in `config/_default/hugo.toml`

Start a local server to test the site is working as expected. Navigate in your browser to the local address (`http://localhost:1313/` by default) to visually inspect the site.

Expand Down Expand Up @@ -157,7 +157,7 @@ Check if your site is working correctly. You may need to restart your local serv

### Deploying the current branch

We will now deploy and publish the main branch with Netlify. For the deployment to be successful, you will need to specify the `baseURL` in `config/_default/config.toml`. The Hinode template defines a default value that you will need to replace. You can use a domain that you own, or use a domain provided by Netlify (such as `{sitename}.netlify.app/`). If you do not know the sitename or domain name yet, you can go ahead with the deployment and come back to this step later - you will need to redeploy the site though.
We will now deploy and publish the main branch with Netlify. For the deployment to be successful, you will need to specify the `baseURL` in `config/_default/hugo.toml`. The Hinode template defines a default value that you will need to replace. You can use a domain that you own, or use a domain provided by Netlify (such as `{sitename}.netlify.app/`). If you do not know the sitename or domain name yet, you can go ahead with the deployment and come back to this step later - you will need to redeploy the site though.

```toml
baseURL = "https://template.gethinode.com/" # replace this
Expand All @@ -181,7 +181,7 @@ The approach with various version folders in the same repository might be adequa
[Mounting a content folder overrides the language-specific settings]({{< param "links.hugo_mounts" >}}). In our configuration we have set `defaultContentLanguage` to `en` and `defaultContentLanguageInSubdir` to `false`. We will need to manually refine our mounts to achieve the same behavior.
{{< /alert >}}

Add the following mount to `config/_default/config.toml` to map the `latest` folder to `0.9`. We will keep the remaining content within the `docs` folder as is.
Add the following mount to `config/_default/hugo.toml` to map the `latest` folder to `0.9`. We will keep the remaining content within the `docs` folder as is.

```toml
[[module.mounts]]
Expand Down Expand Up @@ -217,9 +217,9 @@ And finally, we will replace the `label` and `url` for the latest release in `co

### Configure the multi-branch deployment

We will deploy the `v0.9` branch on a separate subdomain with a so-called multi-branch deployment. By default, Netlify publishes the `main` branch only, along with any previews. We can instruct Netlify to deploy an additional branch, such as `v0.9`. Netlify uses the branch name followed by two hyphens and your internal Netlify subdomain. We will use this pattern as our baseURL in `config/_default/config.toml`.
We will deploy the `v0.9` branch on a separate subdomain with a so-called multi-branch deployment. By default, Netlify publishes the `main` branch only, along with any previews. We can instruct Netlify to deploy an additional branch, such as `v0.9`. Netlify uses the branch name followed by two hyphens and your internal Netlify subdomain. We will use this pattern as our baseURL in `config/_default/hugo.toml`.

Update the baseURL of `config.toml` in your `v0.9` branch, replacing `{branch}` and `{sitename}` with the correct values. Commit the changes to your branch when done.
Update the baseURL of `hugo.toml` in your `v0.9` branch, replacing `{branch}` and `{sitename}` with the correct values. Commit the changes to your branch when done.

```toml
baseURL = "https://{branch}--{sitename}.netlify.app/"
Expand Down Expand Up @@ -251,7 +251,7 @@ Hugo supports [client-side redirection using aliases]({{< param "links.hugo_alia

Hinode has defined a template in [layouts/index.redir]({{< param "links.repository_redir" >}}) to automatically generate server-side redirection rules for Netlify. When you add the status code `200` to such a rule, the [redirection becomes a rewrite]({{< param "links.netlify_rewrite" >}}). In a **rewrite**, the URL in the visitor's address bar remains the same, while the content is fetched from a different location behind the scenes. We will use this mechanism to fetch the content from the branch site.

Go back to your **develop branch** and add the below code to your **production configuration** in `config/production/config.toml`. The setting `disableAliases` disables all client-side redirection rules. Instead, the `REDIR` output generates all redirection rules for the server, including rewrites.
Go back to your **develop branch** and add the below code to your **production configuration** in `config/production/hugo.toml`. The setting `disableAliases` disables all client-side redirection rules. Instead, the `REDIR` output generates all redirection rules for the server, including rewrites.

```toml
disableAliases = true
Expand Down Expand Up @@ -324,7 +324,7 @@ You can add an alert to inform your users that they are not looking at the lates

### Exposing the latest release as 1.0

Similar to the `v0.9` release, you can can expose the latest release as a specific version too. In the **develop branch**, add the following mounts to `config/_default/config.toml`:
Similar to the `v0.9` release, you can can expose the latest release as a specific version too. In the **develop branch**, add the following mounts to `config/_default/hugo.toml`:

```toml
[[module.mounts]]
Expand Down
4 changes: 2 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
functions = "functions"

[build.environment]
NODE_VERSION = "18.13.0"
NPM_VERSION = "8.19.3"
NODE_VERSION = "18.16.1"
NPM_VERSION = "9.5.1"

[context.production]
command = "npm run build"
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"devDependencies": {
"@fortawesome/fontawesome-free": "^6.4.0",
"@fullhuman/postcss-purgecss": "^5.0.0",
"@gethinode/hinode": "^0.15.0",
"@gethinode/hinode": "^0.15.1",
"autoprefixer": "^10.4.14",
"bootstrap": "^5.3.0",
"cssnano": "^6.0.1",
Expand Down