Skip to content

Commit 37f7b59

Browse files
authored
Docs v2 (#498)
1 parent 750e259 commit 37f7b59

File tree

111 files changed

+21525
-882
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+21525
-882
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
.idea
22
vendor
33
docs/themes/
4+
docs/node_modules/
45
docs/public/
56
docs/content/src-link
7+
docs/content/middleware
68
*.out
79
*.log
810
.mod-cache

docs/.hugo_build.lock

Whitespace-only changes.

docs/.npmignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.env
2+
.netlify
3+
.hugo_build.lock
4+
node_modules
5+
public
6+
resources

docs/.npmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
enable-pre-post-scripts=true
2+
auto-install-peers=true
3+
node-linker=hoisted
4+
prefer-symlinked-executables=false

docs/.prettierignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*.html
2+
*.ico
3+
*.png
4+
*.jp*g
5+
*.toml
6+
*.*ignore
7+
*.svg
8+
*.xml
9+
LICENSE
10+
.npmrc
11+
.gitkeep
12+
*.woff*

docs/.prettierrc.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Default config
2+
tabWidth: 4
3+
endOfLine: crlf
4+
singleQuote: true
5+
printWidth: 100000
6+
trailingComma: none
7+
bracketSameLine: true
8+
quoteProps: consistent
9+
experimentalTernaries: true
10+
11+
# Overrided config
12+
overrides:
13+
- files: ["*.md", "*.json", "*.yaml"]
14+
options:
15+
tabWidth: 2
16+
singleQuote: false
17+
- files: ["*.scss"]
18+
options:
19+
singleQuote: false

docs/README.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/archetypes/default.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/archetypes/docs.md

Lines changed: 0 additions & 9 deletions
This file was deleted.
File renamed without changes.

docs/assets/favicon.png

98.4 KB
Loading

docs/assets/images/.gitkeep

Whitespace-only changes.

docs/assets/js/custom.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Put your custom JS code here
2+
3+
// a bit hacky way to force dark mode by default
4+
// it sets local storage item used by docs/node_modules/@thulite/doks-core/assets/js/color-mode.js
5+
if (!localStorage.getItem('theme')) {
6+
localStorage.setItem('theme', 'dark');
7+
}
8+
9+
import { render } from 'github-buttons';
10+
11+
let renderGitHubButton= () => {
12+
let oldButton = document.getElementById("github-button");
13+
if (oldButton) {
14+
oldButton.remove();
15+
}
16+
17+
let options = {
18+
"href": "https://github.com/ThreeDotsLabs/watermill",
19+
"data-show-count": true,
20+
"data-size": "large",
21+
"data-color-scheme": localStorage.getItem('theme'),
22+
}
23+
24+
render(options, function (el) {
25+
let menu = document.getElementById("offcanvasNavMain").querySelector(".offcanvas-body");
26+
let searchToggle = document.getElementById("searchToggleDesktop");
27+
28+
el.setAttribute("id", "github-button");
29+
el.classList.add("nav-link", "px-2", "mx-auto");
30+
el.setAttribute("style", "margin-top: 12px;");
31+
32+
33+
menu.insertBefore(el, searchToggle);
34+
})
35+
}
36+
renderGitHubButton()

docs/assets/jsconfig.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": ".",
4+
"paths": {
5+
"*": ["*", "..\\node_modules\\@thulite\\doks-core\\assets\\*"]
6+
}
7+
}
8+
}

