diff --git a/content/docs/_index.md b/content/docs/_index.md index 05e96e2..e819f84 100644 --- a/content/docs/_index.md +++ b/content/docs/_index.md @@ -1,3 +1,4 @@ --- -title: Documentation +linkTitle: "Documentation" +title: Welcome to Hextra --- diff --git a/content/docs/components/_index.md b/content/docs/components/_index.md new file mode 100644 index 0000000..ea35b44 --- /dev/null +++ b/content/docs/components/_index.md @@ -0,0 +1,11 @@ +--- +title: Components +--- + +Hextra provides a variety of built-in components based on [Hugo Shortcodes](https://gohugo.io/content-management/shortcodes/). + + +{{< cards >}} + {{< card link="callouts" title="Callouts" icon="warning" >}} + {{< card link="cards" title="Cards" >}} +{{< /cards >}} diff --git a/content/docs/components/callouts.md b/content/docs/components/callouts.md new file mode 100644 index 0000000..5e496be --- /dev/null +++ b/content/docs/components/callouts.md @@ -0,0 +1,74 @@ +--- +title: Callout Component +linkTitle: Callout +--- + +A built-in component to show important information to the reader. + +## Example + +{{< callout emoji="๐Ÿ‘พ">}} + A **callout** is a short piece of text intended to attract attention. +{{< /callout >}} + +{{< callout type="info" >}} + A **callout** is a short piece of text intended to attract attention. +{{< /callout >}} + +{{< callout type="warning" >}} + A **callout** is a short piece of text intended to attract attention. +{{< /callout >}} + +{{< callout type="error" >}} + A **callout** is a short piece of text intended to attract attention. +{{< /callout >}} + +## Usage + +### Default + +{{< callout emoji="๐ŸŒ">}} + Hugo can be used to create a wide variety of websites, including blogs, portfolios, documentation sites, and more. +{{< /callout >}} + +```markdown +{{}} + Hugo can be used to create a wide variety of websites, including blogs, portfolios, documentation sites, and more. +{{}} +``` + +### Info + +{{< callout type="info" >}} + Please visit GitHub to see the latest releases. +{{< /callout >}} + +```markdown +{{}} + Please visit GitHub to see the latest releases. +{{}} +``` + +### Warning + +{{< callout type="warning" >}} + This API will be deprecated in the next version. +{{< /callout >}} + +```markdown +{{}} + A **callout** is a short piece of text intended to attract attention. +{{}} +``` + +### Error + +{{< callout type="error" >}} + Something went wrong and it's going to explode. +{{< /callout >}} + +```markdown +{{}} + Something went wrong and it's going to explode. +{{}} +``` diff --git a/content/docs/components/cards.md b/content/docs/components/cards.md new file mode 100644 index 0000000..aa1d947 --- /dev/null +++ b/content/docs/components/cards.md @@ -0,0 +1,22 @@ +--- +title: Cards Component +linkTitle: Cards +--- + +## Example + +{{< cards >}} + {{< card link="/" title="Callout" icon="warning" >}} + {{< card link="/" title="GitHub" icon="github" >}} + {{< card link="/" title="No Icon" >}} +{{< /cards >}} + +## Usage + +``` +{{}} + {{}} + {{}} + {{}} +{{}} +``` diff --git a/content/docs/guide/_index.md b/content/docs/guide/_index.md index 36cd3af..06063f3 100644 --- a/content/docs/guide/_index.md +++ b/content/docs/guide/_index.md @@ -4,3 +4,9 @@ weight: 2 --- Guide to the project. + +{{< cards >}} + {{< card link="/" title="Callout" icon="warning" >}} + {{< card link="/" title="GitHub" icon="github" >}} + {{< card link="/" title="No Icon" >}} +{{< /cards >}} diff --git a/content/docs/guide/callouts.md b/content/docs/guide/callouts.md deleted file mode 100644 index cb3c11f..0000000 --- a/content/docs/guide/callouts.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Callout Component -linkTitle: Callout ---- - -A built-in component to show important information to the reader. - -## Example - -{{< callout emoji="๐Ÿ‘พ">}} - A **callout** is a short piece of text intended to attract attention. -{{< /callout >}} - -{{< callout type="info" >}} - A **callout** is a short piece of text intended to attract attention. -{{< /callout >}} - -{{< callout type="warning" >}} - A **callout** is a short piece of text intended to attract attention. -{{< /callout >}} - -{{< callout type="error" >}} - A **callout** is a short piece of text intended to attract attention. -{{< /callout >}} diff --git a/content/docs/introduction.ja.md b/content/docs/introduction.ja.md new file mode 100644 index 0000000..bc46e20 --- /dev/null +++ b/content/docs/introduction.ja.md @@ -0,0 +1,5 @@ +--- +title: ใฏใ˜ใ‚ใซ +--- + +ใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆใฎ็ดนไป‹ใ€‚ diff --git a/hugo.toml b/hugo.toml index 9146a55..472d2a8 100644 --- a/hugo.toml +++ b/hugo.toml @@ -5,6 +5,17 @@ baseURL = "https://example.org" disableKinds = ["taxonomy", "term"] +defaultContentLanguage = 'en' +[languages] + [languages.ja] + languageName = 'ๆ—ฅๆœฌ่ชž' + weight = 1 + title = 'Hextra ใƒ†ใƒผใƒž' + [languages.en] + languageName = 'English' + weight = 2 + title = 'Hextra Theme' + [module] [module.hugoVersion] extended = true @@ -31,6 +42,10 @@ disableKinds = ["taxonomy", "term"] source = "assets/.*\\.(.*)$" target = "$1" +[markup] + [markup.goldmark] + [markup.goldmark.renderer] + unsafe = true [menu] [[menu.main]] diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index ce164b3..ef3aa42 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -22,27 +22,29 @@ {{ end }} -
-
+ bg-primary-100 font-semibold text-primary-800 contrast-more:border contrast-more:border-primary-500 dark:bg-primary-400/10 dark:text-primary-600 contrast-more:dark:border-primary-500 + {{ else }} + text-gray-500 hover:bg-gray-100 hover:text-gray-900 contrast-more:border contrast-more:border-transparent contrast-more:text-gray-900 contrast-more:hover:border-gray-900 dark:text-neutral-400 dark:hover:bg-primary-100/5 dark:hover:text-gray-50 contrast-more:dark:text-gray-50 contrast-more:dark:hover:border-gray-50 + {{ end }}" + href="{{ .RelPermalink }}" + > + {{ .LinkTitle }} + + + {{ end }} + + + {{ end }} {{ end }}