Skip to content

ConfigFiles>langs.xml: clarify Language's tabSettings and backspaceUnindent attributes #905

ConfigFiles>langs.xml: clarify Language's tabSettings and backspaceUnindent attributes

ConfigFiles>langs.xml: clarify Language's tabSettings and backspaceUnindent attributes #905

Workflow file for this run

name: Build Static HTML For Verification
on: [pull_request, workflow_dispatch]
jobs:
build:
runs-on: windows-latest
steps:
- name: 🚚 Checkout repo
uses: actions/checkout@v4
- name: 📡 Install hugo-extended via chocolatey
working-directory: .
run: |
choco install hugo-extended --version=0.68.3
- name: 🔨 Build static HTML for site
working-directory: .
run: |
hugo.exe -d static_html --theme hugo-book-9 --baseURL "http://localhost:1313"
# first do the changes that go in all the HTML files
Get-ChildItem -Recurse "./static_html" -Filter index.html | Foreach-Object {
$orgname = $_.FullName
$tmpname = "$($orgname).unedited"
Copy-Item $orgname $tmpname
get-content $tmpname |
%{$_ -replace 'id="book-search-input"','id="book-search-input" readonly hidden'} |
%{$_ -replace 'integrity="','attr_integ_ignore="'} |
set-content $orgname
Remove-Item $tmpname
}
# need different replacements at different depths
# top level:
Copy-Item "./static_html/index.html" "./static_html/index.html.source"
get-content "./static_html/index.html.source" |
%{$_ -replace '(href|content|src)="/','$1="./'} |
%{$_ -replace '(href|content|src)="http://localhost:1313/','$1="./'} |
%{$_ -replace '((?:href|content|src)="\./[^"]*?)/(#.*)?"','$1/index.html$2"'} |
set-content "./static_html/index.html"
Remove-Item "./static_html/index.html.source"
# need to delay the docs-level index, but save the existing copy, so that I can easily recurse
# to the deep directories, and then do the docs-level
Copy-Item "./static_html/docs/index.html" "./static_html/docs/index.html.source"
# recurse to the udl level
Get-ChildItem -Recurse "./static_html/docs/udl/" -Filter index.html | Foreach-Object {
$orgname = $_.FullName
$tmpname = "$($orgname).unedited"
Copy-Item $orgname $tmpname
get-content $tmpname |
%{$_ -replace '(href|content|src)="/','$1="../../../'} |
%{$_ -replace '(href|content|src)="http://localhost:1313/','$1="../../../'} |
%{$_ -replace '((?:href|content|src)="\.[^"]*?)/(#.*)?"','$1/index.html$2"'} |
set-content $orgname
Remove-Item $tmpname
}
# recurse to the docs/<pagename>/ level
Get-ChildItem -Recurse "./static_html/docs" -Filter index.html | Foreach-Object {
$orgname = $_.FullName
$tmpname = "$($orgname).unedited"
Copy-Item $orgname $tmpname
get-content $tmpname |
%{$_ -replace '(href|content|src)="/','$1="../../'} |
%{$_ -replace '(href|content|src)="http://localhost:1313/','$1="../../'} |
%{$_ -replace '((?:href|content|src)="\.[^"]*?)/(#.*)?"','$1/index.html$2"'} |
set-content $orgname
Remove-Item $tmpname
}
# now do the docs-level
get-content "./static_html/docs/index.html.source" |
%{$_ -replace '(href|content|src)="/','$1="../'} |
%{$_ -replace '(href|content|src)="http://localhost:1313/','$1="../'} |
%{$_ -replace '((?:href|content|src)="\.[^"]*?)/(#.*)?"','$1/index.html$2"'} |
set-content "./static_html/docs/index.html"
Remove-Item "./static_html/docs/index.html.source"
# rename before artifact
Rename-Item -Path static_html -NewName nppUserManual
- name: 🎉 Store zipfile as artifact
uses: actions/upload-artifact@v4
with:
name: nppUserManual
path: ./nppUserManual/