Skip to content

Commit

Permalink
docs(layout): mention effect of disabling layout (hexojs#1531)
Browse files Browse the repository at this point in the history
* docs(layout): mention effect of disabling layout

* docs(front-matter): tag plugins can be disabled

* docs(front-matter): 'excerpt' setting
  • Loading branch information
curbengh authored Nov 3, 2020
1 parent e770499 commit 78cda9e
Show file tree
Hide file tree
Showing 14 changed files with 71 additions and 19 deletions.
8 changes: 7 additions & 1 deletion source/docs/front-matter.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ date: 2013/7/13 20:46:25

Setting | Description | Default
--- | --- | ---
`layout` | Layout |
`layout` | Layout | [`config.default_layout`](/docs/configuration#Writing)
`title` | Title | Filename (posts only)
`date` | Published date | File created date
`updated` | Updated date | File updated date
Expand All @@ -36,6 +36,12 @@ Setting | Description | Default
`excerpt` | Page excerpt in plain text. Use [this plugin](/docs/tag-plugins#Post-Excerpt) to format the text |
`disableNunjucks` | Disable rendering of Nunjucks tag `{{ }}`/`{% %}` and [tag plugins](/docs/tag-plugins) when enabled

#### Layout

The default layout is `post`, in accordance to the value of [`default_layout`]((/docs/configuration#Writing)) setting in `_config.yml`. When the layout is disabled (`layout: false`) in an article, it will not be processed with a theme. However, it will still be rendered by any available renderer: if an article is written in Markdown and a Markdown renderer (like the default [hexo-renderer-marked](https://github.com/hexojs/hexo-renderer-marked)) is installed, it will be rendered to HTML.

[Tag plugins](/docs/tag-plugins) are always processed regardless of layout, unless disabled by the `disableNunjucks` setting or [renderer](/api/renderer#Disable-Nunjucks-tags).

#### Categories & Tags

Only posts support the use of categories and tags. Categories apply to posts in order, resulting in a hierarchy of classifications and sub-classifications. Tags are all defined on the same hierarchical level so the order in which they appear is not important.
Expand Down
4 changes: 2 additions & 2 deletions source/docs/writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Layout | Path
`page` | `source`
`draft` | `source/_drafts`

{% note tip Don't process my posts! %}
If you don't want your posts processed, you can set `layout: false` in front-matter.
{% note tip Disabling layout %}
If you don't want an article (post/page) to be processed with a theme, set `layout: false` in its front-matter. Refer to [this section](/docs/front-matter#Layout) for more details.
{% endnote %}

### Filename
Expand Down
9 changes: 8 additions & 1 deletion source/ko/docs/front-matter.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,23 @@ date: 2013/7/13 20:46:25

설정 | 설명 | 기본 값
--- | --- | ---
`layout` | 레이아웃 |
`layout` | 레이아웃 | [`config.default_layout`](/ko/docs/configuration#Writing)
`title` | 타이틀 | Filename (posts only)
`date` | 발행일 | 파일이 생성된 날짜
`updated` | 갱신일 | 파일이 업로드된 날짜
`comments` | 포스트에서 comment 기능을 사용할지 여부 | true
`tags` | 태그 (page에서는 사용 불가능) |
`categories` | 카테고리 (page에서는 사용 불가능) |
`permalink` | 포스트의 기본 permalink를 override합니다. |
`excerpt` | Page excerpt in plain text. Use [this plugin](/docs/tag-plugins#Post-Excerpt) to format the text |
`disableNunjucks` | Disable rendering of Nunjucks tag `{{ }}`/`{% %}` and [tag plugins](/docs/tag-plugins) when enabled

#### 레이아웃

The default layout is `post`, in accordance to the value of [`default_layout`]((/docs/configuration#Writing)) setting in `_config.yml`. When the layout is disabled (`layout: false`) in an article, it will not be processed with a theme. However, it will still be rendered by any available renderer: if an article is written in Markdown and a Markdown renderer (like the default [hexo-renderer-marked](https://github.com/hexojs/hexo-renderer-marked)) is installed, it will be rendered to HTML.

[Tag plugins](/docs/tag-plugins) are always processed regardless of layout, unless disabled by the `disableNunjucks` setting or [renderer](/api/renderer#Disable-Nunjucks-tags).

#### 카테고리와 태그

카테고리와 태그는 포스트에서만 사용이 가능합니다. 카테고리는 분류와 하위 분류의 계층적인 관계를 가지고 포스트에 적용됩니다. 태그는 모두 같은 계층 단계에 정의되어 있으므로 순서와 상관 없이 작성해도 됩니다.
Expand Down
4 changes: 2 additions & 2 deletions source/ko/docs/writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Hexo에는 세 개의 기본 레이아웃이 존재합니다. `post`, `page`, `d
`page` | `source`
`draft` | `source/_drafts`

{% note tip Don't process my posts! %}
당신의 post가 처리되는 것을 원치 않는다면 front-matter에 `layout: false`를 선언하면 됩니다.
{% note tip Disabling layout %}
If you don't want an article (post/page) to be processed with a theme, set `layout: false` in its front-matter. Refer to [this section](/ko/docs/front-matter#레이아웃) for more details.
{% endnote %}

### 파일명
Expand Down
9 changes: 8 additions & 1 deletion source/pt-br/docs/front-matter.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,23 @@ date: 2013/7/13 20:46:25

Configuração | Descrição | Padrão
--- | --- | ---
`layout` | Layout |
`layout` | Layout | [`config.default_layout`](/pt-br/docs/configuration#Escrita)
`title` | Título | Filename (posts only)
`date` | Data de publicação | Data de criação do arquivo
`updated` | Data de atualização | Data de atualização do arquivo
`comments` | Habilita o recurso de comentário para a postagem | true
`tags` | Tags (Não disponível para páginas) |
`categories` | Categorias (Não disponível para páginas) |
`permalink` | Substitui o permalink padrão da postagem |
`excerpt` | Page excerpt in plain text. Use [this plugin](/docs/tag-plugins#Post-Excerpt) to format the text |
`disableNunjucks` | Disable rendering of Nunjucks tag `{{ }}`/`{% %}` and [tag plugins](/docs/tag-plugins) when enabled

#### Layout

The default layout is `post`, in accordance to the value of [`default_layout`]((/docs/configuration#Writing)) setting in `_config.yml`. When the layout is disabled (`layout: false`) in an article, it will not be processed with a theme. However, it will still be rendered by any available renderer: if an article is written in Markdown and a Markdown renderer (like the default [hexo-renderer-marked](https://github.com/hexojs/hexo-renderer-marked)) is installed, it will be rendered to HTML.

[Tag plugins](/docs/tag-plugins) are always processed regardless of layout, unless disabled by the `disableNunjucks` setting or [renderer](/api/renderer#Disable-Nunjucks-tags).

#### Categorias & Tags

Somente postagens aceitam o uso de categorias e tags. As categorias aplicam-se à postagens em ordem, resultando em uma hierarquia de classificações e subclassificações. As tags são todas definidas no mesmo nível hierárquico, de modo que a ordem em que aparecem não é importante.
Expand Down
4 changes: 2 additions & 2 deletions source/pt-br/docs/writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Layout | Caminho
`page` | `source`
`draft` | `source/_drafts`

{% note tip Não processe minhas postagens! %}
Se você não quer que suas postagens sejam processadas, você pode definir `layout: false` no front-matter.
{% note tip Disabling layout %}
If you don't want an article (post/page) to be processed with a theme, set `layout: false` in its front-matter. Refer to [this section](/docs/front-matter#Layout) for more details.
{% endnote %}

### Nome de Arquivo
Expand Down
9 changes: 8 additions & 1 deletion source/ru/docs/front-matter.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,23 @@ date: 2013/7/13 20:46:25

Параметр | Описание | Значение по умолчанию
--- | --- | ---
`layout` | Макет |
`layout` | Макет | [`config.default_layout`](/ru/docs/configuration#Написание)
`title` | Заголовок | Filename (posts only)
`date` | Дата публикации | Дата создания файла
`updated` | Дата обновления | Дата обновления файла
`comments` | Включение поддержки комментариев в посте | true
`tags` | Теги (Недоступно для страниц) |
`categories` | Категории (Не доступно для страниц) |
`permalink` | Переопределяет ссылку по умолчанию |
`excerpt` | Page excerpt in plain text. Use [this plugin](/docs/tag-plugins#Post-Excerpt) to format the text |
`disableNunjucks` | Disable rendering of Nunjucks tag `{{ }}`/`{% %}` and [tag plugins](/docs/tag-plugins) when enabled

#### Макет

The default layout is `post`, in accordance to the value of [`default_layout`]((/docs/configuration#Writing)) setting in `_config.yml`. When the layout is disabled (`layout: false`) in an article, it will not be processed with a theme. However, it will still be rendered by any available renderer: if an article is written in Markdown and a Markdown renderer (like the default [hexo-renderer-marked](https://github.com/hexojs/hexo-renderer-marked)) is installed, it will be rendered to HTML.

[Tag plugins](/docs/tag-plugins) are always processed regardless of layout, unless disabled by the `disableNunjucks` setting or [renderer](/api/renderer#Disable-Nunjucks-tags).

#### Категории и теги

Только посты поддерживают использование категорий и тегов. Категории считываются в порядке их написания, в результате чего сохраняется иерархия классификации и подклассификации. Теги определены на одном иерархическом уровне, не важен порядок написания.
Expand Down
4 changes: 2 additions & 2 deletions source/ru/docs/writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ $ hexo new [layout] <title>
`page` | `source`
`draft` | `source/_drafts`

{% note tip Не обрабатывайте мои посты! %}
Если не хотите чтобы ваши посты обрабатывались, можно настроить макет: установив `layout: false` в заголовке страницы.
{% note tip Disabling layout %}
If you don't want an article (post/page) to be processed with a theme, set `layout: false` in its front-matter. Refer to [this section](/ru/docs/front-matter#Макет) for more details.
{% endnote %}

### Имя файла
Expand Down
9 changes: 8 additions & 1 deletion source/th/docs/front-matter.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,23 @@ date: 2013/7/13 20:46:25

Setting | Description | Default
--- | --- | ---
`layout` | Layout |
`layout` | Layout | [`config.default_layout`](/th/docs/configuration#Writing)
`title` | Title |
`date` | Published date | File created date
`updated` | Updated date | File updated date
`comments` | Enables comment feature for the post | true
`tags` | Tags (Not available for pages) |
`categories` | Categories (Not available for pages) |
`permalink` | Overrides the default permalink of the post |
`excerpt` | Page excerpt in plain text. Use [this plugin](/docs/tag-plugins#Post-Excerpt) to format the text |
`disableNunjucks` | Disable rendering of Nunjucks tag `{{ }}`/`{% %}` and [tag plugins](/docs/tag-plugins) when enabled

#### Layout

The default layout is `post`, in accordance to the value of [`default_layout`]((/docs/configuration#Writing)) setting in `_config.yml`. When the layout is disabled (`layout: false`) in an article, it will not be processed with a theme. However, it will still be rendered by any available renderer: if an article is written in Markdown and a Markdown renderer (like the default [hexo-renderer-marked](https://github.com/hexojs/hexo-renderer-marked)) is installed, it will be rendered to HTML.

[Tag plugins](/docs/tag-plugins) are always processed regardless of layout, unless disabled by the `disableNunjucks` setting or [renderer](/api/renderer#Disable-Nunjucks-tags).

#### Categories & Tags

มีแต่โพสต์เท่านั้นท่ีสนับสนุนการตั้งค่าแท็กและประเภท(category)
Expand Down
4 changes: 2 additions & 2 deletions source/th/docs/writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Layout | Path
`page` | `source`
`draft` | `source/_drafts`

{% note tip Don't process my posts! %}
ถ้าคุณไม่อยากทำให้โพสต์ของตนถูกจัดการ คุณสามารถตั้งค่าให้เป็น `layout: false`ใน front-matter
{% note tip Disabling layout %}
If you don't want an article (post/page) to be processed with a theme, set `layout: false` in its front-matter. Refer to [this section](/docs/front-matter#Layout) for more details.
{% endnote %}

### Filename
Expand Down
9 changes: 8 additions & 1 deletion source/zh-cn/docs/front-matter.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,23 @@ date: 2013/7/13 20:46:25

参数 | 描述 | 默认值
--- | --- | ---
`layout` | 布局 |
`layout` | 布局 | [`config.default_layout`](/zh-cn/docs/configuration#文章)
`title` | 标题 | 文章的文件名
`date` | 建立日期 | 文件建立日期
`updated` | 更新日期 | 文件更新日期
`comments` | 开启文章的评论功能 | true
`tags` | 标签(不适用于分页) |
`categories` | 分类(不适用于分页)|
`permalink` | 覆盖文章网址 |
`excerpt` | Page excerpt in plain text. Use [this plugin](/docs/tag-plugins#Post-Excerpt) to format the text |
`disableNunjucks` | Disable rendering of Nunjucks tag `{{ }}`/`{% %}` and [tag plugins](/docs/tag-plugins) when enabled

## 布局

The default layout is `post`, in accordance to the value of [`default_layout`]((/docs/configuration#Writing)) setting in `_config.yml`. When the layout is disabled (`layout: false`) in an article, it will not be processed with a theme. However, it will still be rendered by any available renderer: if an article is written in Markdown and a Markdown renderer (like the default [hexo-renderer-marked](https://github.com/hexojs/hexo-renderer-marked)) is installed, it will be rendered to HTML.

[Tag plugins](/docs/tag-plugins) are always processed regardless of layout, unless disabled by the `disableNunjucks` setting or [renderer](/api/renderer#Disable-Nunjucks-tags).

## 分类和标签

只有文章支持分类和标签,您可以在 Front-matter 中设置。在其他系统中,分类和标签听起来很接近,但是在 Hexo 中两者有着明显的差别:分类具有顺序性和层次性,也就是说 `Foo, Bar` 不等于 `Bar, Foo`;而标签没有顺序和层次。
Expand Down
4 changes: 2 additions & 2 deletions source/zh-cn/docs/writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Hexo 有三种默认布局:`post`、`page` 和 `draft`。在创建者三种不
`page` | `source`
`draft` | `source/_drafts`

{% note tip 不要处理我的文章 %}
如果你不想你的文章被处理,你可以将 Front-Matter 中的`layout:` 设为 `false`
{% note tip Disabling layout %}
If you don't want an article (post/page) to be processed with a theme, set `layout: false` in its front-matter. Refer to [this section](/zh-cn/docs/front-matter#布局) for more details.
{% endnote %}

### 文件名称
Expand Down
9 changes: 8 additions & 1 deletion source/zh-tw/docs/front-matter.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,23 @@ date: 2013/7/13 20:46:25

設定 | 描述 | 預設值
--- | --- | ---
`layout` | 佈局 |
`layout` | 佈局 | [`config.default_layout`](/zh-tw/docs/configuration#寫作)
`title` | 標題 | 文章的檔案名
`date` | 建立日期 | 檔案建立日期
`updated` | 更新日期 | 檔案更新日期
`comments` | 開啟文章的留言功能 | true
`tags` | 標籤(不適用於分頁) |
`categories` | 分類(不適用於分頁)|
`permalink` | 覆蓋文章網址 |
`excerpt` | Page excerpt in plain text. Use [this plugin](/docs/tag-plugins#Post-Excerpt) to format the text |
`disableNunjucks` | Disable rendering of Nunjucks tag `{{ }}`/`{% %}` and [tag plugins](/docs/tag-plugins) when enabled

### 佈局

The default layout is `post`, in accordance to the value of [`default_layout`]((/docs/configuration#Writing)) setting in `_config.yml`. When the layout is disabled (`layout: false`) in an article, it will not be processed with a theme. However, it will still be rendered by any available renderer: if an article is written in Markdown and a Markdown renderer (like the default [hexo-renderer-marked](https://github.com/hexojs/hexo-renderer-marked)) is installed, it will be rendered to HTML.

[Tag plugins](/docs/tag-plugins) are always processed regardless of layout, unless disabled by the `disableNunjucks` setting or [renderer](/api/renderer#Disable-Nunjucks-tags).

### 分類和標籤

分類和標籤只有文章才支援,您可以在 Front-matter 中設定。在其他系統中,分類和標籤可能聽起來很接近,但是在 Hexo 中有著決定性的差別:分類是有順序和階層性的,也就是說 `Foo, Bar` 不等於 `Bar, Foo`;而標籤沒有順序和階層。
Expand Down
4 changes: 4 additions & 0 deletions source/zh-tw/docs/writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Hexo 有三種預設佈局:`post`、`page` 和 `draft`,它們分別對應不
`page` | `source`
`draft` | `source/_drafts`

{% note tip Disabling layout %}
If you don't want an article (post/page) to be processed with a theme, set `layout: false` in its front-matter. Refer to [this section](/zh-tw/docs/front-matter#佈局) for more details.
{% endnote %}

### 檔案名稱

Hexo 預設以標題做為檔案名稱,但您可編輯 `new_post_name` 設定來變更預設的檔案名稱,舉例來說,設為 `:year-:month-:day-:title.md` 可讓您更方便的透過日期來管理文章。
Expand Down

0 comments on commit 78cda9e

Please sign in to comment.