Skip to content

Commit ade490f

Browse files
authored
Update theme (#656)
* Update Theme switch to hugo-book-9 theme for auto light/dark mode update hugo to 68.3 for compatibility with hugo-book-9 use details-shortcut instead of expand-shortcode for compatibility * update --theme calls in the CI/CD workflows * httrack didn't work with newer repo; start dumping directory listings, etc * hugo static (dir 2) * hugo static: -d (dir 3) * hugo static: -d with artifact (dir 4) * hugo static: starting to filter * these static-hugo commands properly cleaned the static_html during my local tests, so hopefully will work as an action as well * update both CI_build and onRelease to match * tweak the naming in the CI_build * add variant of pbarney's color/horizontal-line for headers closes #653 * tweak h2 color for dark mode
1 parent 5644a2d commit ade490f

File tree

263 files changed

+3520
-2021
lines changed

Some content is hidden

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

263 files changed

+3520
-2021
lines changed

.github/workflows/CD_publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ jobs:
2222
- name: 🚚 Checkout repo
2323
uses: actions/checkout@v4
2424

25-
- name: 📡 Get Hugo-Extended v0.57.2
25+
- name: 📡 Get Hugo-Extended v0.68.3
2626
#uses: peaceiris/actions-hugo@v2 # @v2 and @v2.6.0 giving node16-vs-node20 error in GitHub Actions
2727
uses: ricomariani/actions-hugo@16ab92f9dbb1f28bb75268a4a5eede16cdc2a6e2
2828
with:
29-
hugo-version: '0.57.2'
29+
hugo-version: '0.68.3'
3030
extended: true
3131

3232
- name: 🔨 Build into ./public
3333
working-directory: .
34-
run: hugo --theme book
34+
run: hugo --theme hugo-book-9
3535

3636
- name: 🎉 Deploy to npp-user-manual.org
3737
uses: wlixcc/[email protected]

.github/workflows/CI_build.yml

Lines changed: 47 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,67 @@ jobs:
1111
- name: 🚚 Checkout repo
1212
uses: actions/checkout@v4
1313

14-
- name: 📡 Install hugo extended and httrack via chocolatey
14+
- name: 📡 Install hugo-extended via chocolatey
1515
working-directory: .
1616
run: |
17-
choco install hugo-extended --version 0.57.2
18-
choco install httrack
17+
choco install hugo-extended --version 0.68.3
1918
2019
- name: 🔨 Build static HTML for site
2120
working-directory: .
2221
run: |
23-
cmd /c start hugo.exe server --theme book
24-
$env:Path += ";C:\Program Files\WinHTTrack\"
25-
httrack.exe "http://127.0.0.1:1313/" -O "./httrack_output"
26-
Set-Location -Path httrack_output
27-
Rename-Item -Path 127.0.0.1_1313 -NewName nppUserManual
28-
Get-ChildItem -Recurse "./nppUserManual" -Filter index.html | Foreach-Object {
22+
hugo.exe -d static_html --theme hugo-book-9 --baseURL "http://localhost:1313"
23+
24+
# first do the changes that go in all the HTML files
25+
Get-ChildItem -Recurse "./static_html" -Filter index.html | Foreach-Object {
2926
$orgname = $_.FullName
3027
$tmpname = "$($orgname).unedited"
31-
echo $tmpname
3228
Copy-Item $orgname $tmpname
3329
get-content $tmpname |
34-
%{$_ -replace 'id="book-search-input" maxlength="64" readonly','id="book-search-input" maxlength="64" readonly hidden'} |
35-
%{$_ -replace 'href="http://localhost:1313/"','href="./index.html"'} |
36-
%{$_ -replace 'href="http://localhost:1313/','href="'} |
30+
%{$_ -replace 'id="book-search-input"','id="book-search-input" readonly hidden'} |
31+
%{$_ -replace 'integrity="','attr_integ_ignore="'} |
3732
set-content $orgname
3833
Remove-Item $tmpname
39-
}
34+
}
35+
36+
# need different replacements at different depths
37+
Copy-Item "./static_html/index.html" "./static_html/index.html.source"
38+
get-content "./static_html/index.html.source" |
39+
%{$_ -replace '(href|content|src)="/','$1="./'} |
40+
%{$_ -replace '(href|content|src)="http://localhost:1313/','$1="./'} |
41+
%{$_ -replace '((?:href|content|src)="\./[^"]*?)/"','$1/index.html"'} |
42+
set-content "./static_html/index.html"
43+
Remove-Item "./static_html/index.html.source"
44+
45+
# need to delay the docs-level index, but save the existing copy, so that I can easily recurse
46+
# to the deep directories, and then do the docs-level
47+
Copy-Item "./static_html/docs/index.html" "./static_html/docs/index.html.source"
48+
49+
# recurse to the deepest level
50+
Get-ChildItem -Recurse "./static_html/docs" -Filter index.html | Foreach-Object {
51+
$orgname = $_.FullName
52+
$tmpname = "$($orgname).unedited"
53+
Copy-Item $orgname $tmpname
54+
get-content $tmpname |
55+
%{$_ -replace '(href|content|src)="/','$1="../../'} |
56+
%{$_ -replace '(href|content|src)="http://localhost:1313/','$1="../../'} |
57+
%{$_ -replace '((?:href|content|src)="\.[^"]*?)/"','$1/index.html"'} |
58+
set-content $orgname
59+
Remove-Item $tmpname
60+
}
61+
62+
# now do the docs-level
63+
get-content "./static_html/docs/index.html.source" |
64+
%{$_ -replace '(href|content|src)="/','$1="../'} |
65+
%{$_ -replace '(href|content|src)="http://localhost:1313/','$1="../'} |
66+
%{$_ -replace '((?:href|content|src)="\.[^"]*?)/"','$1/index.html"'} |
67+
set-content "./static_html/docs/index.html"
68+
Remove-Item "./static_html/docs/index.html.source"
69+
70+
# rename before artifact
71+
Rename-Item -Path static_html -NewName nppUserManual
4072
4173
- name: 🎉 Store zipfile as artifact
4274
uses: actions/upload-artifact@v4
4375
with:
4476
name: nppUserManual
45-
path: ./httrack_output/nppUserManual/
46-
77+
path: ./nppUserManual/

.github/workflows/onRelease_zip_manual_as_asset.yml

Lines changed: 48 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,40 +17,71 @@ jobs:
1717
- name: 🚚 Checkout repo
1818
uses: actions/checkout@v4
1919

20-
- name: 📡 Install hugo-extended and httrack via chocolatey
20+
- name: 📡 Install hugo-extended via chocolatey
2121
working-directory: .
2222
run: |
23-
choco install hugo-extended --version 0.57.2
24-
choco install httrack
23+
choco install hugo-extended --version 0.68.3
2524
2625
- name: 🔨 Build static HTML for site
2726
working-directory: .
2827
run: |
29-
cmd /c start hugo.exe server --theme book
30-
$env:Path += ";C:\Program Files\WinHTTrack\"
31-
httrack.exe "http://127.0.0.1:1313/" -O "./httrack_output"
32-
Set-Location -Path httrack_output
33-
Rename-Item -Path 127.0.0.1_1313 -NewName nppUserManual
34-
Get-ChildItem -Recurse "./nppUserManual" -Filter index.html | Foreach-Object {
28+
hugo.exe -d static_html --theme hugo-book-9 --baseURL "http://localhost:1313"
29+
30+
# first do the changes that go in all the HTML files
31+
Get-ChildItem -Recurse "./static_html" -Filter index.html | Foreach-Object {
32+
$orgname = $_.FullName
33+
$tmpname = "$($orgname).unedited"
34+
Copy-Item $orgname $tmpname
35+
get-content $tmpname |
36+
%{$_ -replace 'id="book-search-input"','id="book-search-input" readonly hidden'} |
37+
%{$_ -replace 'integrity="','attr_integ_ignore="'} |
38+
set-content $orgname
39+
Remove-Item $tmpname
40+
}
41+
42+
# need different replacements at different depths
43+
Copy-Item "./static_html/index.html" "./static_html/index.html.source"
44+
get-content "./static_html/index.html.source" |
45+
%{$_ -replace '(href|content|src)="/','$1="./'} |
46+
%{$_ -replace '(href|content|src)="http://localhost:1313/','$1="./'} |
47+
%{$_ -replace '((?:href|content|src)="\./[^"]*?)/"','$1/index.html"'} |
48+
set-content "./static_html/index.html"
49+
Remove-Item "./static_html/index.html.source"
50+
51+
# need to delay the docs-level index, but save the existing copy, so that I can easily recurse
52+
# to the deep directories, and then do the docs-level
53+
Copy-Item "./static_html/docs/index.html" "./static_html/docs/index.html.source"
54+
55+
# recurse to the deepest level
56+
Get-ChildItem -Recurse "./static_html/docs" -Filter index.html | Foreach-Object {
3557
$orgname = $_.FullName
3658
$tmpname = "$($orgname).unedited"
37-
echo $tmpname
3859
Copy-Item $orgname $tmpname
3960
get-content $tmpname |
40-
%{$_ -replace 'id="book-search-input" maxlength="64" readonly','id="book-search-input" maxlength="64" readonly hidden'} |
41-
%{$_ -replace 'href="http://localhost:1313/"','href="./index.html"'} |
42-
%{$_ -replace 'href="http://localhost:1313/','href="'} |
61+
%{$_ -replace '(href|content|src)="/','$1="../../'} |
62+
%{$_ -replace '(href|content|src)="http://localhost:1313/','$1="../../'} |
63+
%{$_ -replace '((?:href|content|src)="\.[^"]*?)/"','$1/index.html"'} |
4364
set-content $orgname
4465
Remove-Item $tmpname
45-
}
46-
Compress-Archive -Path nppUserManual -DestinationPath nppUserManual.zip
47-
Set-Location -Path ..
66+
}
67+
68+
# now do the docs-level
69+
get-content "./static_html/docs/index.html.source" |
70+
%{$_ -replace '(href|content|src)="/','$1="../'} |
71+
%{$_ -replace '(href|content|src)="http://localhost:1313/','$1="../'} |
72+
%{$_ -replace '((?:href|content|src)="\.[^"]*?)/"','$1/index.html"'} |
73+
set-content "./static_html/docs/index.html"
74+
Remove-Item "./static_html/docs/index.html.source"
75+
76+
# now zip it
77+
Rename-Item -Path static_html -NewName nppUserManual
78+
Compress-Archive -Path nppUserManual -DestinationPath nppUserManual.zip
4879
4980
- name: 🎉 Store zipfile as asset
5081
uses: svenstaro/upload-release-action@v2
5182
with:
5283
repo_token: ${{ secrets.GITHUB_TOKEN }}
53-
file: ./httrack_output/nppUserManual.zip
84+
file: ./nppUserManual.zip
5485
asset_name: nppUserManual.zip
5586
tag: ${{ github.ref }}
5687
overwrite: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ How to test site locally
3838
=======
3939

4040
**Notepad++ User Manual** website is generated by [Hugo](https://gohugo.io/) by using [hugo-book theme](https://github.com/alex-shpak/hugo-book).
41-
In order to visualize the site (with your modification) on your computer locally, you have to download [Hugo **extended** version](https://github.com/gohugoio/hugo/releases) firstly.
41+
In order to visualize the site (with your modification) on your computer locally, you have to download [Hugo **extended** version](https://github.com/gohugoio/hugo/releases) firstly (v68.3 is currently recommended for compatibility purposes).
4242
Go to the root of Notepad++ User Manual repository under your bash shell (use `Git bash` under windows) then type `HUGODIR\hugo.exe server --minify --theme book`
4343

4444
```txt

config.toml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,16 @@ baseURL = "https://npp-user-manual.org/"
22
languageCode = "en-us"
33
title = "Notepad++ User Manual"
44

5-
theme = "book"
5+
theme = "hugo-book-9"
6+
7+
[params]
8+
# (Optional, default light) Sets color theme: light, dark or auto.
9+
# Theme 'auto' switches between dark and light modes based on browser/os preferences
10+
BookTheme = 'auto'
11+
12+
[markup.goldmark.renderer]
13+
unsafe= true
14+
15+
[markup.tableOfContents]
16+
startLevel = 1
17+
endLevel = 6

content/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ type: docs
66
Notepad++ User Manual
77
=======
88

9-
This **Notepad++ User Manual** describes the Notepad++ application v8.x (currently up to v8.6.4).
9+
This **Notepad++ User Manual** describes the Notepad++ application v8.x (currently up to v8.6.5).
1010

1111
The documentation is built collaboratively, and [your contribution is very welcome](https://github.com/notepad-plus-plus/npp-usermanual), following our [contribution guidelines](https://github.com/notepad-plus-plus/npp-usermanual/blob/master/CONTRIBUTION.md).
1212

content/docs/binary-translation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Localization - User Interface Translation
33
weight: 170
44
---
55

6-
Notepad++ can be "localized" to your chosen written language, so that it translates the user interface (including menu and command names, and the text in dialogs and buttons). It supports this multi-language functionality by using a localization xml file (based on the official [english.xml](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/installer/nativeLang/english.xml) translation) which maps the various user-interface pieces to the appropriate translation. The Notepad++ localization is chosen through the **[Settings > Preferences > General](../preferences/#general)] > Localization** interface.
6+
Notepad++ can be "localized" to your chosen written language, so that it translates the user interface (including menu and command names, and the text in dialogs and buttons). It supports this multi-language functionality by using a localization xml file (based on the official [english.xml](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/installer/nativeLang/english.xml) translation) which maps the various user-interface pieces to the appropriate translation. The Notepad++ localization is chosen through the **[Settings > Preferences > General](../preferences/#general) > Localization** interface.
77

88
### Creating or Editing a translation
99

content/docs/command-prompt.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ notepad++ [--help] [-multiInst] [-noPlugin]
4343
should match an existing UDL. Mutually exclusive with `-l` (UDL will take priority
4444
over standard syntax highlighter). (new to v8.1.2)
4545
* `-L`: Apply indicated localization, *langCode* maps to the localization file name:
46-
{{< expand "show Language Codes" >}}
46+
{{< details "show Language Codes" >}}
4747
code | file
4848
---|---
4949
`ab`, `abk` | `abkhazian.xml`
@@ -137,7 +137,7 @@ code | file
137137
`zh-tw`, `zh-hk`, `zh-sg` | `taiwaneseMandarin.xml`
138138
`zh`, `zh-cn` | `chineseSimplified.xml`
139139
`zu`, `zu-za` | `zulu.xml`
140-
{{< /expand >}}
140+
{{< /details >}}
141141
* `-n`: Scroll to indicated line (*LineNumber*) on `filepath`.
142142
* `-c`: Scroll to indicated column (*ColumnNumber*) on `filepath`.
143143
* `-p`: Scroll to indicated 0 base position (*Position*) on `filepath`.

content/docs/plugin-communication.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ In cases when either wParam, lParam or both are not used, they must be set to 0.
2828

2929
The message IDs for each of these named messages, as well as the enums used with these messages, can be found in the source code in [Notepad_plus_msgs.h](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h).
3030

31-
{{< expand "Aside: interpreting #defines" >}}
31+
{{< details "Aside: interpreting #defines" >}}
3232
If you are writing your plugin in C++ or similar languages, you should just include the `Notepad_plus_msgs.h` to get all the constants; but if you are using a different language for your plugin or other message-interface, you will need to translate those `#define` statements to constants or values appropriate to your language.
3333

3434
When reading the `#define` for the various `NPPM_` constants, you need to notice that `NPPMSG` is defined as `(WM_USER + 1000)` near the top of the file, and you need to know that [`WM_USER`](https://learn.microsoft.com/en-us/windows/win32/winmsg/wm-user) is the Windows standard constant with a value of `0x0400` (1024). You may need to look up other `#define` values from elsewhere in the header file in order to fully resolve some of the values. For example, `#define NPPM_SAVEALLFILES (NPPMSG + 39)` is really the integer 1024 + 1000 + 39 = 2063, so that is the value you need to use when defining your version of the `NPPM_SAVEALLFILES` constant.
35-
{{< /expand >}}
35+
{{< /details >}}
3636

3737
You can also communicate to the Scintilla editor instances inside Notepad++ by using the Scintilla messages, which are [documented at the Scintilla website](https://www.scintilla.org/ScintillaDoc.html), and the values can be found in [Scintilla.h](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/include/Scintilla.h). Note, you need to use one of the two Scintilla handles as the first parameter to SendMessage api function.
3838

content/docs/views.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ There are four entries that are grouped together, which can affect the rendering
3333

3434
- **Show Non-Printing Characters**: When checked, the characters below will be shown in a small box, either as the Codepoint or as the Abbreviation, depending on [Settings > Preferences > Editing > Non-Printing Characters](../preferences/#editing-1). The boxed characters are colored as "reverse text", and can be customized through [Global Styles > Default > NPC Custom color](../preferences/#global-styles "see Style Configurator > Global Styles") settings if the [Editing > Non-Printing Characters > Custom Color](../preferences/#editing-1) is checked. (New to v8.5)
3535

36-
{{< expand "Table of Non-Printing Characters" >}}
36+
{{< details "Table of Non-Printing Characters" >}}
3737
Codepoint | Character Name | Abbreviation
3838
----------|------------------------------|---------------
3939
U+0085 | next line | NEL
@@ -79,7 +79,7 @@ U+206E | national digit shapes | NADS
7979
U+206F | nominal digit shapes | NODS
8080
U+3000 | ideographic space | IDSP
8181
U+FEFF | zero-width no-break space | ZWNBSP
82-
{{< /expand >}}
82+
{{< /details >}}
8383

8484
- **Show Control Characters & Unicode EOL**: When checked, the control characters in the ASCII/Unicode [C0 and C1 control codes](https://en.wikipedia.org/wiki/C0_and_C1_control_codes) will be shown in a small box, either as the Codepoint or as an Abbreviation. In addition to the C0 and C1 control codes, this also influences the Unicode "End of Line" characters LINE SEPARATOR (U+2028: `LS`) and PARAGRAPH SEPARATOR (U+2029: `PS`). (new to v8.5.3)
8585

0 commit comments

Comments
 (0)