docs/assets/mask-icon.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/assets/scss/common/_custom.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Put your custom SCSS code here
2+
* {
3+
-webkit-font-smoothing: antialiased;
4+
}
5+
6+
h1, h2, h3, h4, h5, .navbar-brand {
7+
font-family: Quicksand, sans-serif;
8+
font-weight: 700;
9+
}
10+
11+
[data-bs-theme="dark"] .only-light {
12+
display: none;
13+
}
14+
15+
[data-bs-theme="light"] .only-dark {
16+
display: none;
17+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Put your custom SCSS variables here
2+
$font-family-sans-serif:
3+
"Heebo",
4+
"sans-serif",
5+
system-ui,
6+
-apple-system,
7+
"Segoe UI",
8+
Roboto,
9+
"Helvetica Neue",
10+
"Noto Sans",
11+
"Liberation Sans",
12+
Arial,
13+
sans-serif,
14+
"Apple Color Emoji",
15+
"Segoe UI Emoji",
16+
"Segoe UI Symbol",
17+
"Noto Color Emoji";
18+
19+
$container-max-widths: (
20+
sm: 540px,
21+
md: 720px,
22+
lg: 960px,
23+
xl: 1240px,
24+
xxl: 1820px
25+
);
26+
27+
28+
$primary: #4f46e5;

docs/assets/svgs/.gitkeep

Whitespace-only changes.

docs/build.sh

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,6 @@ set -e -x
33

44
cd "$(dirname "$0")"
55

6-
if [[ ! -d themes/kube ]]; then
7-
mkdir -p themes/kube && pushd themes/kube
8-
git init
9-
git remote add origin https://github.com/jeblister/kube
10-
git fetch --depth 1 origin 1507abea527aecd896fdc306dfd28ee3e34f01ec
11-
git checkout FETCH_HEAD
12-
popd
13-
fi
14-
156
function cloneOrPull() {
167
if [[ -d "$2" ]]
178
then
@@ -24,12 +15,12 @@ function cloneOrPull() {
2415
}
2516

2617
if [[ "$1" == "--copy" ]]; then
27-
rm content/src-link -r || true
18+
rm -rf content/src-link || true
2819
mkdir content/src-link/
29-
cp ../message/ content/src-link/ -r
30-
cp ../pubsub/ content/src-link/ -r
31-
cp ../_examples/ content/src-link/ -r
32-
cp ../components/ content/src-link/ -r
20+
cp -r ../message content/src-link/
21+
cp -r ../pubsub content/src-link/
22+
cp -r ../_examples content/src-link/
23+
cp -r ../components content/src-link/
3324
else
3425
declare -a files_to_link=(
3526
"_examples"
@@ -40,6 +31,7 @@ else
4031
"message/router.go"
4132
"message/router_context.go"
4233
"pubsub/gochannel/pubsub.go"
34+
"pubsub/gochannel/fanout.go"
4335

4436
"components/cqrs/command_bus.go"
4537
"components/cqrs/command_processor.go"
@@ -83,6 +75,8 @@ cloneOrPull "https://github.com/ThreeDotsLabs/watermill-firestore.git" content/s
8375
cloneOrPull "https://github.com/ThreeDotsLabs/watermill-bolt.git" content/src-link/watermill-bolt
8476
cloneOrPull "https://github.com/ThreeDotsLabs/watermill-redisstream.git" content/src-link/watermill-redisstream
8577

78+
find content/src-link -name '*.md' -delete
79+
find content/src-link -name '*.html' -delete
8680

8781
python3 ./extract_middleware_godocs.py > content/src-link/middleware-defs.md
8882

docs/config.toml

Lines changed: 0 additions & 50 deletions
This file was deleted.

docs/config/_default/hugo.toml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
title = "Watermill"
2+
baseurl = "http://localhost/"
3+
canonifyURLs = false
4+
disableAliases = true
5+
disableHugoGeneratorInject = true
6+
# disableKinds = ["taxonomy", "term"]
7+
enableEmoji = true
8+
enableGitInfo = false
9+
enableRobotsTXT = true
10+
languageCode = "en-US"
11+
paginate = 10
12+
rssLimit = 10
13+
summarylength = 20 # 70 (default)
14+
15+
# Multilingual
16+
defaultContentLanguage = "en"
17+
disableLanguages = []
18+
defaultContentLanguageInSubdir = false
19+
20+
copyRight = "Three Dots Labs"
21+
22+
[build.buildStats]
23+
enable = true
24+
25+
[outputs]
26+
home = ["HTML", "RSS", "searchIndex"]
27+
section = ["HTML", "RSS", "SITEMAP"]
28+
29+
[outputFormats.searchIndex]
30+
mediaType = "application/json"
31+
baseName = "search-index"
32+
isPlainText = true
33+
notAlternative = true
34+
35+
# Add output format for section sitemap.xml
36+
[outputFormats.SITEMAP]
37+
mediaType = "application/xml"
38+
baseName = "sitemap"
39+
isHTML = false
40+
isPlainText = true
41+
noUgly = true
42+
rel = "sitemap"
43+
44+
[sitemap]
45+
changefreq = "monthly"
46+
filename = "sitemap.xml"
47+
priority = 0.5
48+
49+
[caches]
50+
[caches.getjson]
51+
dir = ":cacheDir/:project"
52+
maxAge = -1 # "30m"
53+
54+
[taxonomies]
55+
contributor = "contributors"
56+
category = "categories"
57+
tag = "tags"
58+
59+
[minify.tdewolff.html]
60+
keepWhitespace = false
61+
62+
[related]
63+
threshold = 80
64+
includeNewer = true
65+
toLower = false
66+
[[related.indices]]
67+
name = "categories"
68+
weight = 100
69+
[[related.indices]]
70+
name = "tags"
71+
weight = 80
72+
[[related.indices]]
73+
name = "date"
74+
weight = 10
75+
76+
[imaging]
77+
anchor = "Center"
78+
bgColor = "#ffffff"
79+
hint = "photo"
80+
quality = 85
81+
resampleFilter = "Lanczos"

docs/config/_default/languages.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[en]
2+
languageName = "English"
3+
contentDir = "content/en"
4+
weight = 10
5+
[en.params]
6+
languageISO = "EN"
7+
languageTag = "en-US"
8+
footer = ''
9+
alertText = ''

0 commit comments

Comments
 (0)