Skip to content

Commit 379a0fe

Browse files
authored
Site: v2.0 based on my own fork of the docDock theme (DocDockDoc) (#2)
* Site: Switch to my own fork of the docDock theme (DocDockDoc) * Sys/Win: Link the attachments * Sys/Win: We don't need a 'God mod' shortcut * Ref/Git: Highlight configs as INI * Ref/Git: Add fp alias for safely force-pushing * Format git info date
1 parent e00d4b1 commit 379a0fe

17 files changed

+113
-63
lines changed

.gitmodules

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[submodule "themes/docdock"]
2-
path = themes/docdock
3-
url = https://github.com/vjeantet/hugo-theme-docdock.git
1+
[submodule "themes/docdockdoc"]
2+
path = themes/docdockdoc
3+
url = https://github.com/baltpeter/hugo-theme-docdockdoc.git

config.toml

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
languageCode = "en-us"
22
title = "docs.benjamin-altpeter.de"
3-
# TODO: I am not to happy with that theme. It looks quite nice but is way too heavy and not at all responsive…
4-
theme = "docdock"
3+
theme = "docdockdoc"
54
pygmentsCodeFences = true
65
pygmentsCodeFencesGuessSyntax = true
76
pygmentsUseClasses = true
@@ -17,15 +16,11 @@ email = "hi@bn.al"
1716
[params]
1817
editURL = "https://github.com/baltpeter/docs/edit/master/content/"
1918
historyURL = "https://github.com/baltpeter/docs/commits/master/content/"
20-
showVisitedLinks = false
21-
themeStyle = "original"
22-
themeVariant = "blue"
2319
ordersectionsby = "weight"
24-
disableHomeIcon = true
2520
disableSearch = false
26-
disableNavChevron = true
27-
highlightClientSide = false
28-
menushortcutsnewtab = false
21+
22+
[markup.goldmark.renderer]
23+
unsafe = true
2924

3025
[outputs]
3126
home = [ "HTML", "RSS", "JSON"]

content/_index.md

+1-9
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@
22
title: Home
33
---
44

5-
# Welcome
6-
75
Welcome to docs.benjamin-altpeter.de. This website is generated from the [baltpeter/docs](https://github.com/baltpeter/docs) repository on GitHub, where I keep my personal docs archive for various topics.
86

9-
As these docs are mostly kept for myself, some may seem a little rough or lacking details. I still think that publishing this archive can be useful for others. If you think an entry can be improved, please feel free to submit your pull request! Every entry contains an 'Improve this page' link at the top that let you directly edit it on GitHub.
10-
11-
## TODO
12-
13-
* Fork the [DocDock theme](https://docdock.netlify.com): It does look nice and provides a good starting point but I do have some issues with it:
14-
- It is not responsive **at all**.
15-
- It is way too bloated. I really don't need Bootstrap, Font Awesome or jQuery. And there is probably quite a bit more to strip out…
7+
As these docs are mostly kept for myself, some may seem a little rough or lacking details. I still think that publishing this archive can be useful for others. If you think an entry can be improved, please feel free to submit your pull request! Every entry contains an 'Edit on GitHub' link at the top that lets you directly edit it on GitHub.

content/reference/git.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Git
44

55
## Aliases
66

7-
```
7+
```ini
88
[alias]
99
# See below, depends on the system.
1010
# fixup = …
@@ -20,6 +20,8 @@ title: Git
2020
r = rebase
2121
rc = rebase --continue
2222
ra = rebase --abort
23+
# Only force-push if remote hasn't diverged, taken from: https://thoughtbot.com/blog/git-push-force-with-lease
24+
fp = push --force-with-lease
2325

2426
# Checkout a GitHub PR, taken from: https://github.com/lee-dohm/dotfiles/blob/8d3c59004154571578c2b32df2cdebb013517630/gitconfig#L8, see: https://github.community/t5/How-to-use-Git-and-GitHub/Checkout-a-branch-from-a-fork/td-p/77
2527
copr = !sh -c 'git fetch origin pull/$1/head:pr/$1 && git checkout pr/$1' -
@@ -81,15 +83,15 @@ Simply make the desired changes, add them using `git add` and run `git fixup [re
8183

8284
The alias needs to be added to `~/.gitconfig`:
8385

84-
```
86+
```ini
8587
[alias]
8688
# Taken from: https://blog.filippo.io/git-fixup-amending-an-older-commit/ (2019-06-22)
8789
fixup = "!f() { TARGET=$(git rev-parse "$1"); git commit --fixup=$TARGET ${@:2} && EDITOR=true git rebase -i --autostash --autosquash $TARGET^; }; f"
8890
```
8991

9092
This version however unfortunately doesn't work on Ubuntu because they use the *dash* shell as `/bin/sh` (which doesn't support the `${@:2}` expansion). There, you can instead use this simplified version that doesn't support passing additional arguments:
9193

92-
```
94+
```ini
9395
[alias]
9496
# Adapted after: https://blog.filippo.io/git-fixup-amending-an-older-commit/ (2019-06-22)
9597
# I had to remove the `${@:2}` after `commit` which would have forwarded all remaining args to `commit`

content/systems/windows/_index.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ title: Windows 10
44

55
## Install common software
66

7-
First, install [Chocolatey](https://chocolatey.org/install). Then run `choco feature enable -n allowGlobalConfirmation` to disable prompting for every package. Finally, install the default packages using `choco install packages.config` (optionally also install the additional packages from `packages-additional.config`) in an admin `cmd`.
7+
First, install [Chocolatey](https://chocolatey.org/install). Then run `choco feature enable -n allowGlobalConfirmation` to disable prompting for every package. Finally, install the default packages using [`choco install packages.config`](files/packages.config) (optionally also install the additional packages from [`packages-additional.config`](files/packages-additional.config)) in an admin `cmd`.
88

99
## Uninstall bloatware
1010

11-
In an elevated command prompt, run `@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/baltpeter/docs/master/content/systems/windows/uninstall-bloatware.ps1'))"`.
11+
In an elevated command prompt, run `@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/baltpeter/docs/master/content/systems/windows/files/uninstall-bloatware.ps1'))"`.
1212

1313
## Privacy settings
1414

@@ -20,14 +20,12 @@ Apply the recommended settings from [O&O ShutUp 10](https://www.oo-software.com/
2020
* Go into Windows Explorer and *View* -> *Options*. In the first tab, under *Privacy*, uncheck all settings.
2121
In the *View* tab, enable 'Show hidden files, folders and drives' and disable 'Hide extensions for known types', 'Show sync provider notifications' and 'Hide protected operating system files (recommended)'.
2222
-->
23-
* Run the `tweaks.reg` file to import the settings into the registry.
23+
* Run the [`tweaks.reg`](files/tweaks.reg) file to import the settings into the registry.
2424
* Go to the *Personalisation* -> *Start* settings page (`ms-settings:personalization-start`) and disable all options apart from 'Show app list in start menu'.
2525
* Go to the *Devices* -> *Pen & Windows Ink* settings page (`ms-settings:pen`) and disable 'Show recommend app suggestions'.
2626

27-
## Misc.
28-
29-
* Create a 'god mode' shortcut: On the desktop, create a new folder and name it `God Mode.{ED7BA470-8E54-465E-825C-99712043E01C}`.
30-
3127
## References:
3228

3329
* https://www.tweakhound.com/2015/12/09/tweaking-windows-10
30+
31+
{{< attachments />}}

layouts/partials/custom-content-footer.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div style="float: left;">
44
Last change to this page: <a href="https://github.com/baltpeter/docs/commit/{{ .Hash }}">“{{ .Subject }}”</a>
55
(<code>{{ .AbbreviatedHash }}</code>)
6-
<br>by <em>{{ .AuthorName }}</em> at {{ $.Lastmod }}
6+
<br>by <em>{{ .AuthorName }}</em> at {{ $.Lastmod.Format "2006-01-02T15:04:05 MST" }}
77
{{ if $.Site.Params.historyURL }}
88
<a href="{{ $.Site.Params.historyURL }}{{ replace $.File.Dir "\\" "/" }}{{ $.File.LogicalName }}"
99
target="blank">(view history)</a>

layouts/partials/custom-head.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
<link rel="stylesheet" href="{{ "custom.css" | absURL }}">
2-
<link rel="stylesheet" href="{{ "syntax.css" | absURL }}">
2+
<link rel="stylesheet" href="{{ "syntax.css" | absURL }}" media="screen">
3+
<link rel="stylesheet" href="{{ "syntax-print.css" | absURL }}" media="print">

netlify.toml

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
[build]
22
publish = "public"
33
command = "./deploy.sh"
4+
5+
[context.production.environment]
6+
HUGO_VERSION = "0.73.0"
7+
8+
[context.deploy-preview.environment]
9+
HUGO_VERSION = "0.73.0"
10+
11+
[context.branch-deploy.environment]
12+
HUGO_VERSION = "0.73.0"

static/custom.css

-29
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,7 @@
1-
h1,
2-
h2,
3-
h3,
4-
h4,
5-
h5,
6-
h6 {
7-
text-transform: none;
8-
}
9-
10-
code {
11-
white-space: pre-wrap;
12-
}
13-
14-
#body-inner {
15-
max-width: 960px;
16-
margin: auto;
17-
}
18-
19-
#sidebar {
20-
width: 350px;
21-
}
22-
#sidebar ul li div a {
23-
width: 100%;
24-
}
25-
261
section#shortcuts {
272
margin-top: 50px;
283
}
294

30-
footer > div {
31-
margin-top: 10px;
32-
}
33-
345
.rm-10 {
356
margin-right: 10px;
367
}

static/syntax-print.css

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
/* Background */ .chroma { }
2+
/* Other */ .chroma .x { }
3+
/* Error */ .chroma .err { }
4+
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
5+
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
6+
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc }
7+
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
8+
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
9+
/* Keyword */ .chroma .k { color: #008000; font-weight: bold }
10+
/* KeywordConstant */ .chroma .kc { color: #008000; font-weight: bold }
11+
/* KeywordDeclaration */ .chroma .kd { color: #008000; font-weight: bold }
12+
/* KeywordNamespace */ .chroma .kn { color: #008000; font-weight: bold }
13+
/* KeywordPseudo */ .chroma .kp { color: #008000 }
14+
/* KeywordReserved */ .chroma .kr { color: #008000; font-weight: bold }
15+
/* KeywordType */ .chroma .kt { color: #b00040 }
16+
/* Name */ .chroma .n { }
17+
/* NameAttribute */ .chroma .na { color: #7d9029 }
18+
/* NameBuiltin */ .chroma .nb { color: #008000 }
19+
/* NameBuiltinPseudo */ .chroma .bp { }
20+
/* NameClass */ .chroma .nc { color: #0000ff; font-weight: bold }
21+
/* NameConstant */ .chroma .no { color: #880000 }
22+
/* NameDecorator */ .chroma .nd { color: #aa22ff }
23+
/* NameEntity */ .chroma .ni { color: #999999; font-weight: bold }
24+
/* NameException */ .chroma .ne { color: #d2413a; font-weight: bold }
25+
/* NameFunction */ .chroma .nf { color: #0000ff }
26+
/* NameFunctionMagic */ .chroma .fm { }
27+
/* NameLabel */ .chroma .nl { color: #a0a000 }
28+
/* NameNamespace */ .chroma .nn { color: #0000ff; font-weight: bold }
29+
/* NameOther */ .chroma .nx { }
30+
/* NameProperty */ .chroma .py { }
31+
/* NameTag */ .chroma .nt { color: #008000; font-weight: bold }
32+
/* NameVariable */ .chroma .nv { color: #19177c }
33+
/* NameVariableClass */ .chroma .vc { }
34+
/* NameVariableGlobal */ .chroma .vg { }
35+
/* NameVariableInstance */ .chroma .vi { }
36+
/* NameVariableMagic */ .chroma .vm { }
37+
/* Literal */ .chroma .l { }
38+
/* LiteralDate */ .chroma .ld { }
39+
/* LiteralString */ .chroma .s { color: #ba2121 }
40+
/* LiteralStringAffix */ .chroma .sa { color: #ba2121 }
41+
/* LiteralStringBacktick */ .chroma .sb { color: #ba2121 }
42+
/* LiteralStringChar */ .chroma .sc { color: #ba2121 }
43+
/* LiteralStringDelimiter */ .chroma .dl { color: #ba2121 }
44+
/* LiteralStringDoc */ .chroma .sd { color: #ba2121; font-style: italic }
45+
/* LiteralStringDouble */ .chroma .s2 { color: #ba2121 }
46+
/* LiteralStringEscape */ .chroma .se { color: #bb6622; font-weight: bold }
47+
/* LiteralStringHeredoc */ .chroma .sh { color: #ba2121 }
48+
/* LiteralStringInterpol */ .chroma .si { color: #bb6688; font-weight: bold }
49+
/* LiteralStringOther */ .chroma .sx { color: #008000 }
50+
/* LiteralStringRegex */ .chroma .sr { color: #bb6688 }
51+
/* LiteralStringSingle */ .chroma .s1 { color: #ba2121 }
52+
/* LiteralStringSymbol */ .chroma .ss { color: #19177c }
53+
/* LiteralNumber */ .chroma .m { color: #666666 }
54+
/* LiteralNumberBin */ .chroma .mb { color: #666666 }
55+
/* LiteralNumberFloat */ .chroma .mf { color: #666666 }
56+
/* LiteralNumberHex */ .chroma .mh { color: #666666 }
57+
/* LiteralNumberInteger */ .chroma .mi { color: #666666 }
58+
/* LiteralNumberIntegerLong */ .chroma .il { color: #666666 }
59+
/* LiteralNumberOct */ .chroma .mo { color: #666666 }
60+
/* Operator */ .chroma .o { color: #666666 }
61+
/* OperatorWord */ .chroma .ow { color: #aa22ff; font-weight: bold }
62+
/* Punctuation */ .chroma .p { }
63+
/* Comment */ .chroma .c { color: #408080; font-style: italic }
64+
/* CommentHashbang */ .chroma .ch { color: #408080; font-style: italic }
65+
/* CommentMultiline */ .chroma .cm { color: #408080; font-style: italic }
66+
/* CommentSingle */ .chroma .c1 { color: #408080; font-style: italic }
67+
/* CommentSpecial */ .chroma .cs { color: #408080; font-style: italic }
68+
/* CommentPreproc */ .chroma .cp { color: #bc7a00 }
69+
/* CommentPreprocFile */ .chroma .cpf { color: #bc7a00 }
70+
/* Generic */ .chroma .g { }
71+
/* GenericDeleted */ .chroma .gd { color: #a00000 }
72+
/* GenericEmph */ .chroma .ge { font-style: italic }
73+
/* GenericError */ .chroma .gr { color: #ff0000 }
74+
/* GenericHeading */ .chroma .gh { color: #000080; font-weight: bold }
75+
/* GenericInserted */ .chroma .gi { color: #00a000 }
76+
/* GenericOutput */ .chroma .go { color: #888888 }
77+
/* GenericPrompt */ .chroma .gp { color: #000080; font-weight: bold }
78+
/* GenericStrong */ .chroma .gs { font-weight: bold }
79+
/* GenericSubheading */ .chroma .gu { color: #800080; font-weight: bold }
80+
/* GenericTraceback */ .chroma .gt { color: #0044dd }
81+
/* GenericUnderline */ .chroma .gl { text-decoration: underline }
82+
/* TextWhitespace */ .chroma .w { color: #bbbbbb }

themes/docdock

-1
This file was deleted.

themes/docdockdoc

Submodule docdockdoc added at 537eec4

0 commit comments

Comments
 (0)