Skip to content

Commit

Permalink
Create "Nimble Guide" (#1190)
Browse files Browse the repository at this point in the history
  • Loading branch information
narimiran authored Mar 20, 2024
1 parent 5f89ad2 commit 0f2ac3f
Show file tree
Hide file tree
Showing 14 changed files with 1,517 additions and 1,219 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,7 @@ src/nimblepkg/version
/buildTests
/tests/nimdep/nimble.lock
/tests/nimdep/localnimbledeps/

# Nimble Guide files
nimble-guide/site/
!Makefile
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
publish-guide:
# CURRENT_BRANCH="$$(git rev-parse --abbrev-ref HEAD)"; \
# if [[ "$${CURRENT_BRANCH}" != "master" ]]; then \
# echo -e "\nWarning: you're publishing the books from the 'master' branch!\n"; \
# fi
CURRENT_COMMIT="$$(git rev-parse --short HEAD)" && \
cd nimble-guide && \
mkdocs build && \
cd .. && \
git worktree add tmp-book gh-pages && \
cp -a nimble-guide/site/* tmp-book/ && \
cd tmp-book && \
git add . && { \
git commit -m "make publish-guide $${CURRENT_COMMIT}" && \
git push origin gh-pages || true; } && \
cd .. && \
git worktree remove -f tmp-book && \
rm -rf tmp-book
36 changes: 36 additions & 0 deletions nimble-guide/docs/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Configuration

At startup Nimble will attempt to read ``~/.config/nimble/nimble.ini`` on Linux (on Windows it will attempt to read ``C:\Users\<YourUser>\AppData\Roaming\nimble\nimble.ini``).

The format of this file corresponds to the ini format with some Nim enhancements.
For example:

```ini
nimbleDir = r"C:\Nimble\"

[PackageList]
name = "CustomPackages"
url = "https://mydomain.org/packages.json"

[PackageList]
name = "Local project packages"
path = r"C:\Projects\Nim\packages.json"
```

You can currently configure the following in this file:

* `nimbleDir` - The directory which Nimble uses for package installation.
**Default:** `~/.nimble/`
* `chcp` - Whether to change the current code page when executing Nim application packages.
If `true` this will add `chcp 65001` to the .cmd stubs generated in `~/.nimble/bin/`.
**Default:** `true`
* `[PackageList]` + `name` + (`url` | `path`) - You can use this section to specify a new custom package list.
Multiple package lists can be specified.
Nimble defaults to the "Official" package list, you can override it by specifying a `[PackageList]` section named "official".
Multiple URLs can be specified under each section, Nimble will try each in succession if downloading from the first fails.
Alternatively, ``path`` can specify a local file path to copy a package list `.json` file from.
* `cloneUsingHttps` - Whether to replace any `git:https://` inside URLs with `https://`.
**Default:** `true`
* `httpProxy` - The URL of the proxy to use when downloading package listings.
Nimble will also attempt to read the `http_proxy` and `https_proxy` environment variables.
**Default:** `""`
Loading

0 comments on commit 0f2ac3f

Please sign in to comment.