Skip to content

Commit 99759c3

Browse files
authored
Merge pull request #336 from flox/djsauble/ia_tweaks
Flatten the Cookbook and Reference sections of the nav
2 parents 784c888 + 3cc0e13 commit 99759c3

35 files changed

+178
-140
lines changed

.flox/env/manifest.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
}
4141
},
4242
"hook": {
43-
"on-activate": "\n#\n# Python environment activation and installation\n#\nexport POETRY_VIRTUALENVS_PATH=\"$FLOX_ENV_CACHE/poetry/virtualenvs\"\nif [ -z \"$(poetry env info --path)\" ]; then\n poetry env use \"$(which python)\" &> /dev/null\nfi\neval \"$(poetry env activate)\" &> /dev/null\npoetry install --quiet &> /dev/null\necho \"1. 👉 Python environment activated\"\n\n# \n# Set the version of Flox to the latest stable version\n#\nexport FLOX_VERSION=$(cat FLOX_VERSION | xargs)\necho \"2. 👉 FLOX_VERSION set to $FLOX_VERSION\"\n\n# \n# Copy and process Flox man pages\n# \nexport FLOX_SRC_ARCHIVE=\"$FLOX_ENV_CACHE/flox-v$FLOX_VERSION.tar.gz\"\nif [ ! -e \"$FLOX_SRC_ARCHIVE\" ]; then\n curl -sL \"https://github.com/flox/flox/archive/refs/tags/v$FLOX_VERSION.tar.gz\" -o $FLOX_SRC_ARCHIVE\nfi\necho \"3. 👉 Downloaded Flox source archive\"\n\nexport FLOX_SRC_DIR=\"$FLOX_ENV_CACHE/flox-src-$FLOX_VERSION\"\nif [ ! -d \"$FLOX_SRC_DIR\" ]; then\n mkdir -p $FLOX_SRC_DIR\n tar -zx --strip-components=1 --file=$FLOX_SRC_ARCHIVE --directory=$FLOX_SRC_DIR;\nfi\necho \"4. 👉 Extracted Flox source archive\"\n\nexport FLOX_MAN_PAGES_DIR=\"$PWD/docs/reference/command-reference\"\nif [ -d \"$FLOX_MAN_PAGES_DIR\" ]; then\n rm -rf \"$FLOX_MAN_PAGES_DIR/*\"\nfi\nmkdir -p $FLOX_MAN_PAGES_DIR\npushd \"$FLOX_SRC_DIR/cli/flox/doc\" > /dev/null\n find . -maxdepth 1 -iname \"*.md\" -exec \\\n sh -c \"\n pandoc -t gfm \\\n -L $FLOX_SRC_DIR/pkgs/flox-manpages/pandoc-filters/include-files.lua \\\n --standalone \\\n {} |\n # remove current title\n tail -n +6 |\n # indent all markdown levels by one, e.g. \"#\" -> \"##\"\n sed -e 's/^#/##/' > \\\"$FLOX_MAN_PAGES_DIR/{}\\\"\n \" \\;\npopd > /dev/null\npushd $FLOX_MAN_PAGES_DIR > /dev/null\n for commandPage in ./*.md; do\n # All other man page files have names of the form\n # 'flox*.md'\n if [ \"$commandPage\" = \"./manifest.toml.md\" ]; then\n continue\n fi\n command=$(basename $commandPage .md | sed -e \"s|-| |g\")\n echo -e \"\\n# \\`$command\\` command\\n$(cat $commandPage)\" > $commandPage\n echo -e \"---\\n$(cat $commandPage)\" > $commandPage\n echo -e \"description: Command reference for the \\`$command\\` command.\\n$(cat $commandPage)\" > $commandPage\n echo -e \"title: $command\\n$(cat $commandPage)\" > $commandPage\n echo -e \"---\\n$(cat $commandPage)\" > $commandPage\n done\n\n manifestPage=\"manifest.toml.md\"\n echo -e \"\\n# \\`manifest.toml\\`\\n$(cat $manifestPage)\" > $manifestPage\n echo -e \"---\\n$(cat $manifestPage)\" > $manifestPage\n echo -e \"description: Reference for the manifest.toml format.\\n$(cat $manifestPage)\" > $manifestPage\n echo -e \"title: manifest.toml\\n$(cat $manifestPage)\" > $manifestPage\n echo -e \"---\\n$(cat $manifestPage)\" > $manifestPage\npopd > /dev/null\necho \"5. 👉 Copy man pages from Flox source archive\"\n"
43+
"on-activate": "\n#\n# Python environment activation and installation\n#\nexport POETRY_VIRTUALENVS_PATH=\"$FLOX_ENV_CACHE/poetry/virtualenvs\"\nif [ -z \"$(poetry env info --path)\" ]; then\n poetry env use \"$(which python)\" &> /dev/null\nfi\neval \"$(poetry env activate)\" &> /dev/null\npoetry install --quiet &> /dev/null\necho \"1. 👉 Python environment activated\"\n\n# \n# Set the version of Flox to the latest stable version\n#\nexport FLOX_VERSION=$(cat FLOX_VERSION | xargs)\necho \"2. 👉 FLOX_VERSION set to $FLOX_VERSION\"\n\n# \n# Copy and process Flox man pages\n# \nexport FLOX_SRC_ARCHIVE=\"$FLOX_ENV_CACHE/flox-v$FLOX_VERSION.tar.gz\"\nif [ ! -e \"$FLOX_SRC_ARCHIVE\" ]; then\n curl -sL \"https://github.com/flox/flox/archive/refs/tags/v$FLOX_VERSION.tar.gz\" -o $FLOX_SRC_ARCHIVE\nfi\necho \"3. 👉 Downloaded Flox source archive\"\n\nexport FLOX_SRC_DIR=\"$FLOX_ENV_CACHE/flox-src-$FLOX_VERSION\"\nif [ ! -d \"$FLOX_SRC_DIR\" ]; then\n mkdir -p $FLOX_SRC_DIR\n tar -zx --strip-components=1 --file=$FLOX_SRC_ARCHIVE --directory=$FLOX_SRC_DIR;\nfi\necho \"4. 👉 Extracted Flox source archive\"\n\nexport FLOX_MAN_PAGES_DIR=\"$PWD/docs/man\"\nif [ -d \"$FLOX_MAN_PAGES_DIR\" ]; then\n rm -rf \"$FLOX_MAN_PAGES_DIR/*\"\nfi\nmkdir -p $FLOX_MAN_PAGES_DIR\npushd \"$FLOX_SRC_DIR/cli/flox/doc\" > /dev/null\n find . -maxdepth 1 -iname \"*.md\" -exec \\\n sh -c \"\n pandoc -t gfm \\\n -L $FLOX_SRC_DIR/pkgs/flox-manpages/pandoc-filters/include-files.lua \\\n --standalone \\\n {} |\n # remove current title\n tail -n +6 |\n # indent all markdown levels by one, e.g. \"#\" -> \"##\"\n sed -e 's/^#/##/' > \\\"$FLOX_MAN_PAGES_DIR/{}\\\"\n \" \\;\npopd > /dev/null\npushd $FLOX_MAN_PAGES_DIR > /dev/null\n for commandPage in ./*.md; do\n # All other man page files have names of the form\n # 'flox*.md'\n if [ \"$commandPage\" = \"./manifest.toml.md\" ]; then\n continue\n fi\n command=$(basename $commandPage .md | sed -e \"s|-| |g\")\n echo -e \"\\n# \\`$command\\` command\\n$(cat $commandPage)\" > $commandPage\n echo -e \"---\\n$(cat $commandPage)\" > $commandPage\n echo -e \"description: Command reference for the \\`$command\\` command.\\n$(cat $commandPage)\" > $commandPage\n echo -e \"title: $command\\n$(cat $commandPage)\" > $commandPage\n echo -e \"---\\n$(cat $commandPage)\" > $commandPage\n done\n\n manifestPage=\"manifest.toml.md\"\n echo -e \"\\n# \\`manifest.toml\\`\\n$(cat $manifestPage)\" > $manifestPage\n echo -e \"---\\n$(cat $manifestPage)\" > $manifestPage\n echo -e \"description: Reference for the manifest.toml format.\\n$(cat $manifestPage)\" > $manifestPage\n echo -e \"title: manifest.toml\\n$(cat $manifestPage)\" > $manifestPage\n echo -e \"---\\n$(cat $manifestPage)\" > $manifestPage\npopd > /dev/null\necho \"5. 👉 Copy man pages from Flox source archive\"\n"
4444
},
4545
"profile": {
4646
"common": "echo \"\"\necho \" ╔═══════════════════════════════════╗\"\necho \" ║ ║\"\necho \" ║ To build a production docs run: ║\"\necho \" ║ > mkdocs build ║\"\necho \" ║ ║\"\necho \" ║ To write docs locally run: ║\"\necho \" ║ > mkdocs serve ║\"\necho \" ║ ║\"\necho \" ╚═══════════════════════════════════╝\"\necho \"\"\n",

.flox/env/manifest.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ if [ ! -d "$FLOX_SRC_DIR" ]; then
5252
fi
5353
echo "4. 👉 Extracted Flox source archive"
5454
55-
export FLOX_MAN_PAGES_DIR="$PWD/docs/reference/command-reference"
55+
export FLOX_MAN_PAGES_DIR="$PWD/docs/man"
5656
if [ -d "$FLOX_MAN_PAGES_DIR" ]; then
5757
rm -rf "$FLOX_MAN_PAGES_DIR/*"
5858
fi

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.direnv/
33
site/
44
include/
5-
docs/reference/command-reference
5+
docs/man
66
result
77
result-*
88
bin/

docs/concepts/activation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ attach to this new version of the environment.
310310

311311
## Development vs. runtime mode
312312

313-
See the [`options.activate.mode`](../reference/command-reference/manifest.toml.md#options) option in the manifest.
313+
See the [`options.activate.mode`](../man/manifest.toml.md#options) option in the manifest.
314314

315315
## Conclusion
316316

@@ -329,6 +329,6 @@ that prepare your environment just how you like them.
329329

330330
[environment-concept]: ./services.md
331331
[bash-func-export]: https://www.gnu.org/software/bash/manual/html_node/Bourne-Shell-Builtins.html#index-export
332-
[vars-section]: ../reference/command-reference/manifest.toml.md#vars
333-
[hook-section]: ../reference/command-reference/manifest.toml.md#hook
334-
[profile-section]: ../reference/command-reference/manifest.toml.md#profile
332+
[vars-section]: ../man/manifest.toml.md#vars
333+
[hook-section]: ../man/manifest.toml.md#hook
334+
[profile-section]: ../man/manifest.toml.md#profile

docs/concepts/builds.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ One way to accomplish this is to run your builds in [CI][flox-ci-cd].
4242

4343
[manifest-builds-concept]: ./manifest-builds.md
4444
[nix-expression-builds-concept]: ./nix-expression-builds.md
45-
[flox-build]: ../reference/command-reference/flox-build.md
45+
[flox-build]: ../man/flox-build.md
4646
[flox-ci-cd]: ../tutorials/ci-cd.md

docs/concepts/environments.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,21 +110,21 @@ version. Flox manages this file for you.
110110
}
111111
```
112112

113-
[flox_init]: ../reference/command-reference/flox-init.md
114-
[flox_show]: ../reference/command-reference/flox-show.md
115-
[flox_edit]: ../reference/command-reference/flox-edit.md
116-
[flox_install]: ../reference/command-reference/flox-install.md
117-
[flox_search]: ../reference/command-reference/flox-search.md
118-
[flox_edit]: ../reference/command-reference/flox-edit.md
119-
[flox_push]: ../reference/command-reference/flox-push.md
120-
[flox_pull]: ../reference/command-reference/flox-pull.md
121-
[flox_activate]: ../reference/command-reference/flox-activate.md
113+
[flox_init]: ../man/flox-init.md
114+
[flox_show]: ../man/flox-show.md
115+
[flox_edit]: ../man/flox-edit.md
116+
[flox_install]: ../man/flox-install.md
117+
[flox_search]: ../man/flox-search.md
118+
[flox_edit]: ../man/flox-edit.md
119+
[flox_push]: ../man/flox-push.md
120+
[flox_pull]: ../man/flox-pull.md
121+
[flox_activate]: ../man/flox-activate.md
122122
[sharing_guide]: ../tutorials/sharing-environments.md
123123
[create_guide]: ../tutorials/creating-environments.md
124124
[customizing_environments_guide]: ../tutorials/customizing-environments.md
125125
[generation_concept]: ./generations.md
126126
[floxhub_concept]: ./floxhub.md
127127
[discourse]: https://discourse.flox.dev/
128-
[manifest]: ../reference/command-reference/manifest.toml.md
128+
[manifest]: ../man/manifest.toml.md
129129
[nix-expression-builds-concept]: ./nix-expression-builds.md
130130
[toml_spec]: https://toml.io/en/v1.0.0

docs/concepts/flox-vs-containers.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -439,13 +439,13 @@ you need to build a container so that it can be deployed.
439439

440440
---
441441

442-
[init]: ../reference/command-reference/flox-init.md
443-
[edit]: ../reference/command-reference/flox-edit.md
444-
[install]: ../reference/command-reference/flox-install.md
445-
[push]: ../reference/command-reference/flox-push.md
446-
[containerize]: ../reference/command-reference/flox-containerize.md
447-
[activate]: ../reference/command-reference/flox-activate.md
448-
[services-start]: ../reference/command-reference/flox-services-start.md
442+
[init]: ../man/flox-init.md
443+
[edit]: ../man/flox-edit.md
444+
[install]: ../man/flox-install.md
445+
[push]: ../man/flox-push.md
446+
[containerize]: ../man/flox-containerize.md
447+
[activate]: ../man/flox-activate.md
448+
[services-start]: ../man/flox-services-start.md
449449
[services]: ../concepts/services.md
450450
[manifest]: ../concepts/environments.md#manifesttoml
451451
[early]: https://flox.dev/early/

docs/concepts/floxhub.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ flox pull example-owner/example-env
9797
Run the [`flox auth logout`][flox_auth] command.
9898

9999
[flox_website]: https://flox.dev
100-
[flox_push]: ../reference/command-reference/flox-push.md
101-
[flox_pull]: ../reference/command-reference/flox-pull.md
102-
[flox_activate]: ../reference/command-reference/flox-activate.md
103-
[flox_auth]: ../reference/command-reference/flox-auth.md
104-
[flox_edit]: ../reference/command-reference/flox-edit.md
105-
[flox_install]: ../reference/command-reference/flox-install.md
106-
[flox_uninstall]: ../reference/command-reference/flox-uninstall.md
100+
[flox_push]: ../man/flox-push.md
101+
[flox_pull]: ../man/flox-pull.md
102+
[flox_activate]: ../man/flox-activate.md
103+
[flox_auth]: ../man/flox-auth.md
104+
[flox_edit]: ../man/flox-edit.md
105+
[flox_install]: ../man/flox-install.md
106+
[flox_uninstall]: ../man/flox-uninstall.md
107107
[generation_concept]: ../concepts/generations.md
108108
[manifest_concept]: ../concepts/environments.md#manifesttoml
109109
[environments_concept]: ../concepts/environments.md

docs/concepts/generations.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ This allows this environment to advance to newer generations explicitly on the
7979
next [`flox pull`][flox_pull].
8080

8181
[floxhub_concept]: .//floxhub.md
82-
[flox_push]: ../reference/command-reference/flox-push.md
83-
[flox_install]: ../reference/command-reference/flox-install.md
84-
[flox_edit]: ../reference/command-reference/flox-edit.md
85-
[flox_pull]: ../reference/command-reference/flox-pull.md
82+
[flox_push]: ../man/flox-push.md
83+
[flox_install]: ../man/flox-install.md
84+
[flox_edit]: ../man/flox-edit.md
85+
[flox_pull]: ../man/flox-pull.md
8686
[sharing_guide]: ../tutorials/sharing-environments.md
8787
[environment_guide]: ../tutorials/creating-environments.md

docs/concepts/manifest-builds.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,11 @@ Each language guide in the Languages section of the Cookbook contains an example
190190
For example, [this section][go-example] contains an example build for the Go language.
191191

192192
[builds-concept]: ./builds.md
193-
[manifest-reference]: ../reference/command-reference/manifest.toml.md#build
193+
[manifest-reference]: ../man/manifest.toml.md#build
194194
[services-concept]: ./services.md
195195
[publish-concept]: ./publishing.md
196196
[fhs-docs]: https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
197-
[pkg-groups]: ../reference/command-reference/manifest.toml.md#package-descriptors
197+
[pkg-groups]: ../man/manifest.toml.md#package-descriptors
198198
[grpc]: https://grpc.io/
199199
[organizations-concept]: ./organizations.md
200-
[go-example]: ../cookbook/languages/go.md#build-with-flox
200+
[go-example]: ../languages/go.md#build-with-flox

0 commit comments

Comments
 (0)