lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

nixos/doc: convert "Contributing to this manual" to CommonMark

Also updates it to mention running md-to-db.sh.

authored by

Ryan Mulligan and committed by
Jonathan Ringer
75014679 a67febac

+38 -24
+13
nixos/doc/manual/contributing-to-this-manual.chapter.md
··· 1 + # Contributing to this manual {#chap-contributing} 2 + 3 + The DocBook and CommonMark sources of NixOS' manual are in the [nixos/doc/manual](https://github.com/NixOS/nixpkgs/tree/master/nixos/doc/manual) subdirectory of the [Nixpkgs](https://github.com/NixOS/nixpkgs) repository. 4 + 5 + You can quickly check your edits with the following: 6 + 7 + ```ShellSession 8 + $ cd /path/to/nixpkgs 9 + $ ./nixos/doc/manual/md-to-db.sh 10 + $ nix-build nixos/release.nix -A manual.x86_64-linux 11 + ``` 12 + 13 + If the build succeeds, the manual will be in `./result/share/doc/nixos/index.html`.
-22
nixos/doc/manual/contributing-to-this-manual.xml
··· 1 - <chapter xmlns="http://docbook.org/ns/docbook" 2 - xmlns:xlink="http://www.w3.org/1999/xlink" 3 - xml:id="chap-contributing"> 4 - <title>Contributing to this manual</title> 5 - <para> 6 - The DocBook sources of NixOS' manual are in the <filename 7 - xlink:href="https://github.com/NixOS/nixpkgs/tree/master/nixos/doc/manual"> 8 - nixos/doc/manual</filename> subdirectory of the <link 9 - xlink:href="https://github.com/NixOS/nixpkgs">Nixpkgs</link> repository. 10 - </para> 11 - <para> 12 - You can quickly check your edits with the following: 13 - </para> 14 - <screen> 15 - <prompt>$ </prompt>cd /path/to/nixpkgs 16 - <prompt>$ </prompt>nix-build nixos/release.nix -A manual.x86_64-linux 17 - </screen> 18 - <para> 19 - If the build succeeds, the manual will be in 20 - <filename>./result/share/doc/nixos/index.html</filename>. 21 - </para> 22 - </chapter>
+22
nixos/doc/manual/from_md/contributing-to-this-manual.chapter.xml
··· 1 + <chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="chap-contributing"> 2 + <title>Contributing to this manual</title> 3 + <para> 4 + The DocBook and CommonMark sources of NixOS’ manual are in the 5 + <link xlink:href="https://github.com/NixOS/nixpkgs/tree/master/nixos/doc/manual">nixos/doc/manual</link> 6 + subdirectory of the 7 + <link xlink:href="https://github.com/NixOS/nixpkgs">Nixpkgs</link> 8 + repository. 9 + </para> 10 + <para> 11 + You can quickly check your edits with the following: 12 + </para> 13 + <programlisting> 14 + $ cd /path/to/nixpkgs 15 + $ ./nixos/doc/manual/md-to-db.sh 16 + $ nix-build nixos/release.nix -A manual.x86_64-linux 17 + </programlisting> 18 + <para> 19 + If the build succeeds, the manual will be in 20 + <literal>./result/share/doc/nixos/index.html</literal>. 21 + </para> 22 + </chapter>
+1 -1
nixos/doc/manual/manual.xml
··· 19 19 <xi:include href="./generated/options-db.xml" 20 20 xpointer="configuration-variable-list" /> 21 21 </appendix> 22 - <xi:include href="contributing-to-this-manual.xml" /> 22 + <xi:include href="./from_md/contributing-to-this-manual.chapter.xml" /> 23 23 <xi:include href="release-notes/release-notes.xml" /> 24 24 </book>
+2 -1
nixos/doc/manual/md-to-db.sh
··· 12 12 mapfile -t MD_FILES < <(find . -type f -regex '.*\.md$') 13 13 14 14 for mf in ${MD_FILES[*]}; do 15 - mkdir -p $(dirname "$OUT/$mf") 16 15 if [ "${mf: -11}" == ".section.md" ]; then 16 + mkdir -p $(dirname "$OUT/$mf") 17 17 pandoc "$mf" -t docbook \ 18 18 --extract-media=media \ 19 19 -f markdown+smart \ ··· 21 21 fi 22 22 23 23 if [ "${mf: -11}" == ".chapter.md" ]; then 24 + mkdir -p $(dirname "$OUT/$mf") 24 25 pandoc "$mf" -t docbook \ 25 26 --top-level-division=chapter \ 26 27 --extract-media=media \