Skip to content

Commit 485688b

Browse files
authored
Merge pull request #219 from smlx/docs-bitrot
docs bitrot
2 parents f26f50c + de35bdc commit 485688b

File tree

9 files changed

+93
-113
lines changed

9 files changed

+93
-113
lines changed

.github/workflows/user-documentation.yaml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: User Documentation
22

33
on:
4+
pull_request:
45
push:
56
branches:
67
- main # Set a branch to deploy
@@ -15,27 +16,18 @@ jobs:
1516
with:
1617
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
1718

18-
- uses: actions/checkout@v4
19-
with:
20-
repository: google/docsy
21-
path: docs/themes/docsy
22-
submodules: true
23-
2419
- name: Setup Hugo
2520
uses: peaceiris/actions-hugo@v2
2621
with:
22+
hugo-version: '0.123.8'
2723
extended: true
2824

2925
- name: Setup Node
3026
uses: actions/setup-node@v4
3127
with:
32-
node-version: '16'
33-
34-
- run: cd docs && npm install postcss postcss-cli autoprefixer
35-
36-
- run: cd docs/themes/docsy && npm install
28+
node-version: 20
3729

38-
- run: cd docs && hugo --minify
30+
- run: cd docs && npm install postcss-cli autoprefixer && hugo --minify
3931

4032
- name: Deploy
4133
uses: peaceiris/actions-gh-pages@v3

docs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
/node_modules
33
/package-lock.json
44
/package.json
5+
/public
56
/resources
67
/themes

docs/Makefile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
.PHONY: serve
2-
serve: themes/docsy
2+
serve:
33
cd .. && \
4-
docker run --rm -it -v $$(pwd):/src -u $$(id -u) -p 1313:1313 \
5-
--entrypoint sh klakegg/hugo:ext-alpine -c \
6-
'cd docs && npm install postcss postcss-cli autoprefixer && hugo --baseURL=/ --bind=0.0.0.0 serve'
4+
docker run --rm -it -v $$(pwd):/src -v $$HOME/.cache/hugo_cache:/home/node/.cache/hugo_cache -u $$(id -u) -p 1313:1313 \
5+
--entrypoint sh hugomods/hugo:latest -c \
6+
"cd docs && hugo server --baseURL=/ --bind 0.0.0.0"
77

8-
themes/docsy:
9-
git clone --recurse-submodules http://github.com/google/docsy themes/docsy
8+
.PHONY: minify
9+
minify:
10+
cd .. && \
11+
docker run --rm -it -v $$(pwd):/src -v $$HOME/.cache/hugo_cache:/home/node/.cache/hugo_cache -u $$(id -u)\
12+
--entrypoint sh hugomods/hugo:latest -c \
13+
"cd docs && npm install postcss-cli autoprefixer && hugo --minify"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/*
2+
3+
Add styles or override variables from the theme here.
4+
5+
*/
6+

docs/go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module github.com/google/docsy-example
2+
3+
go 1.12
4+
5+
require github.com/google/docsy v0.9.1 // indirect

docs/go.sum

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
github.com/FortAwesome/Font-Awesome v0.0.0-20240108205627-a1232e345536/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
2+
github.com/google/docsy v0.9.1 h1:+jqges1YCd+yHeuZ1BUvD8V8mEGVtPxULg5j/vaJ984=
3+
github.com/google/docsy v0.9.1/go.mod h1:saOqKEUOn07Bc0orM/JdIF3VkOanHta9LU5Y53bwN2U=
4+
github.com/twbs/bootstrap v5.2.3+incompatible h1:lOmsJx587qfF7/gE7Vv4FxEofegyJlEACeVV+Mt7cgc=
5+
github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
Lines changed: 54 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
baseURL = "/piv-agent/"
22
title = "PIV Agent"
33

4-
enableRobotsTXT = true
5-
6-
# Hugo allows theme composition (and inheritance). The precedence is from left to right.
7-
theme = ["docsy"]
8-
9-
# Will give values to .Lastmod etc.
10-
enableGitInfo = true
11-
124
# Language settings
135
contentDir = "content/en"
146
defaultContentLanguage = "en"
157
defaultContentLanguageInSubdir = false
168
# Useful when translating.
179
enableMissingTranslationPlaceholders = true
1810

19-
disableKinds = ["taxonomy", "taxonomyTerm"]
11+
enableRobotsTXT = true
12+
13+
# Will give values to .Lastmod etc.
14+
enableGitInfo = true
15+
16+
# Comment out to enable taxonomies in Docsy
17+
disableKinds = ["taxonomy"]
2018

2119
# Highlighting config
2220
pygmentsCodeFences = true
@@ -31,58 +29,35 @@ pygmentsStyle = "tango"
3129
[permalinks]
3230
blog = "/:section/:year/:month/:day/:slug/"
3331

