mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Patrick Kollitsch
3 days ago 7e45a93015bb324a7022be9a1fb6bc649e1500a1
fix: various documentation fixes (#904)

- fix code samples (content and design)
- fix path to gohugo module theme integration for site to proper
relative path
- move gohugo configuration into subdirectory

Signed-off-by: Patrick Kollitsch <83281+davidsneighbour@users.noreply.github.com>
1 files deleted
6 files modified
4 files added
135 ■■■■ changed files
docs/configuration/general.md 4 ●●●● patch | view | raw | blame | history
docs/configuration/social-media-networks.md 6 ●●●● patch | view | raw | blame | history
docs/customisation/styles.md 2 ●●● patch | view | raw | blame | history
docs/getting-started.md 4 ●●●● patch | view | raw | blame | history
docs/installation/installation.md 4 ●●●● patch | view | raw | blame | history
package.json 2 ●●● patch | view | raw | blame | history
site/assets/ananke/css/fixes.css 4 ●●●● patch | view | raw | blame | history
site/assets/ananke/css/highlighting.css 72 ●●●●● patch | view | raw | blame | history
site/config/_default/hugo.toml 15 ●●●●● patch | view | raw | blame | history
site/config/_default/params.toml 5 ●●●●● patch | view | raw | blame | history
site/hugo.toml 17 ●●●●● patch | view | raw | blame | history
docs/configuration/general.md
@@ -15,8 +15,8 @@
This theme includes a shortcode for a contact form that you can add to any page (there is an example on the contact page in the exampleSite folder). One option is to use [formspree.io](//formspree.io/) as proxy to send the actual email. Each month, visitors can send you up to fifty emails without incurring extra charges. Visit the Formspree site to get the "action" link and add it to your shortcode like this:
```go
{{/*< form-contact action="https://formspree.io/your@email.com" >*/}}
```markdown
{{</* form-contact action="https://formspree.io/your@email.com" */>}}
```
### Logo
docs/configuration/social-media-networks.md
@@ -214,7 +214,7 @@
This is a list of slugs for already configured networks in the theme. You can add missing networks without much hassle (see [Configure social media follow links](https://github.com/theNewDynamic/gohugo-theme-ananke/wiki/Social-media-network-setup#configure-social-media-follow-links)). If you experience issue doing that [feel free to reach out in our Forum](https://github.com/theNewDynamic/gohugo-theme-ananke/discussions).
| Slug | profile | share | Notes |
| --- | :---: | :---: | --- |
| ------------- | :-----: | :---: | ------------------------------------------------------------------------------------------------------ |
| bluesky | ✅ | ✅ | Read notes about [configuring networks with multiple hosts](#configuring-networks-with-multiple-hosts) |
| email | ❌ |✅ | |
| facebook | ✅ | ✅ | |
@@ -278,14 +278,14 @@
* all functions in `partial/func/socials` are removed
* If you were using the following partials anywhere:
  ```go
  ```go-html-template
  {{ partial "social-follow.html" . }}
  {{ partial "social-share.html" . }}
  ```
  you should be able to replace the functionality with this change
  ```go
  ```go-html-template
  {{ partial "social/follow.html" . }}
  {{ partial "social/share.html" . }}
  ```
docs/customisation/styles.md
@@ -17,7 +17,7 @@
which will give you a body class like this:
```go
```html
<body class="avenir bg-near-white">
```
docs/getting-started.md
@@ -49,7 +49,7 @@
This theme includes a shortcode for a contact form that you can add to any page (there is an example on the contact page in the exampleSite folder). One option is to use [formspree.io](//formspree.io/) as proxy to send the actual email. Each month, visitors can send you up to fifty emails without incurring extra charges. Visit the Formspree site to get the "action" link and add it to your shortcode like this:
```go
```go-html-template
{{/*< form-contact action="https://formspree.io/your@email.com" >*/}}
```
@@ -101,7 +101,7 @@
which will give you a body class like this:
```go
```html
<body class="avenir bg-near-white">
```
docs/installation/installation.md
@@ -5,7 +5,7 @@
## Installing the Ananke Theme for Hugo
<!-- > [!NOTE]
> [!NOTE]
> This post was published and might have updates at [kollitsch.dev](https://kollitsch.dev/posts/installing-ananke-theme-hugo/) -->
If you're following the [Hugo Quickstart guide](https://gohugo.io/getting-started/quick-start/), you'll notice that it currently recommends installing the Ananke theme as a **Git submodule**. While this is a valid approach, Hugo also offers a more powerful alternative: **Hugo Modules**, which leverage Go's module system for better dependency management.
@@ -18,7 +18,7 @@
### Comparison: Hugo Module vs. Git Submodule
| Method           | Pros | Cons |
|-----------------|------|------|
| -------------------------------------------------------------------- | ---------------------------------------------------------------- | --------------------------------------------------------- |
| [**Hugo Module**](Installation-as-GoHugo-Module) *(Preferred)* | Easier version management, automatic updates, better integration | Requires Go installed and initial setup |
| [**Git Submodule**](Installation-as-Git-Submodule) *(Legacy Method)* | Simple if you're already using Git | Requires manual updates, can be tricky with Git workflows |
package.json
@@ -57,7 +57,7 @@
      "command": "commit-and-tag-version --sign -a -t \"v\" --releaseCommitMessageFormat \"chore(release): v{{currentTag}}\" --prerelease prerelease -- --no-verify"
    },
    "server": {
      "command": "cd site && HUGO_MODULE_REPLACEMENTS=\"github.com/theNewDynamic/gohugo-theme-ananke/v2 -> /home/patrick/github.com/davidsneighbour/gohugo-theme-ananke/\" hugo server"
      "command": "cd site && hugo server"
    }
  }
}
site/assets/ananke/css/fixes.css
New file
@@ -0,0 +1,4 @@
pre,
.pre {
  overflow: auto;
}
site/assets/ananke/css/highlighting.css
New file
@@ -0,0 +1,72 @@
/* Generated using: hugo gen chromastyles --style=tokyonight-day */
/* Background */ .bg { color:#3760bf;background-color:#e1e2e7; }
/* PreWrapper */ .chroma { color:#3760bf;background-color:#e1e2e7; }
/* Error */ .chroma .err { color:#c64343 }
/* LineLink */ .chroma .lnlinks { outline:none;text-decoration:none;color:inherit }
/* LineTableTD */ .chroma .lntd { vertical-align:top;padding:0;margin:0;border:0; }
/* LineTable */ .chroma .lntable { border-spacing:0;padding:0;margin:0;border:0; }
/* LineHighlight */ .chroma .hl { background-color:#a1a6c5 }
/* LineNumbersTable */ .chroma .lnt { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#6172b0 }
/* LineNumbers */ .chroma .ln { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#6172b0 }
/* Line */ .chroma .line { display:flex; }
/* Keyword */ .chroma .k { color:#9854f1 }
/* KeywordConstant */ .chroma .kc { color:#8c6c3e }
/* KeywordDeclaration */ .chroma .kd { color:#9d7cd8 }
/* KeywordNamespace */ .chroma .kn { color:#007197 }
/* KeywordPseudo */ .chroma .kp { color:#9854f1 }
/* KeywordReserved */ .chroma .kr { color:#9854f1 }
/* KeywordType */ .chroma .kt { color:#0db9d7 }
/* NameAttribute */ .chroma .na { color:#2e7de9 }
/* NameClass */ .chroma .nc { color:#b15c00 }
/* NameConstant */ .chroma .no { color:#b15c00 }
/* NameDecorator */ .chroma .nd { color:#2e7de9;font-weight:bold }
/* NameEntity */ .chroma .ni { color:#007197 }
/* NameException */ .chroma .ne { color:#8c6c3e }
/* NameLabel */ .chroma .nl { color:#587539 }
/* NameNamespace */ .chroma .nn { color:#8c6c3e }
/* NameProperty */ .chroma .py { color:#8c6c3e }
/* NameTag */ .chroma .nt { color:#9854f1 }
/* NameBuiltin */ .chroma .nb { color:#587539 }
/* NameBuiltinPseudo */ .chroma .bp { color:#587539 }
/* NameFunction */ .chroma .nf { color:#2e7de9 }
/* NameFunctionMagic */ .chroma .fm { color:#2e7de9 }
/* LiteralString */ .chroma .s { color:#587539 }
/* LiteralStringAffix */ .chroma .sa { color:#9d7cd8 }
/* LiteralStringBacktick */ .chroma .sb { color:#587539 }
/* LiteralStringChar */ .chroma .sc { color:#587539 }
/* LiteralStringDelimiter */ .chroma .dl { color:#2e7de9 }
/* LiteralStringDoc */ .chroma .sd { color:#a1a6c5 }
/* LiteralStringDouble */ .chroma .s2 { color:#587539 }
/* LiteralStringEscape */ .chroma .se { color:#2e7de9 }
/* LiteralStringHeredoc */ .chroma .sh { color:#a1a6c5 }
/* LiteralStringInterpol */ .chroma .si { color:#587539 }
/* LiteralStringOther */ .chroma .sx { color:#587539 }
/* LiteralStringRegex */ .chroma .sr { color:#007197 }
/* LiteralStringSingle */ .chroma .s1 { color:#587539 }
/* LiteralStringSymbol */ .chroma .ss { color:#587539 }
/* LiteralNumber */ .chroma .m { color:#8c6c3e }
/* LiteralNumberBin */ .chroma .mb { color:#8c6c3e }
/* LiteralNumberFloat */ .chroma .mf { color:#8c6c3e }
/* LiteralNumberHex */ .chroma .mh { color:#8c6c3e }
/* LiteralNumberInteger */ .chroma .mi { color:#8c6c3e }
/* LiteralNumberIntegerLong */ .chroma .il { color:#8c6c3e }
/* LiteralNumberOct */ .chroma .mo { color:#8c6c3e }
/* Operator */ .chroma .o { color:#587539;font-weight:bold }
/* OperatorWord */ .chroma .ow { color:#587539;font-weight:bold }
/* Comment */ .chroma .c { color:#a1a6c5;font-style:italic }
/* CommentHashbang */ .chroma .ch { color:#a1a6c5;font-style:italic }
/* CommentMultiline */ .chroma .cm { color:#a1a6c5;font-style:italic }
/* CommentSingle */ .chroma .c1 { color:#a1a6c5;font-style:italic }
/* CommentSpecial */ .chroma .cs { color:#a1a6c5;font-style:italic }
/* CommentPreproc */ .chroma .cp { color:#a1a6c5;font-style:italic }
/* CommentPreprocFile */ .chroma .cpf { color:#a1a6c5;font-weight:bold;font-style:italic }
/* GenericDeleted */ .chroma .gd { color:#c64343;background-color:#e9e9ed }
/* GenericEmph */ .chroma .ge { font-style:italic }
/* GenericError */ .chroma .gr { color:#c64343 }
/* GenericHeading */ .chroma .gh { color:#8c6c3e;font-weight:bold }
/* GenericInserted */ .chroma .gi { color:#587539;background-color:#e9e9ed }
/* GenericStrong */ .chroma .gs { font-weight:bold }
/* GenericSubheading */ .chroma .gu { color:#8c6c3e;font-weight:bold }
/* GenericTraceback */ .chroma .gt { color:#c64343 }
/* GenericUnderline */ .chroma .gl { text-decoration:underline }
site/config/_default/hugo.toml
New file
@@ -0,0 +1,15 @@
baseURL = "http://localhost/"
languageCode = "en-us"
title = "Ananke Documentation"
contentDir = "../docs/"
enableRobotsTXT = true
[markup]
[markup.highlight]
style = 'tokyonight-day'
[module]
replacements = ["github.com/theNewDynamic/gohugo-theme-ananke/v2 -> ../../"]
[[module.imports]]
path = "github.com/theNewDynamic/gohugo-theme-ananke/v2"
site/config/_default/params.toml
New file
@@ -0,0 +1,5 @@
description = "Documentation for the GoHugo Ananke theme."
custom_css = ["fixes.css", "highlighting.css"]
[ananke.home]
content_alignment = "left" # options: left, center, right
site/hugo.toml
File was deleted