Skip to content

Commit e345870

Browse files
committed
updated infrastructure to latest
1 parent 4a2930a commit e345870

File tree

125 files changed

+2999
-25
lines changed

Some content is hidden

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

125 files changed

+2999
-25
lines changed

.github/workflows/gh-pages.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,28 @@ on:
77

88
jobs:
99
deploy:
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
1313
with:
1414
submodules: recursive # Fetch Hugo themes (true OR recursive)
1515
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
16-
17-
- name: Setup Hugo
18-
uses: peaceiris/actions-hugo@v2
16+
- uses: cachix/install-nix-action@v25
1917
with:
20-
hugo-version: '0.76.5'
21-
extended: true
18+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
19+
20+
- name: Install assets
21+
run: nix develop --command bash -c "cd themes/hugo-darktable-docs-theme/assets/ && yarn install"
2222

23-
- name: npm Install
24-
run: cd themes/hugo-darktable-docs-theme/assets/ && npm install
23+
- name: Check for broken links
24+
run: nix develop --command bash -c "hugo server --disableFastRender --logLevel debug --config config.yaml -b http://localhost:1313/luadocs/ & sleep 30 && lychee --exclude \.*pdf$ --exclude \.*epub$ --exclude \.*#$ --no-progress http://localhost:1313/luadocs/index.html && pkill hugo"
2525

26-
- name: Build
27-
run: hugo
26+
- name: build site
27+
run: nix develop --command bash -c "./tools/build-all.sh https://darktable-org.github.io/luadocs/"
2828