34-
## Configuration for BlackFriday markdown parser: https://github.com/russross/blackfriday
35-
[blackfriday]
36-
plainIDAnchors = true
37-
hrefTargetBlank = true
38-
angledQuotes = false
39-
latexDashes = true
40-
4132
# Image processing configuration.
4233
[imaging]
4334
resampleFilter = "CatmullRom"
4435
quality = 75
4536
anchor = "smart"
4637

47-
[services]
48-
[services.googleAnalytics]
49-
# Comment out the next line to disable GA tracking. Also disables the feature described in [params.ui.feedback].
50-
# id = "UA-00000000-0"
51-
5238
# Language configuration
5339

5440
[languages]
5541
[languages.en]
56-
title = "PIV Agent"
57-
description = "PIV Agent replaces ssh-agent and gpg-agent, and allows you to use your PIV security token with SSH or GPG"
5842
languageName ="English"
5943
# Weight used for sorting.
6044
weight = 1
61-
# [languages.no]
62-
# title = "Goldydocs"
63-
# description = "Docsy er operativsystem for skyen"
64-
# languageName ="Norsk"
65-
# contentDir = "content/no"
66-
# time_format_default = "02.01.2006"
67-
# time_format_blog = "02.01.2006"
68-
#
69-
# [languages.fa]
70-
# title = "اسناد گلدی"
71-
# description = "یک نمونه برای پوسته داکسی"
72-
# languageName ="فارسی"
73-
# contentDir = "content/fa"
74-
# time_format_default = "2006.01.02"
75-
# time_format_blog = "2006.01.02"
45+
[languages.en.params]
46+
title = "PIV Agent"
47+
description = "PIV Agent replaces ssh-agent and gpg-agent, and allows you to use your PIV security token with SSH or GPG"
48+
7649

7750
[markup]
7851
[markup.goldmark]
52+
[markup.goldmark.parser.attribute]
53+
block = true
7954
[markup.goldmark.renderer]
8055
unsafe = true
8156
[markup.highlight]
82-
# See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html
83-
style = "tango"
84-
# Uncomment if you want your chosen highlight style used for code blocks without a specified language
85-
# guessSyntax = "true"
57+
# See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html
58+
style = "tango"
59+
# Uncomment if you want your chosen highlight style used for code blocks without a specified language
60+
# guessSyntax = "true"
8661

8762
# Everything below this are Site Params
8863

@@ -91,23 +66,20 @@ weight = 1
9166
section = ["HTML", "print"]
9267

9368
[params]
94-
copyright = "PIV Agent Contributors"
95-
# privacy_policy = "https://github.com/smlx/piv-agent"
96-
9769
# First one is picked as the Twitter card image if not set on page.
9870
# images = ["images/project-illustration.png"]
9971

10072
# Menu title if your navbar has a versions selector to access old versions of your site.
10173
# This menu appears only if you have at least one [params.versions] set.
10274
version_menu = "Releases"
10375

104-
# Flag used in the "version-banner" partial to decide whether to display a
76+
# Flag used in the "version-banner" partial to decide whether to display a
10577
# banner on every page indicating that this is an archived version of the docs.
10678
# Set this flag to "true" if you want to display the banner.
10779
archived_version = false
10880

10981
# The version number for the version of the docs represented in this doc set.
110-
# Used in the "version-banner" partial to display a version number for the
82+
# Used in the "version-banner" partial to display a version number for the
11183
# current doc set.
11284
version = "0.0"
11385

@@ -118,87 +90,74 @@ url_latest_version = "https://example.com"
11890
# Repository configuration (URLs for in-page links to opening issues and suggesting changes)
11991
github_repo = "https://github.com/smlx/piv-agent"
12092
# An optional link to a related project repo. For example, the sibling repository where your product code lives.
121-
# github_project_repo = "https://github.com/smlx/piv-agent"
93+
# github_project_repo = "https://github.com/google/docsy"
12294

12395
# Specify a value here if your content directory is not in your repo's root directory
124-
github_subdir = "docs"
96+
# github_subdir = ""
12597

126-
# Uncomment this if you have a newer GitHub repo with "main" as the default branch,
98+
# Uncomment this if your GitHub repo does not have "main" as the default branch,
12799
# or specify a new value if you want to reference another branch in your GitHub links
128100
github_branch= "main"
129101

130102
# Google Custom Search Engine ID. Remove or comment out to disable search.
131-
#gcs_engine_id = "d72aa9b2712488cc3"
132-
133-
# Enable Algolia DocSearch
134-
algolia_docsearch = false
103+
# gcs_engine_id = "d72aa9b2712488cc3"
135104

136105
# Enable Lunr.js offline search
137106
offlineSearch = true
138107

139108
# Enable syntax highlighting and copy buttons on code blocks with Prism
140109
prism_syntax_highlighting = false
141110

