Skip to content

Commit

Permalink
OS Docs Overhaul - theming change, many new articles (#11258)
Browse files Browse the repository at this point in the history
* add doks theme initial

* remove unused alert block and add hugo_stats to gitignore

* move all image files to assets folder

* mv svg files, fix all png image references, switch to safehtml for svg

* rename getting_started os docs directory to os_getting_started, fix associated links

* theming: add font files and preloading

* add custom header

* remove unused languages and menus

* add customized frontpage

* filetree: consolidate all opensource articles into opensource dir

* add sidebar nav to docs pages

* filetree: update front matter, change ref to point to correct lead article 'about_docs'

* filetree: add new articles, archive redundant os articles

* remove theme reference from footer

* update frontpage links, add 'new user checklist' article

* add 'api' section to sidebar

* update gitignore

* update gitignore again

* fix github actions and change default hugo.toml path

* Add logo

* Remove other logos

* rm submodule-update.yml

* remove 'master' ref from gh-pages.yml

* rename favicon file

* add package-lock.json to gitignore

* upgrade node to 22.5.1, hugo to 0.125.3

* clean up os-docs archive sidebar visibility

* fix broken refs and reorder pages

* mockup changelog page

* change unittest path for new parser docs

---------

Co-authored-by: Paul Osinski <[email protected]>
Co-authored-by: Cody Maffucci <[email protected]>
  • Loading branch information
3 people authored Nov 25, 2024
1 parent 2313b24 commit 8bede6f
Show file tree
Hide file tree
Showing 570 changed files with 7,267 additions and 1,871 deletions.
24 changes: 3 additions & 21 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.81.0'
hugo-version: '0.125.3'
extended: true

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '22.5.1'

- name: Cache dependencies
uses: actions/cache@v4
Expand All @@ -36,26 +36,8 @@ jobs:
- uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive # Fetch the Docsy theme
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
ref: 'dev'

- run: cd docs && npm ci && hugo --minify --config config.dev.toml
- run: ls -l ./docs/public/*

# for dev we move everything into a subfolder, so the master version stays in the root
- run: mkdir /tmp/dev && mv docs/public/* /tmp/dev/

- uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive # Fetch the Docsy theme
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
ref: 'master'

- run: cd docs && npm ci && hugo --minify --config config.master.toml
- run: mv /tmp/dev docs/public/
- run: ls -l ./docs/public/*
- run: cd docs && npm ci && hugo --minify --config /config/production/hugo.toml

- name: Deploy
uses: peaceiris/actions-gh-pages@v4
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/submodule-update.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,15 @@ helm/defectdojo/charts
docs/public
docs/node_modules
docs/resources
docs/hugo_stats.json
docs/.gitpod.yml
docs/.npmignore
docs/.npmrc
docs/.prettierignore
docs/.prettierrc.yaml
docs/.codesandbox/tasks.json
docs/.devcontainer/devcontainer.json
docs/.devcontainer/Dockerfile
docs/LICENSE
docs/.hugo_build.lock
docs/package-lock.json
Binary file added docs/assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added docs/assets/images/.gitkeep
Empty file.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
1 change: 1 addition & 0 deletions docs/assets/js/custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Put your custom JS code here
8 changes: 8 additions & 0 deletions docs/assets/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"*": ["*", "..\\node_modules\\@thulite\\doks-core\\assets\\*"]
}
}
}
19 changes: 0 additions & 19 deletions docs/assets/scss/_variables_project.scss

This file was deleted.

17 changes: 17 additions & 0 deletions docs/assets/scss/common/_custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* work-sans-regular - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Worksans';
font-style: normal;
font-weight: 400;
src: url('/fonts/workssans/work-sans-v19-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* work-sans-500 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Worksans';
font-style: normal;
font-weight: 500;
src: url('/fonts/worksans/work-sans-v19-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

15 changes: 15 additions & 0 deletions docs/assets/scss/common/_variables-custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$font-family-sans-serif:
"Worksans",
system-ui,
-apple-system,
"Segoe UI",
Roboto,
"Helvetica Neue",
"Noto Sans",
"Liberation Sans",
Arial,
sans-serif,
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol",
"Noto Color Emoji";
Empty file added docs/assets/svgs/.gitkeep
Empty file.
File renamed without changes
File renamed without changes
86 changes: 86 additions & 0 deletions docs/config/_default/hugo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
title = "DefectDojo Documentation"
baseurl = "http://localhost/"
canonifyURLs = false
disableAliases = true
disableHugoGeneratorInject = true
# disableKinds = ["taxonomy", "term"]
enableEmoji = true
enableGitInfo = false
enableRobotsTXT = true
languageCode = "en-US"
pagerSize = 10
rssLimit = 10
summarylength = 20 # 70 (default)

# Multilingual
defaultContentLanguage = "en"
disableLanguages = ["de", "nl"]
defaultContentLanguageInSubdir = false

copyRight = "Copyright (c) 2020-2024 Thulite"

[build.buildStats]
enable = true

[outputs]
home = ["HTML", "RSS", "searchIndex"]
section = ["HTML", "RSS", "SITEMAP"]

[outputFormats.searchIndex]
mediaType = "application/json"
baseName = "search-index"
isPlainText = true
notAlternative = true

# Add output format for section sitemap.xml
[outputFormats.SITEMAP]
mediaType = "application/xml"
baseName = "sitemap"
isHTML = false
isPlainText = true
noUgly = true
rel = "sitemap"

[sitemap]
changefreq = "monthly"
filename = "sitemap.xml"
priority = 0.5

[caches]
[caches.getjson]
dir = ":cacheDir/:project"
maxAge = -1 # "30m"

[taxonomies]
contributor = "contributors"
category = "categories"
tag = "tags"

[permalinks]
blog = "/blog/:slug/"
docs = "/en/:sections[1:]/:slug/"
# docs = "/docs/1.0/:sections[1:]/:slug/"

[minify.tdewolff.html]
keepWhitespace = false

[related]
threshold = 80
includeNewer = true
toLower = false
[[related.indices]]
name = "categories"
weight = 100
[[related.indices]]
name = "tags"
weight = 80
[[related.indices]]
name = "date"
weight = 10

[imaging]
anchor = "Center"
bgColor = "#ffffff"
hint = "photo"
quality = 85
resampleFilter = "Lanczos"
7 changes: 7 additions & 0 deletions docs/config/_default/languages.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[en]
languageName = "English"
contentDir = "content/en"
weight = 10
[en.params]
languageISO = "EN"
languageTag = "en-US"
33 changes: 33 additions & 0 deletions docs/config/_default/markup.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
defaultMarkdownHandler = "goldmark"

[goldmark]
[goldmark.extensions]
linkify = false
[goldmark.parser]
autoHeadingID = true
autoHeadingIDType = "github"
[goldmark.parser.attribute]
block = true
title = true
[goldmark.renderer]
unsafe = true

[highlight]
anchorLineNos = false
codeFences = true
guessSyntax = false
hl_Lines = ''
hl_inline = false
lineAnchors = ''
lineNoStart = 1
lineNos = false
lineNumbersInTable = false
noClasses = false
noHl = false
style = 'monokai'
tabWidth = 2

[tableOfContents]
endLevel = 3
ordered = false
startLevel = 2
25 changes: 25 additions & 0 deletions docs/config/_default/menus/menus.en.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[[main]]
name = "Docs"
url = "/en/about_defectdojo/about_docs/"
weight = 10

[[social]]
name = "X"
pre = '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 4l11.733 16h4.267l-11.733 -16z"></path><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"></path></svg>'
url = "https://twitter.com/defectdojo"
weight = 10

[[social]]
name = 'Linkedin'
pre = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-linkedin" viewBox="0 0 16 16"><path d="M0 1.146C0 .513.526 0 1.175 0h13.65C15.474 0 16 .513 16 1.146v13.708c0 .633-.526 1.146-1.175 1.146H1.175C.526 16 0 15.487 0 14.854zm4.943 12.248V6.169H2.542v7.225zm-1.2-8.212c.837 0 1.358-.554 1.358-1.248-.015-.709-.52-1.248-1.342-1.248S2.4 3.226 2.4 3.934c0 .694.521 1.248 1.327 1.248zm4.908 8.212V9.359c0-.216.016-.432.08-.586.173-.431.568-.878 1.232-.878.869 0 1.216.662 1.216 1.634v3.865h2.401V9.25c0-2.22-1.184-3.252-2.764-3.252-1.274 0-1.845.7-2.165 1.193v.025h-.016l.016-.025V6.169h-2.4c.03.678 0 7.225 0 7.225z"/></svg>'
url = "https://www.linkedin.com/company/defectdojo/"
weight = 10

[[social]]
name = "GitHub"
pre = '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5"></path></svg>'
url = "https://github.com/django-defectdojo"
post = "v0.1.0"
weight = 30

[[footer]]
87 changes: 87 additions & 0 deletions docs/config/_default/module.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# mounts
## archetypes
[[mounts]]
source = "node_modules/@thulite/doks-core/archetypes"
target = "archetypes"

[[mounts]]
source = "archetypes"
target = "archetypes"

## assets
[[mounts]]
source = "node_modules/@thulite/core/assets"
target = "assets"

[[mounts]]
source = "node_modules/@thulite/images/assets"
target = "assets"

[[mounts]]
source = "node_modules/@thulite/doks-core/assets"
target = "assets"

[[mounts]]
source = "node_modules/@tabler/icons/icons"
target = "assets/svgs/tabler-icons"

[[mounts]]
source = "assets"
target = "assets"

## content
[[mounts]]
source = "content"
target = "content"

## data
[[mounts]]
source = "node_modules/@thulite/doks-core/data"
target = "data"

[[mounts]]
source = "data"
target = "data"

## i18n
[[mounts]]
source = "node_modules/@thulite/doks-core/i18n"
target = "i18n"

[[mounts]]
source = "i18n"
target = "i18n"

## layouts
[[mounts]]
source = "node_modules/@thulite/core/layouts"
target = "layouts"

[[mounts]]
source = "node_modules/@thulite/seo/layouts"
target = "layouts"

[[mounts]]
source = "node_modules/@thulite/images/layouts"
target = "layouts"

[[mounts]]
source = "node_modules/@thulite/doks-core/layouts"
target = "layouts"

[[mounts]]
source = "node_modules/@thulite/inline-svg/layouts"
target = "layouts"

[[mounts]]
source = "layouts"
target = "layouts"

## static
[[mounts]]
source = "node_modules/@thulite/doks-core/static"
target = "static"

[[mounts]]
source = "static"
target = "static"
Loading

0 comments on commit 8bede6f

Please sign in to comment.