Skip to content

Commit

Permalink
chore: fix typos (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
deining authored Jan 1, 2025
1 parent 5ab93d2 commit 7708543
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions docs/en-US/howto/customize-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Customize templates
---

Every [template file](set-up-documentation.md#template-files) can be customized through overwrite, and custom template files should be placed under the `custom/templates` directory (the path of direcotry can be changed via `[page] CUSTOM_DIRECTORY`).
Every [template file](set-up-documentation.md#template-files) can be customized through overwrite, and custom template files should be placed under the `custom/templates` directory (the path of directory can be changed via `[page] CUSTOM_DIRECTORY`).

It is only recommended to customize the `home.html` and `common/navbar.html` files to maintain the maximum backward compatibility.

Expand All @@ -14,13 +14,13 @@ However, it is not required to use Tailwind CSS as you have all the freedom to u

## Localization

The Flamego's [i18n](https://flamego.dev/middleware/i18n.html) middleware is used to handle localization, create locale files under the `custom/locale` directory (the path of direcotry can be changed via `[i18n] CUSTOM_DIRECTORY`) to customize [localization configuration](set-up-documentation.md#localization-configuration).
The Flamego's [i18n](https://flamego.dev/middleware/i18n.html) middleware is used to handle localization, create locale files under the `custom/locale` directory (the path of directory can be changed via `[i18n] CUSTOM_DIRECTORY`) to customize [localization configuration](set-up-documentation.md#localization-configuration).

The syntax for invoking localization function in template files looks like `{{call .Tr "footer::copyright"}}`, where `footer` is the section name and `copyright` is the key name.

## Static assets

Custom static assets should be placed under the `custom/public` directory (the path of direcotry can be changed via `[asset] CUSTOM_DIRECTORY`), then include them in your template file.
Custom static assets should be placed under the `custom/public` directory (the path of directory can be changed via `[asset] CUSTOM_DIRECTORY`), then include them in your template file.

For example, suppose you have a custom static asset in the path `custom/public/css/my.css`, then add the following line in your `custom/common/head.tmpl` file:

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/howto/set-up-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ LANGUAGES = en-US,zh-CN
NAMES = English,简体中文
```

The first language in the `LANGUAGES` is considered as the default language, and the server shows its content if the prefered language (from browser's `Accept-Language` request header) does not exists, or the particular document is not available in the prefered language (but available in the default language).
The first language in the `LANGUAGES` is considered as the default language, and the server shows its content if the preferred language (from browser's `Accept-Language` request header) does not exists, or the particular document is not available in the preferred language (but available in the default language).

If you are just writing documentation in English, you would need to overwrite the configuration as follows:

Expand Down
4 changes: 2 additions & 2 deletions docs/en-US/howto/use-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ title: Use extensions

Every _**ASoulDocs**_ server comes with some builtin extensions, it's just few edits away to use them!

## Plausbile
## Plausible

The Plausbile extension integrates with https://plausible.io/, it is disabled by default. Use the following configuration to enable it:
The Plausible extension integrates with https://plausible.io/, it is disabled by default. Use the following configuration to enable it:

```ini
[extension.plausible]
Expand Down
4 changes: 2 additions & 2 deletions docs/en-US/howto/write-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Links to other documents or images just works like you would do in any editor (e

The [alecthomas/chroma](https://github.com/alecthomas/chroma) is used to syntax highlighting your code blocks.

Use name from its [supported languages](https://github.com/alecthomas/chroma#supported-languages) to specify the language of the code block, be sure to replace whitespaces with hyphenes (`-`) in the language name, e.g. use `go-html-template` not `go html template` (names are case insensitive).
Use name from its [supported languages](https://github.com/alecthomas/chroma#supported-languages) to specify the language of the code block, be sure to replace whitespaces with hyphens (`-`) in the language name, e.g. use `go-html-template` not `go html template` (names are case insensitive).

To enable line numbers and highlighting lines:

Expand All @@ -56,7 +56,7 @@ To enable line numbers and highlighting lines:

### Render caching

Each documents is reloaded and re-rendered for every request if the server is running with `dev` envrionment, as defined in the [configuration file](set-up-documentation.md#configuration-file):
Each documents is reloaded and re-rendered for every request if the server is running with `dev` environment, as defined in the [configuration file](set-up-documentation.md#configuration-file):

```ini
ENV = dev
Expand Down
4 changes: 2 additions & 2 deletions docs/zh-CN/howto/use-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ title: 使用扩展

每个 _**一魂文档**_ 服务器都提供了一些极其便捷的内置扩展。

## Plausbile
## Plausible

Plausbile 扩展用于集成 https://plausible.io/,可以通过如下配置启用:
Plausible 扩展用于集成 https://plausible.io/,可以通过如下配置启用:

```ini
[extension.plausible]
Expand Down

0 comments on commit 7708543

Please sign in to comment.