111+
[params.copyright]
112+
authors = "PIV Agent Contributors | [CC BY SA 4.0](https://creativecommons.org/licenses/by-sa/4.0)"
113+
from_year = 2020
114+
142115
# User interface configuration
143116
[params.ui]
144-
# Enable to show the side bar menu in its compact state.
145-
sidebar_menu_compact = false
146117
# Set to true to disable breadcrumb navigation.
147118
breadcrumb_disable = false
148-
# Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled)
149-
sidebar_search_disable = false
150-
# Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top nav bar
119+
# Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top navbar
151120
navbar_logo = true
152-
# Set to true to disable the About link in the site footer
153-
footer_about_disable = false
121+
# Set to true if you don't want the top navbar to be translucent when over a `block/cover`, like on the homepage.
122+
navbar_translucent_over_cover_disable = false
123+
# Enable to show the side bar menu in its compact state.
124+
sidebar_menu_compact = false
125+
# Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled)
126+
sidebar_search_disable = false
154127

155128
# Adds a H2 section titled "Feedback" to the bottom of each doc. The responses are sent to Google Analytics as events.
156129
# This feature depends on [services.googleAnalytics] and will be disabled if "services.googleAnalytics.id" is not set.
157130
# If you want this feature, but occasionally need to remove the "Feedback" section from a single page,
158131
# add "hide_feedback: true" to the page's front matter.
159132
[params.ui.feedback]
160-
enable = true
133+
enable = false
161134
# The responses that the user sees after clicking "yes" (the page was helpful) or "no" (the page was not helpful).
162-
yes = 'Glad to hear it! Please <a href="https://github.com/smlx/piv-agent/issues/new">tell us how we can improve</a>.'
163-
no = 'Sorry to hear that. Please <a href="https://github.com/smlx/piv-agent/issues/new">tell us how we can improve</a>.'
135+
yes = 'Glad to hear it! Please <a href="https://github.com/USERNAME/REPOSITORY/issues/new">tell us how we can improve</a>.'
136+
no = 'Sorry to hear that. Please <a href="https://github.com/USERNAME/REPOSITORY/issues/new">tell us how we can improve</a>.'
164137

165138
# Adds a reading time to the top of each doc.
166-
# If you want this feature, but occasionally need to remove the Reading time from a single page,
139+
# If you want this feature, but occasionally need to remove the Reading time from a single page,
167140
# add "hide_readingtime: true" to the page's front matter
168141
[params.ui.readingtime]
169142
enable = false
170143

171144
[params.links]
172145
# End user relevant links. These will show up on left side of footer and in the community page if you have one.
173-
# [[params.links.user]]
174-
# name = "User mailing list"
175-
# url = "https://example.org/mail"
176-
# icon = "fa fa-envelope"
177-
# desc = "Discussion and help from your fellow users"
178-
# [[params.links.user]]
179-
# name ="Twitter"
180-
# url = "https://example.org/twitter"
181-
# icon = "fab fa-twitter"
182-
# desc = "Follow us on Twitter to get the latest news!"
183-
# [[params.links.user]]
184-
# name = "Stack Overflow"
185-
# url = "https://example.org/stack"
186-
# icon = "fab fa-stack-overflow"
187-
# desc = "Practical questions and curated answers"
188146
# Developer relevant links. These will show up on right side of footer and in the community page if you have one.
189147
[[params.links.developer]]
190-
name = "GitHub"
191-
url = "https://github.com/smlx/piv-agent"
192-
icon = "fab fa-github"
193-
desc = "Development takes place here!"
194-
# [[params.links.developer]]
195-
# name = "Slack"
196-
# url = "https://example.org/slack"
197-
# icon = "fab fa-slack"
198-
# desc = "Chat with other project developers"
199-
# [[params.links.developer]]
200-
# name = "Developer mailing list"
201-
# url = "https://example.org/mail"
202-
# icon = "fa fa-envelope"
203-
# desc = "Discuss development issues around the project"
204-
#
148+
name = "GitHub"
149+
url = "https://github.com/smlx/piv-agent"
150+
icon = "fab fa-github"
151+
desc = "Development takes place here!"
152+
153+
# hugo module configuration
154+
155+
[module]
156+
# Uncomment the next line to build and serve using local docsy clone declared in the named Hugo workspace:
157+
# workspace = "docsy.work"
158+
[module.hugoVersion]
159+
extended = true
160+
min = "0.110.0"
161+
[[module.imports]]
162+
path = "github.com/google/docsy"
163+
disable = false

docs/layouts/404.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{ define "main" -}}
2+
<div class="td-content">
3+
<h1>Not found</h1>
4+
<p>Oops! This page doesn't exist. Try going back to the <a href="{{ "" | relURL }}">home page</a>.</p>
5+
<p>You can learn how to make a 404 page like this in <a href="https://gohugo.io/templates/404/">Custom 404 Pages</a>.</p>
6+
</div>
7+
{{- end }}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{ template "_default/_markup/td-render-heading.html" . }}

0 commit comments

Comments
 (0)