Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS Docs Overhaul - theming change, many new articles #11258

Merged
merged 35 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
a9efa01
add doks theme initial
Nov 8, 2024
5909006
remove unused alert block and add hugo_stats to gitignore
Nov 8, 2024
23c71f6
move all image files to assets folder
Nov 8, 2024
d855214
mv svg files, fix all png image references, switch to safehtml for svg
Nov 12, 2024
5f77e23
rename getting_started os docs directory to os_getting_started, fix a…
Nov 12, 2024
4139957
theming: add font files and preloading
Nov 12, 2024
94b778f
add custom header
Nov 12, 2024
31b27ee
remove unused languages and menus
Nov 12, 2024
a439eff
add customized frontpage
Nov 12, 2024
62f24af
filetree: consolidate all opensource articles into opensource dir
Nov 13, 2024
bf84b4a
add sidebar nav to docs pages
Nov 13, 2024
9b5c4cc
filetree: update front matter, change ref to point to correct lead ar…
Nov 13, 2024
31718d6
filetree: add new articles, archive redundant os articles
Nov 13, 2024
11a9aa4
remove theme reference from footer
Nov 13, 2024
9fe1bd5
update frontpage links, add 'new user checklist' article
Nov 13, 2024
02dfddd
add 'api' section to sidebar
Nov 13, 2024
c16eb62
update gitignore
Nov 19, 2024
91b8d71
update gitignore again
Nov 19, 2024
cad62da
fix github actions and change default hugo.toml path
Nov 19, 2024
8ffdb52
Add logo
Maffooch Nov 19, 2024
a6b3f5e
Remove other logos
Maffooch Nov 19, 2024
b4419cd
rm submodule-update.yml
Nov 19, 2024
41b5b9a
Merge branch 'doks-overhaul' of https://github.com/paulOsinski/django…
Nov 19, 2024
731d48f
remove 'master' ref from gh-pages.yml
Nov 19, 2024
af6d307
rename favicon file
Nov 19, 2024
b504665
add package-lock.json to gitignore
Nov 19, 2024
4532ee0
upgrade node to 22.5.1, hugo to 0.125.3
Nov 19, 2024
b85b6ff
Merge branch 'dev' into doks-overhaul
Nov 19, 2024
ee2e231
Merge branch 'dev' into doks-overhaul
Maffooch Nov 19, 2024
464dd15
Merge branch 'dev' into doks-overhaul
Nov 19, 2024
ee10169
Merge branch 'doks-overhaul' of https://github.com/paulOsinski/django…
Nov 19, 2024
732a2c1
clean up os-docs archive sidebar visibility
Nov 19, 2024
a0923d3
fix broken refs and reorder pages
Nov 21, 2024
b4bdaed
mockup changelog page
Nov 20, 2024
15c575a
change unittest path for new parser docs
Nov 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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
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.
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