Skip to content

Commit

Permalink
Merge branch 'release-0.9.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
thingsym committed Oct 18, 2021
2 parents 5bf9a4d + cef8e7c commit 55fe049
Show file tree
Hide file tree
Showing 14 changed files with 3,937 additions and 5,041 deletions.
119 changes: 119 additions & 0 deletions .github/demo_config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
baseURL = "https://thingsym.github.io/hugo-theme-techdoc"

languageCode = "en-us"
DefaultContentLanguage = "en"
title = "Hugo Techdoc Theme"
theme = "hugo-theme-techdoc"

hasCJKLanguage = true
metaDataFormat = "yaml"

defaultContentLanguage = "en"
defaultContentLanguageInSubdir= false
enableMissingTranslationPlaceholders = false

[params]

# Source Code repository section
description = "put your description"
github_repository = "https://github.com/thingsym/hugo-theme-techdoc"
version = "0.9.8"

# Documentation repository section
# documentation repository (set edit link to documentation repository)
github_doc_repository = "https://github.com/thingsym/hugo-theme-techdoc"
github_doc_repository_path = "exampleSite/content/"

# Analytic section
google_analytics_id = "" # Your Google Analytics tracking id
tag_manager_container_id = "" # Your Google Tag Manager container id
google_site_verification = "" # Your Google Site Verification for Search Console

# Open Graph and Twitter Cards settings section
# Open Graph settings for each page are set on the front matter.
# See https://gohugo.io/templates/internal/#open-graph
# See https://gohugo.io/templates/internal/#twitter-cards
title = "Hugo Techdoc Theme"
images = ["images/og-image.png"] # Open graph images are placed in `static/images`

# Theme settings section
# Theme color
# See color value reference https://developer.mozilla.org/en-US/docs/Web/CSS/color
custom_font_color = ""
custom_background_color = ""

# Documentation Menu section
# Menu style settings
menu_style = "open-menu" # "open-menu" or "slide-menu" or "" blank is as no sidebar

# Date format
dateformat = "" # default "2 Jan 2006"
# See the format reference https://gohugo.io/functions/format/#hugo-date-and-time-templating-reference

# path name excluded from documentation menu
menu_exclusion = [
"archives",
"archive",
"blog",
"entry",
"post",
"posts",
]

# Algolia site search section
# See https://www.algolia.com/doc/
algolia_search_enable = true
algolia_indexName = "hugo-demo-techdoc"
algolia_appId = "7W4SAN4PLK"
algolia_apiKey = "cbf12a63ff72d9c5dc0c10c195cf9128" # Search-Only API Key

# Global menu section
# See https://gohugo.io/content-management/menus/
[menu]
[[menu.main]]
name = "Home"
url = "/"
weight = 1

[[menu.main]]
name = "Twitter"
url = "https://twitter.com/thingsym"
weight = 2

# Markup configure section
# See https://gohugo.io/getting-started/configuration-markup/
[markup]
defaultMarkdownHandler = "goldmark"
[markup.goldmark.renderer]
unsafe= true
[markup.tableOfContents]
startLevel = 2
endLevel = 6
ordered = false

[outputs]
home = ["HTML", "RSS", "Algolia"]

# Algolia Search configure section
[outputFormats.Algolia]
baseName = "algolia"
mediaType = "application/json"
isPlainText = true
notAlternative = true

[params.algolia]
vars = [
"title",
"summary",
"content",
"date",
"publishdate",
"description",
"permalink",
"keywords",
"lastmod",
]
params = [
"tags",
"categories",
]
33 changes: 33 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish demo site to Github Pages

on:
push:
tags:
- 'v*.*.*'

jobs:
publish:
runs-on: ubuntu-18.04
timeout-minutes: 30

steps:
- uses: actions/checkout@v2

- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.88.1'
extended: true

- name: Build demo website to public directory
run: |
cd ./exampleSite
hugo --config ../.github/demo_config.toml --themesDir ../.. --minify
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./exampleSite/public
commit_message: 'deploy to GitHub Pages via GitHub Actions'
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ The Techdoc is a Hugo Theme for technical documentation.

