mirror of
https://github.com/LemmyNet/lemmy-docs.git
synced 2024-11-24 05:11:09 +00:00
20 lines
523 B
Bash
20 lines
523 B
Bash
|
#!/bin/bash
|
||
|
set -e
|
||
|
|
||
|
# generate config docs
|
||
|
pushd lemmy
|
||
|
mkdir ../generated
|
||
|
cargo run -- --print-config-docs >> ../generated/config.hjson
|
||
|
# replace // comments with #
|
||
|
sed -i "s/\/\//#/" ../generated/config.hjson
|
||
|
# remove trailing commas
|
||
|
sed -i "s/,\$//" ../generated/config.hjson
|
||
|
# remove quotes around json keys
|
||
|
sed -i "s/\"//" ../generated/config.hjson
|
||
|
sed -i "s/\"//" ../generated/config.hjson
|
||
|
popd
|
||
|
|
||
|
cargo install mdbook --git https://github.com/Nutomic/mdBook.git --branch localization \
|
||
|
--rev 0982a82
|
||
|
mdbook build .
|