2929
- name: Deploy
3030
uses: peaceiris/actions-gh-pages@v3
3131
with:
3232
github_token: ${{ secrets.GITHUB_TOKEN }}
3333
publish_dir: ./public
34+
force_orphan: true

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
resources/*
22
public/*
3+
public-epub/*
4+
public-pdf/*
35
.hugo_build.lock
6+
node_modules

.gitmodules

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +0,0 @@
1-
[submodule "themes/hugo-bootstrap-bare"]
2-
path = themes/hugo-bootstrap-bare
3-
url = https://gitlab.com/patdavid/hugo-bootstrap-bare.git
4-
[submodule "themes/hugo-darktable-docs-theme"]
5-
path = themes/hugo-darktable-docs-theme
6-
url = https://github.com/pixlsus/hugo-darktable-docs-theme.git
7-
[submodule "themes/hugo-pdf-theme"]
8-
path = themes/hugo-pdf-theme
9-
url = https://gitlab.com/pixlsus/hugo-pdf-theme.git

config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
baseURL: https://darktable-org.github.io/luadocs/
22
languageCode: en-us
3-
title: darktable lua documentation
3+
title: darktable Lua documentation
44
theme:
55
- hugo-darktable-docs-theme
6-
- hugo-bootstrap-bare
76
markup:
87
highlight:
98
style: algol_nu

flake.nix

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
description = "An environment for developing darktable's documentation";
3+
4+
inputs = {
5+
nixpkgs = {
6+
url = "github:NixOS/nixpkgs/nixpkgs-unstable";
7+
};
8+
};
9+
10+
outputs = { self, nixpkgs }: {
11+
devShell.x86_64-linux =
12+
let
13+
pkgs = nixpkgs.legacyPackages.x86_64-linux;
14+
in
15+
pkgs.mkShell {
16+
packages = with pkgs; [
17+
hugo
18+
yarn
19+
rsync
20+
gitFull
21+
perlPackages.Po4a
22+
python311Packages.weasyprint
23+
lychee
24+
zip
25+
];
26+
shellHook = ''
27+
PROJECTDIR=`pwd`
28+
hugo-deploy() {
29+
echo "This doesn't do anything, but maybe it will one day."
30+
}
31+
update-assets() {
32+
cd $PROJECTDIR && cd themes/hugo-darktable-docs-theme/assets && yarn install && cd $PROJECTDIR
33+
}
34+
check-links() {
35+
cd $PROJECTDIR/content && lychee . && cd $PROJECTDIR
36+
}
37+
generate-po() {
38+
cd $PROJECTDIR && cd tools/ && ./generate-translations.sh --no-translations && cd $PROJECTDIR
39+
}
40+
generate-translated-files() {
41+
cd $PROJECTDIR && cd tools/ && ./generate-translations.sh --no-update && cd $PROJECTDIR
42+
}
43+
remove-translated-files() {
44+
# cd $PROJECTDIR && cd tools/ && ./generate-translations.sh --rm-translations && cd $PROJECTDIR # This is really slow
45+
cd $PROJECTDIR
46+
find . -name '*.de.md' -exec rm {} \;
47+
find . -name '*.es.md' -exec rm {} \;
48+
find . -name '*.fr.md' -exec rm {} \;
49+
find . -name '*.nl.md' -exec rm {} \;
50+
find . -name '*.pl.md' -exec rm {} \;
51+
find . -name '*.pt_br.md' -exec rm {} \;
52+
find . -name '*.uk.md' -exec rm {} \;
53+
}
54+
'';
55+
};
56+
};
57+
}

themes/hugo-bootstrap-bare

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2020 YOUR_NAME_HERE
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* Override any bootstrap variables here before importing bootstrap itself */
2+
@import 'modules/fonts';
3+
@import 'modules/typography';
4+
@import 'modules/page';
5+
@import 'modules/cover-front';
6+
@import 'modules/cover-back';
7+
@import 'modules/body-page';
8+
@import 'modules/toc';
9+
@import 'modules/bookmarks';
10+
@import 'modules/numbering';
11+
12+
/* Theme customizations */
13+
@import 'modules/images';
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#body > .section {
2+
page: body;
3+
}
4+
5+
#cover-front > .title {
6+
string-set: front-cover-title content();
7+
}
8+
9+
#body > .section > .head1.title {
10+
string-set: chapter content();
11+
}
12+
13+
#body > .section > .section > .head1.title {
14+
string-set: section content();
15+
}
16+
17+
@mixin border-top {
18+
border-top: 1px solid gray;
19+
}
20+
21+
@mixin border-bottom {
22+
border-bottom: 1px solid gray;
23+
}
24+
25+
@page body {
26+
@include border-top;
27+
@include border-bottom;
28+
padding-top: 6px;
29+
padding-bottom: 6px;
30+
@top-left-corner {
31+
content: "";
32+
}
33+
@top-left {
34+
content: string(chapter);
35+
}
36+
@top-center {
37+
content: "";
38+
}
39+
@top-right {
40+
content: string(section);
41+
}
42+
@top-right-corner {
43+
content: "";
44+
}
45+
46+
@bottom-left-corner {
47+
content: "";
48+
}
49+
@bottom-left {
50+
content: string(front-cover-title);
51+
}
52+
@bottom-center {
53+
content: "";
54+
}
55+
@bottom-right {
56+
content: counter(page);
57+
}
58+
@bottom-right-corner {
59+
content: "";
60+
}
61+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
.section {
2+
.title {
3+
bookmark-level: 1;
4+
}
5+
.content {
6+
.head1,
7+
.head2,
8+
.head3 {
9+
bookmark-level: none;
10+
}
11+
}
12+
}
13+
14+
.section > .section {
15+
.title {
16+
bookmark-level: 2;
17+
}
18+
}
19+
20+
.section > .section > .section {
21+
.title {
22+
bookmark-level: 3;
23+
}
24+
}
25+
26+
.section > .section > .section > .section {
27+
.title {
28+
bookmark-level: 4;
29+
}
30+
}
31+
32+
.section > .section > .section > .section > .section {
33+
.title {
34+
bookmark-level: 5;
35+
}
36+
}
37+
38+
.section > .section > .section > .section > .section > .section {
39+
.title {
40+
bookmark-level: 6;
41+
}
42+
}

0 commit comments

Comments
 (0)