![The Techdoc screenshot](https://raw.githubusercontent.com/thingsym/hugo-theme-techdoc/master/images/screenshot.png)

- Hugo Themes page: [https://themes.gohugo.io/hugo-theme-techdoc/](https://themes.gohugo.io/hugo-theme-techdoc/)
- Demo site: [https://themes.gohugo.io/theme/hugo-theme-techdoc/](https://themes.gohugo.io/theme/hugo-theme-techdoc/)
- Hugo Themes page: [https://themes.gohugo.io/themes/hugo-theme-techdoc/](https://themes.gohugo.io/themes/hugo-theme-techdoc/)
- Demo site: [https://thingsym.github.io/hugo-theme-techdoc/](https://thingsym.github.io/hugo-theme-techdoc/)
- Download: [https://github.com/thingsym/hugo-theme-techdoc](https://github.com/thingsym/hugo-theme-techdoc)

## Features
Expand Down Expand Up @@ -247,7 +247,6 @@ Browse site on http://localhost:1313

```
cd /path/to/hugo-theme-techdoc
docker-compose up -d
docker-compose run --rm node npm install
docker-compose run --rm node npm run watch
```
Expand All @@ -266,6 +265,14 @@ Small patches and bug reports can be submitted a issue tracker in Github. Forkin

## Changelog

* Version 0.9.8 - 2021.10.18
* fix sample document
* edit README
* update package.json
* add github_doc_repository_path
* change to relative link
* add workflows for publishing demo site to gh-pages

* Version 0.9.7 - 2021.03.08
* add docker-compose.yml for development environment
* change keyboard event from event.keyCode to event.key because it is deprecated
Expand Down
1 change: 1 addition & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ enableMissingTranslationPlaceholders = false
# Documentation repository section
# documentation repository (set edit link to documentation repository)
github_doc_repository = "https://github.com/thingsym/hugo-theme-techdoc"
github_doc_repository_path = ""

# Analytic section
google_analytics_id = "" # Your Google Analytics tracking id
Expand Down
11 changes: 9 additions & 2 deletions exampleSite/content/getting-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ For an example of `config.toml`, see [config.toml](https://github.com/thingsym/h
# Source Code repository section
description = "put your description"
github_repository = "https://github.com/thingsym/hugo-theme-techdoc"
version = "0.9.7"
version = "0.9.8"

# Documentation repository section
# documentation repository (set edit link to documentation repository)
github_doc_repository = "https://github.com/thingsym/hugo-theme-techdoc"
github_doc_repository_path = ""

# Analytic section
google_analytics_id = "" # Your Google Analytics tracking id
Expand Down Expand Up @@ -80,14 +81,20 @@ default: `https://github.com/thingsym/hugo-theme-techdoc`

The version of souce code

default: `0.9.7`
default: `0.9.8`

#### `github_doc_repository`

URL of documentation repository for editting

default: `https://github.com/thingsym/hugo-theme-techdoc`

#### `github_doc_repository_path`

content directory path (when including the content directory in the repository)

default: `""`

#### `google_analytics_id`

ID of Google Analytics
Expand Down
4 changes: 2 additions & 2 deletions exampleSite/content/sample/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ inline code `#ffce44`

## Image

![2 People Sitting With View of Yellow Flowers during Daytime](/images/pexels-photo-196666.jpeg "sample")
![2 People Sitting With View of Yellow Flowers during Daytime](../images/pexels-photo-196666.jpeg "sample")


## Image with link

[![2 People Sitting With View of Yellow Flowers during Daytime](/images/pexels-photo-196666.jpeg)](https://www.pexels.com/photo/2-people-sitting-with-view-of-yellow-flowers-during-daytime-196666/)
[![2 People Sitting With View of Yellow Flowers during Daytime](../images/pexels-photo-196666.jpeg)](https://www.pexels.com/photo/2-people-sitting-with-view-of-yellow-flowers-during-daytime-196666/)


## Definition Lists
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/sample/build-in-shortcodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ See https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcod

## figure

{{< figure src="/images/pexels-photo-196666.jpeg" title="2 People Sitting With View of Yellow Flowers during Daytime" >}}
{{< figure src="../../images/pexels-photo-196666.jpeg" title="2 People Sitting With View of Yellow Flowers during Daytime" >}}

## gist

Expand Down
4 changes: 2 additions & 2 deletions exampleSite/content/sample/markdown-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ puts 'The best way to log and share programmers knowledge.'
## Images

```markdown
![2 People Sitting With View of Yellow Flowers during Daytime](/images/pexels-photo-196666.jpeg "sample")
![2 People Sitting With View of Yellow Flowers during Daytime](../images/pexels-photo-196666.jpeg "sample")
```


## Image with link

```markdown
[![2 People Sitting With View of Yellow Flowers during Daytime](/images/pexels-photo-196666.jpeg)](https://www.pexels.com/photo/2-people-sitting-with-view-of-yellow-flowers-during-daytime-196666/)
[![2 People Sitting With View of Yellow Flowers during Daytime](../images/pexels-photo-196666.jpeg)](https://www.pexels.com/photo/2-people-sitting-with-view-of-yellow-flowers-during-daytime-196666/)
```

## Definition Lists
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/edit-page.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{- if and .Site.Params.github_doc_repository .File -}}
<a href="{{ .Site.Params.github_doc_repository }}/edit/master/content/{{ .File.Path }}" class="edit-page"><i class="fas fa-pen-square"></i>&nbsp;Edit on GitHub</a>
<a href="{{ .Site.Params.github_doc_repository }}/edit/master/{{ .Site.Params.github_doc_repository_path }}{{ .File.Path }}" class="edit-page"><i class="fas fa-pen-square"></i>&nbsp;Edit on GitHub</a>
{{- end -}}
Loading

0 comments on commit 55fe049

Please sign in to comment.