-
Notifications
You must be signed in to change notification settings - Fork 91
Improved documentation #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 24 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
6a67ecb
docs: output markdown for all options
danielfullmer f499b20
docs: Deploy documentation on gh-pages
hmenke e61fd11
docs: update gh-pages on push to docs branch
danielfullmer 7b42ce8
docs: simplify F-Droid instructions
danielfullmer b1f15fe
Rename kernel.useCustom to kernel.enable
danielfullmer 986f8be
docs: enable examples in autogenerated options docs
danielfullmer 73db85c
docs: improve module options documentation
danielfullmer d222c1c
apps.prebuilt: fix incorrect packageName type
danielfullmer 5d37810
docs: set CNAME for actions-gh-pages
danielfullmer 4cb1274
docs: fix typo in f-droid.md
danielfullmer 77b30ca
Use lowercase "r" in "robotnix" by default
danielfullmer b97ead8
docs: Use titlecase for page titles
danielfullmer 18c130d
docs: better description for variant option
danielfullmer 3e03182
docs: improve installation instructions
danielfullmer 392c884
docs: add warning about factory reset
danielfullmer 53a9132
Merge branch 'master' into docs
danielfullmer 999dc94
docs: fix hyperlinks
danielfullmer cedb1b3
docs: output option default and examples properly
danielfullmer 1747bd0
docs: make manual accessible via flake
danielfullmer 476228a
docs: add "declared by" links and reformat
danielfullmer e10cfcc
Large documentation pass
danielfullmer 4956f28
Merge branch 'master' into docs
danielfullmer 88dfab6
Add warning on example.nix
danielfullmer ab86af7
docs: add note to automatically-set "fingerprints"
danielfullmer b40e997
docs: fix generating index.html
danielfullmer 45f484f
docs: add notes about releaseScript / keyStorePath
danielfullmer 28c8826
Warn if using releaseScript without signing.enable
danielfullmer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,25 @@ | ||
| name: Generate documentation | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ docs ] | ||
|
|
||
| jobs: | ||
| docs: | ||
| name: Build documentation | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2.3.4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: cachix/install-nix-action@v12 | ||
| with: | ||
| install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20201221_9fab14a/install | ||
| extra_nix_config: | | ||
| experimental-features = nix-command flakes | ||
| - run: nix build .#manual -o manual | ||
| - uses: peaceiris/actions-gh-pages@v3 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| publish_dir: ./manual/book | ||
| cname: docs.robotnix.org | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,5 @@ | ||
| [book] | ||
| language = "en" | ||
| multilingual = false | ||
| src = "src" | ||
| title = "Robotnix" |
This file contains hidden or 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,77 @@ | ||
| # SPDX-FileCopyrightText: 2020 Daniel Fullmer and robotnix contributors | ||
| # SPDX-License-Identifier: MIT | ||
|
|
||
| { pkgs ? import ../pkgs { } }: | ||
|
|
||
| with pkgs.lib; | ||
| let | ||
| eval = import ../default.nix { inherit pkgs; configuration = { }; }; | ||
|
|
||
| robotnixOptionsDoc = pkgs.nixosOptionsDoc { | ||
| inherit (eval) options; | ||
| }; | ||
|
|
||
| optionsMd = | ||
| let | ||
| options = robotnixOptionsDoc.optionsNix; | ||
| in '' | ||
| # Robotnix Configuration Options | ||
| *Some robotnix flavors or modules may change the option defaults shown below.* | ||
| *Refer to the flavor or module source for details* | ||
|
|
||
| '' | ||
| + concatStrings (map | ||
| (name: | ||
| let | ||
| option = options.${name}; | ||
| exampleText = | ||
| if option.example ? _type && (option.example._type == "literalExample") | ||
| then option.example.text | ||
| else builtins.toJSON option.example; | ||
| declarationToLink = declaration: let | ||
| trimmedDeclaration = concatStringsSep "/" (drop 4 (splitString "/" declaration)); | ||
| in | ||
| if hasPrefix "/nix/store/" declaration | ||
| then "[${trimmedDeclaration}](https://github.com/danielfullmer/robotnix/blob/master/${trimmedDeclaration})" | ||
| else declaration; | ||
| body = '' | ||
| ${option.description} | ||
|
|
||
| '' + optionalString (option ? defaultText || option ? default) '' | ||
| *Default*: `${option.defaultText or (generators.toPretty {} option.default)}` | ||
|
|
||
| '' + optionalString (option ? example) '' | ||
| *Example*: `${exampleText}` | ||
|
|
||
| '' + '' | ||
| *Type*: ${option.type} | ||
|
|
||
| *Declared by*: | ||
| ${concatMapStringsSep ", " (declaration: declarationToLink declaration) option.declarations} | ||
| ''; | ||
| in | ||
| '' | ||
| ### `${name}` | ||
| ${body} | ||
| '' | ||
| ) | ||
| (attrNames options)); | ||
| in | ||
| { | ||
| manual = pkgs.stdenv.mkDerivation { | ||
| name = "manual"; | ||
| phases = [ "unpackPhase" "buildPhase" "installPhase" ]; | ||
| src = ./.; | ||
| nativeBuildInputs = [ pkgs.mdbook ]; | ||
| buildPhase = '' | ||
| cp ${builtins.toFile "options.md" optionsMd} src/options.md | ||
| mdbook build | ||
| ''; | ||
| installPhase = '' | ||
| mkdir $out | ||
| cp -R book $out/book | ||
| cp -R src $out/src | ||
| cp book.toml $out/book.toml | ||
| ''; | ||
| }; | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to change this back to
master? Or do you plan to keep documentation on thedocsbranch from now on? Or maybe just use bothmasteranddocs?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I plan to switch it back to
masterafter merging.