-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate config docs from lemmy code
- Loading branch information
Showing
7 changed files
with
33 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
book | ||
generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "lemmy"] | ||
path = lemmy | ||
url = https://github.com/LemmyNet/lemmy.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/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 . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters