From a1f2859944277fdb43f009823f8726199251f49b Mon Sep 17 00:00:00 2001 From: Xin Date: Sun, 27 Aug 2023 23:44:43 +0100 Subject: [PATCH] chore: updated page description partial --- exampleSite/content/docs/_index.ja.md | 2 ++ exampleSite/content/docs/_index.md | 2 ++ exampleSite/content/docs/guide/_index.md | 2 ++ exampleSite/content/docs/guide/configuration.md | 2 ++ exampleSite/content/docs/guide/latex.md | 2 ++ exampleSite/content/docs/guide/organize-files.md | 2 ++ exampleSite/content/docs/guide/syntax-highlighting.md | 2 ++ exampleSite/hugo.yaml | 11 ++++++++--- layouts/partials/utils/page-description.html | 6 +++--- 9 files changed, 25 insertions(+), 6 deletions(-) diff --git a/exampleSite/content/docs/_index.ja.md b/exampleSite/content/docs/_index.ja.md index 2ae1812..e3506fe 100644 --- a/exampleSite/content/docs/_index.ja.md +++ b/exampleSite/content/docs/_index.ja.md @@ -5,6 +5,8 @@ title: Hextraへようこそ 👋 こんにちは!Hextraドキュメンテーションへようこそ! + + ## Hextraとは? Hextraは、[Hugo][hugo]テーマの一つで、[Tailwind CSS][tailwind-css]を使用して作られた、現代的で高速なバッテリー内蔵のテーマです。 diff --git a/exampleSite/content/docs/_index.md b/exampleSite/content/docs/_index.md index c35ab57..5e8087f 100644 --- a/exampleSite/content/docs/_index.md +++ b/exampleSite/content/docs/_index.md @@ -5,6 +5,8 @@ title: Introduction 👋 Hello! Welcome to the Hextra documentation! + + ## What is Hextra? Hextra is a modern, fast and batteries-included [Hugo][hugo] theme built with [Tailwind CSS][tailwind-css]. diff --git a/exampleSite/content/docs/guide/_index.md b/exampleSite/content/docs/guide/_index.md index e6e8c4b..db79cfa 100644 --- a/exampleSite/content/docs/guide/_index.md +++ b/exampleSite/content/docs/guide/_index.md @@ -8,6 +8,8 @@ sidebar: Explore the following sections to learn to compose content using Hextra: + + {{< cards >}} {{< card link="organize-files" title="Organize Files" icon="document-duplicate" >}} {{< card link="configuration" title="Configuration" icon="adjustments" >}} diff --git a/exampleSite/content/docs/guide/configuration.md b/exampleSite/content/docs/guide/configuration.md index 46c0e75..6623ef0 100644 --- a/exampleSite/content/docs/guide/configuration.md +++ b/exampleSite/content/docs/guide/configuration.md @@ -7,6 +7,8 @@ Hugo reads its configuration from `hugo.yaml` in the root of your Hugo site. The config file is where you can configure all aspects of your site. You can find the config file for this site in `exampleSite/hugo.yaml` as a good starting point. + + ## Navigation ### Menu diff --git a/exampleSite/content/docs/guide/latex.md b/exampleSite/content/docs/guide/latex.md index 2aa898b..2faef00 100644 --- a/exampleSite/content/docs/guide/latex.md +++ b/exampleSite/content/docs/guide/latex.md @@ -6,6 +6,8 @@ math: true $\KaTeX$ is used for rendering LaTeX math expressions. It can be enabled per page by setting `math` to `true` in the page front matter. + + ```yaml {filename="Markdown"} --- title: "My Page with LaTeX" diff --git a/exampleSite/content/docs/guide/organize-files.md b/exampleSite/content/docs/guide/organize-files.md index 2f4549a..c09b8e2 100644 --- a/exampleSite/content/docs/guide/organize-files.md +++ b/exampleSite/content/docs/guide/organize-files.md @@ -8,6 +8,8 @@ weight: 1 By default, Hugo searches for Markdown files in the `content` directory, and the structure of the directory determines the final output structure of your website. Take the example site as an example: + + {{< filetree/container >}} {{< filetree/folder name="content" >}} {{< filetree/file name="_index.md" >}} diff --git a/exampleSite/content/docs/guide/syntax-highlighting.md b/exampleSite/content/docs/guide/syntax-highlighting.md index 0010823..b125f7a 100644 --- a/exampleSite/content/docs/guide/syntax-highlighting.md +++ b/exampleSite/content/docs/guide/syntax-highlighting.md @@ -6,6 +6,8 @@ weight: 3 Hugo uses [Chroma](https://github.com/alecthomas/chroma), a general purpose syntax highlighter in pure Go, for syntax highlighting. It is recommended to use backticks for code blocks in Markdown content. For example: + + ````markdown {filename="Markdown"} ```python def say_hello(): diff --git a/exampleSite/hugo.yaml b/exampleSite/hugo.yaml index b42b4f8..8dd6b1e 100644 --- a/exampleSite/hugo.yaml +++ b/exampleSite/hugo.yaml @@ -66,18 +66,23 @@ menu: icon: github sidebar: - - name: More + - identifier: more + name: More params: type: separator weight: 1 - - name: "About" + - identifier: about + name: "About" pageRef: "/about" weight: 2 - - name: "Hugo Docs ↗" + - identifier: hugoDocs + name: "Hugo Docs ↗" url: "https://gohugo.io/documentation/" weight: 3 params: + description: Modern, responsive, batteries-included Hugo theme for creating beautiful static websites. + navbar: displayTitle: true displayLogo: true diff --git a/layouts/partials/utils/page-description.html b/layouts/partials/utils/page-description.html index 3529fbe..b587062 100644 --- a/layouts/partials/utils/page-description.html +++ b/layouts/partials/utils/page-description.html @@ -1,11 +1,11 @@ {{ with .Description | plainify -}} {{ . -}} {{ else -}} - {{ if .IsPage -}} - {{ .Summary | plainify | chomp -}} - {{ else -}} + {{ if .IsHome -}} {{ with .Site.Params.description | plainify -}} {{ . -}} {{ end -}} + {{ else -}} + {{ .Summary | plainify | chomp -}} {{ end -}} {{ end -}}