fix(glossary): make Glossary optional (#916)

This commit is contained in:
yuri
2026-01-29 01:06:13 +01:00
committed by GitHub
parent 7e56f0578a
commit fe81bc3087
8 changed files with 48 additions and 5 deletions

View File

@@ -46,4 +46,15 @@ Hextra از ایجاد واژه‌نامهٔ اصطلاحات در سطح کل
## صفحهٔ واژه‌نامه
نمونهٔ صفحهٔ واژه‌نامه در [واژه‌نامه]({{% relref "/glossary" %}}) در دسترس است و شامل تمام اصطلاحات تعریف‌شده همراه با توضیحات و مخفف‌هاست.
برای رندر شدن صفحهٔ نمایهٔ واژه‌نامه (که شامل فهرست تمام اصطلاحات تعریف‌شده به‌همراه توضیحات و مخفف‌های آن‌هاست)،
باید برای هر زبان پشتیبانی‌شده یک فایل محتوای واژه‌نامهٔ مخصوص همان زبان تعریف شود.
در نام فایل از پسوند کد زبان استفاده کنید؛ برای مثال: `content/glossary/_index.fa.md`.
```markdown {filename="content/glossary/_index.fa.md"}
---
title: واژه‌نامه
layout: glossary
---
```
یک صفحهٔ نمونه از واژه‌نامه در [واژه‌نامه]({{% relref "/glossary" %}}) در دسترس است.

View File

@@ -46,4 +46,15 @@ Hextra は、サイト全体で使用する用語集の構築をサポートし
## 用語ページ
用語集のサンプルページは [用語集]({{% relref "/glossary" %}}) で確認できます。すべての定義済み用語その説明・略語が表示されます。
定義済み用語その説明、および略語を一覧表示するグロッサリーのインデックスページをレンダリングするには、
サポートされている各言語ごとに、言語固有のグロッサリー用コンテンツファイルを定義する必要があります。
ファイル名には言語コードのサフィックスを使用してください。例: `content/glossary/_index.ja.md`。
```markdown {filename="content/glossary/_index.ja.md"}
---
title: 用語集
layout: glossary
---
```
グロッサリーのサンプルページは [用語集]({{% relref "/glossary" %}}) で確認できます。

View File

@@ -46,5 +46,15 @@ Each YAML data file contains a list of glossary entries. Every entry includes:
## Glossary Page
An example glossary page is available at [Glossary]({{% relref "/glossary" %}}), displaying all
defined terms with their descriptions and abbreviations.
To render the glossary index page (listing all defined terms along with their descriptions and abbreviations),
a language-specific glossary content file must be defined for each supported language. Use the language code suffix
in the filename, for example `content/glossary/_index.en.md`.
```markdown {filename="content/glossary/_index.en.md"}
---
title: Glossary
layout: glossary
---
```
An example glossary page is available at [Glossary]({{% relref "/glossary" %}}).

View File

@@ -46,4 +46,15 @@ Hextra 支持构建全站范围的术语词汇表。
## 术语页面
术语表示例页面可在 [术语表]({{% relref "/glossary" %}}) 查看,显示所有定义的术语及其描述和缩写
要渲染词汇表索引页面(列出所有定义的术语及其说明和缩写
必须为每种受支持的语言定义一个对应的语言专用词汇表内容文件。
请在文件名中使用语言代码后缀,例如:`content/glossary/_index.zh-cn.md`。
```markdown {filename="content/glossary/_index.zh-cn.md"}
---
title: 术语表
layout: glossary
---
```
示例词汇表页面可在 [术语表]({{% relref "/glossary" %}}) 查看。