Generate a basic documentation website with the mkdocs toolkit.
No content yet other than man pages. To make the man pages render nicely in mkdocs, I removed the static %-headers and put the code for them into default.md.tmp.do instead. That way, the raw input redo-*.md files will look right in mkdocs.
This commit is contained in:
parent
2eb9e91c7c
commit
4cf156e930
18 changed files with 45 additions and 45 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -8,3 +8,4 @@
|
||||||
*.tmp
|
*.tmp
|
||||||
/redo-sh
|
/redo-sh
|
||||||
*.did
|
*.did
|
||||||
|
/website
|
||||||
|
|
|
||||||
2
Documentation/.gitignore
vendored
2
Documentation/.gitignore
vendored
|
|
@ -1,3 +1,5 @@
|
||||||
*.1
|
*.1
|
||||||
/md-to-man
|
/md-to-man
|
||||||
*.html
|
*.html
|
||||||
|
*.man.md
|
||||||
|
*.list
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
/bin/ls *.md t/*.md |
|
redo-ifchange doc.list
|
||||||
sed 's/\.md/.1/' |
|
sed 's/\.md/.1/' <doc.list |
|
||||||
xargs redo-ifchange
|
xargs redo-ifchange mkdocs
|
||||||
|
|
||||||
redo-always
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
rm -f *~ .*~ *.1 t/*.1 md-to-man *.tmp t/*.tmp *.html */*.html
|
rm -f *~ .*~ *.1 t/*.1 md-to-man *.tmp t/*.tmp *.html */*.html *.list
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
redo-ifchange ../version/vars $2.md
|
redo-ifchange ../version/vars $2.md
|
||||||
. ../version/vars
|
. ../version/vars
|
||||||
sed -e "s/%VERSION%/$TAG/" -e "s/%DATE%/$DATE/" $2.md
|
cat - $2.md <<-EOF
|
||||||
|
% $2(1) Redo $TAG
|
||||||
|
% Avery Pennarun <apenwarr@gmail.com>
|
||||||
|
% $DATE
|
||||||
|
EOF
|
||||||
|
|
|
||||||
3
Documentation/doc.list.do
Normal file
3
Documentation/doc.list.do
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
ls redo*.md t/*.md >$3
|
||||||
|
redo-always
|
||||||
|
redo-stamp <$3
|
||||||
1
Documentation/index.md
Normal file
1
Documentation/index.md
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Hello world!
|
||||||
9
Documentation/mkdocs.do
Normal file
9
Documentation/mkdocs.do
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
redo-ifchange doc.list
|
||||||
|
xargs redo-ifchange mkdocs.yml <doc.list
|
||||||
|
|
||||||
|
if type mkdocs >/dev/null 2>/dev/null; then
|
||||||
|
mkdocs build
|
||||||
|
else
|
||||||
|
echo "Warning: mkdocs is missing; can't generate website." >&2
|
||||||
|
redo-ifcreate /usr/bin/mkdocs
|
||||||
|
fi
|
||||||
18
Documentation/mkdocs.yml
Normal file
18
Documentation/mkdocs.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
site_name: redo build system
|
||||||
|
theme: readthedocs
|
||||||
|
docs_dir: .
|
||||||
|
site_dir: ../website
|
||||||
|
strict: true
|
||||||
|
|
||||||
|
pages:
|
||||||
|
- Introduction: index.md
|
||||||
|
- Man Pages:
|
||||||
|
- redo: redo.md
|
||||||
|
- redo-ifchange: redo-ifchange.md
|
||||||
|
- redo-ifcreate: redo-ifcreate.md
|
||||||
|
- redo-always: redo-always.md
|
||||||
|
- redo-stamp: redo-stamp.md
|
||||||
|
- redo-sources: redo-sources.md
|
||||||
|
- redo-targets: redo-targets.md
|
||||||
|
- redo-ood: redo-ood.md
|
||||||
|
- redo-whichdo: redo-whichdo.md
|
||||||
|
|
@ -1,7 +1,3 @@
|
||||||
% redo-always(1) Redo %VERSION%
|
|
||||||
% Avery Pennarun <apenwarr@gmail.com>
|
|
||||||
% %DATE%
|
|
||||||
|
|
||||||
# NAME
|
# NAME
|
||||||
|
|
||||||
redo-always - mark the current target as always needing to be rebuilt
|
redo-always - mark the current target as always needing to be rebuilt
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,3 @@
|
||||||
% redo-ifchange(1) Redo %VERSION%
|
|
||||||
% Avery Pennarun <apenwarr@gmail.com>
|
|
||||||
% %DATE%
|
|
||||||
|
|
||||||
# NAME
|
# NAME
|
||||||
|
|
||||||
redo-ifchange - rebuild target files when source files have changed
|
redo-ifchange - rebuild target files when source files have changed
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,3 @@
|
||||||
% redo-ifcreate(1) Redo %VERSION%
|
|
||||||
% Avery Pennarun <apenwarr@gmail.com>
|
|
||||||
% %DATE%
|
|
||||||
|
|
||||||
# NAME
|
# NAME
|
||||||
|
|
||||||
redo-ifcreate - rebuild the current target if source files are created
|
redo-ifcreate - rebuild the current target if source files are created
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,3 @@
|
||||||
% redo-ood(1) Redo %VERSION%
|
|
||||||
% Avery Pennarun <apenwarr@gmail.com>
|
|
||||||
% %DATE%
|
|
||||||
|
|
||||||
# NAME
|
# NAME
|
||||||
|
|
||||||
redo-ood - print the list of out-of-date redo targets
|
redo-ood - print the list of out-of-date redo targets
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,3 @@
|
||||||
% redo-sources(1) Redo %VERSION%
|
|
||||||
% Avery Pennarun <apenwarr@gmail.com>
|
|
||||||
% %DATE%
|
|
||||||
|
|
||||||
# NAME
|
# NAME
|
||||||
|
|
||||||
redo-sources - print the list of all known redo sources
|
redo-sources - print the list of all known redo sources
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,3 @@
|
||||||
% redo-stamp(1) Redo %VERSION%
|
|
||||||
% Avery Pennarun <apenwarr@gmail.com>
|
|
||||||
% %DATE%
|
|
||||||
|
|
||||||
# NAME
|
# NAME
|
||||||
|
|
||||||
redo-stamp - detect if the current target has meaningfully changed
|
redo-stamp - detect if the current target has meaningfully changed
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,3 @@
|
||||||
% redo-targets(1) Redo %VERSION%
|
|
||||||
% Avery Pennarun <apenwarr@gmail.com>
|
|
||||||
% %DATE%
|
|
||||||
|
|
||||||
# NAME
|
# NAME
|
||||||
|
|
||||||
redo-targets - print the list of all known redo targets
|
redo-targets - print the list of all known redo targets
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,3 @@
|
||||||
% redo-ifchange(1) Redo %VERSION%
|
|
||||||
% Avery Pennarun <apenwarr@gmail.com>
|
|
||||||
% %DATE%
|
|
||||||
|
|
||||||
# NAME
|
# NAME
|
||||||
|
|
||||||
redo-whichdo - show redo's search path for a .do file
|
redo-whichdo - show redo's search path for a .do file
|
||||||
|
|
@ -34,7 +30,7 @@ search path has been exhausted (and printed).
|
||||||
Here's a typical search path for a source file (`x/y/a.b.o`). Because the
|
Here's a typical search path for a source file (`x/y/a.b.o`). Because the
|
||||||
filename contains two dots (.), at each level of the hierarchy, `redo` needs
|
filename contains two dots (.), at each level of the hierarchy, `redo` needs
|
||||||
to search `default.b.o.do`, `default.o.do`, and `default.do`.
|
to search `default.b.o.do`, `default.o.do`, and `default.do`.
|
||||||
|
```sh
|
||||||
$ redo-whichdo x/y/a.b.o; echo $?
|
$ redo-whichdo x/y/a.b.o; echo $?
|
||||||
|
|
||||||
x/y/a.b.o.do
|
x/y/a.b.o.do
|
||||||
|
|
@ -47,7 +43,7 @@ to search `default.b.o.do`, `default.o.do`, and `default.do`.
|
||||||
default.b.o.do
|
default.b.o.do
|
||||||
default.o.do
|
default.o.do
|
||||||
0
|
0
|
||||||
|
```
|
||||||
You might use `redo-whichdo` to delegate from one .do script to another,
|
You might use `redo-whichdo` to delegate from one .do script to another,
|
||||||
using code like the following. This gets a little tricky because not only
|
using code like the following. This gets a little tricky because not only
|
||||||
are you finding a new .do file, but you have `cd` to the .do file
|
are you finding a new .do file, but you have `cd` to the .do file
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,3 @@
|
||||||
% redo(1) Redo %VERSION%
|
|
||||||
% Avery Pennarun <apenwarr@gmail.com>
|
|
||||||
% %DATE%
|
|
||||||
|
|
||||||
# NAME
|
# NAME
|
||||||
|
|
||||||
redo - rebuild target files when source files have changed
|
redo - rebuild target files when source files have changed
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue