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 +{{* callout emoji="๐" */>}} + Hugo can be used to create a wide variety of websites, including blogs, portfolios, documentation sites, and more. +{{* /callout */>}} +``` + +### Info + +{{< callout type="info" >}} + Please visit GitHub to see the latest releases. +{{< /callout >}} + +```markdown +{{* callout type="info" */>}} + Please visit GitHub to see the latest releases. +{{* /callout */>}} +``` + +### Warning + +{{< callout type="warning" >}} + This API will be deprecated in the next version. +{{< /callout >}} + +```markdown +{{* callout type="warning" */>}} + A **callout** is a short piece of text intended to attract attention. +{{* /callout */>}} +``` + +### Error + +{{< callout type="error" >}} + Something went wrong and it's going to explode. +{{< /callout >}} + +```markdown +{{* callout type="error" */>}} + Something went wrong and it's going to explode. +{{* /callout */>}} +``` 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 + +``` +{{* 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/_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 }} -