diff --git a/docs/en-US/howto/customize-templates.md b/docs/en-US/howto/customize-templates.md index b711348..975291f 100644 --- a/docs/en-US/howto/customize-templates.md +++ b/docs/en-US/howto/customize-templates.md @@ -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. @@ -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: diff --git a/docs/en-US/howto/set-up-documentation.md b/docs/en-US/howto/set-up-documentation.md index 62a3a69..9cf27e4 100644 --- a/docs/en-US/howto/set-up-documentation.md +++ b/docs/en-US/howto/set-up-documentation.md @@ -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: diff --git a/docs/en-US/howto/use-extensions.md b/docs/en-US/howto/use-extensions.md index 4657707..17c58e4 100644 --- a/docs/en-US/howto/use-extensions.md +++ b/docs/en-US/howto/use-extensions.md @@ -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] diff --git a/docs/en-US/howto/write-document.md b/docs/en-US/howto/write-document.md index 783765e..159ed6a 100644 --- a/docs/en-US/howto/write-document.md +++ b/docs/en-US/howto/write-document.md @@ -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: @@ -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 diff --git a/docs/zh-CN/howto/use-extensions.md b/docs/zh-CN/howto/use-extensions.md index 045c438..e6d765e 100644 --- a/docs/zh-CN/howto/use-extensions.md +++ b/docs/zh-CN/howto/use-extensions.md @@ -4,9 +4,9 @@ title: 使用扩展 每个 _**一魂文档**_ 服务器都提供了一些极其便捷的内置扩展。 -## Plausbile +## Plausible -Plausbile 扩展用于集成 https://plausible.io/,可以通过如下配置启用: +Plausible 扩展用于集成 https://plausible.io/,可以通过如下配置启用: ```ini [extension.plausible]