Skip to content
Snippets Groups Projects

Use Git aliases in local contribution guide

Merged Bert Wesarg requested to merge local-contrib-git-aliases into preview
1 unresolved thread
1 file
+ 27
27
Compare changes
  • Side-by-side
  • Inline
@@ -83,17 +83,17 @@ Build the Docker image. This might take a bit longer, as `mkdocs` and other nece
needs to be downloaded, but you have to run it only once in a while.
Building a container could be done with the following steps:
```bash
cd hpc-wiki
doc.zih.tu-dresden.de/util/download-newest-mermaid.js.sh
docker build -t hpc-compendium .
```console
marie@local$ cd hpc-wiki
marie@local$ doc.zih.tu-dresden.de/util/download-newest-mermaid.js.sh
marie@local$ docker build -t hpc-compendium .
```
To avoid a lot of retyping, use the following in your shell:
```bash
alias wikiscript="docker run --name=hpc-compendium --rm -w /docs --mount src=${PWD},target=/docs,type=bind hpc-compendium"
alias wiki="docker run --name=hpc-compendium -p 8000:8000 --rm -w /docs --mount src=${PWD}/doc.zih.tu-dresden.de,target=/docs,type=bind hpc-compendium"
```console
marie@local$ alias wikiscript="docker run --name=hpc-compendium --rm -w /docs --mount src=${PWD},target=/docs,type=bind hpc-compendium"
marie@local$ alias wiki="docker run --name=hpc-compendium -p 8000:8000 --rm -w /docs --mount src=${PWD}/doc.zih.tu-dresden.de,target=/docs,type=bind hpc-compendium"
```
## Working with the Docker Container
@@ -104,8 +104,8 @@ Here is a suggestion of a workflow which might be suitable for you.
The command(s) to start the dockerized web server is this:
```bash
wiki mkdocs serve -a 0.0.0.0:8000
```console
marie@local$ wiki mkdocs serve -a 0.0.0.0:8000
```
You can view the documentation via `http://localhost:8000` in your browser, now.
@@ -118,8 +118,8 @@ You can view the documentation via `http://localhost:8000` in your browser, now.
If you cannot see the page in your browser, check if you can get the URL for your browser's
address bar from a different terminal window:
```bash
echo http://$(docker inspect -f "{{.NetworkSettings.IPAddress}}" $(docker ps -qf "name=hpc-compendium")):8000
```console
marie@local$ echo http://$(docker inspect -f "{{.NetworkSettings.IPAddress}}" $(docker ps -qf "name=hpc-compendium")):8000
```
You can now update the contents in you preferred editor. The running container automatically takes
@@ -150,8 +150,8 @@ case, failing checks prevent commits (unless you use option `--no-verify`). This
by adding a pre-commit hook to your local clone of the repository. The following code snippet shows
how to do that:
```bash
cp doc.zih.tu-dresden.de/util/pre-commit .git/hooks/
```console
marie@local$ cp doc.zih.tu-dresden.de/util/pre-commit .git/hooks/
```
!!! note
@@ -166,8 +166,8 @@ Read on if you want to run a specific check.
If you want to check whether the markdown files are formatted properly, use the following command:
```bash
wiki markdownlint docs
```console
marie@local$ wiki markdownlint docs
```
#### Spell Checker
@@ -175,14 +175,14 @@ wiki markdownlint docs
For spell-checking a single file, e.g.
`doc.zih.tu-dresden.de/docs/software/big_data_frameworks.md`, use:
```bash
wikiscript doc.zih.tu-dresden.de/util/check-spelling.sh doc.zih.tu-dresden.de/docs/software/big_data_frameworks.md
```console
marie@local$ wikiscript doc.zih.tu-dresden.de/util/check-spelling.sh doc.zih.tu-dresden.de/docs/software/big_data_frameworks.md
```
For spell-checking all files, use:
```bash
wikiscript doc.zih.tu-dresden.de/util/check-spelling.sh -a
```console
marie@local$ wikiscript doc.zih.tu-dresden.de/util/check-spelling.sh -a
```
This outputs all words of all files that are unknown to the spell checker.
@@ -195,8 +195,8 @@ The script `util/check-no-floating.sh` first checks the hierarchy depth of the p
the second check tests if every markdown file is included in the navigation section of the
`mkdocs.yaml` file. Invoke it as follows:
```bash
wikiscript doc.zih.tu-dresden.de/util/check-no-floating.sh doc.zih.tu-dresden.de
```console
marie@local$ wikiscript doc.zih.tu-dresden.de/util/check-no-floating.sh doc.zih.tu-dresden.de
```
#### Link Checker
@@ -215,8 +215,8 @@ With the script `doc.zih.tu-dresden.de/util/check-links.sh`, you can either chec
To check the links within a single file, e.g.
`doc.zih.tu-dresden.de/docs/software/big_data_frameworks.md`, use:
```bash
wikiscript doc.zih.tu-dresden.de/util/check-links.sh docs/software/big_data_frameworks.md
```console
marie@local$ wikiscript doc.zih.tu-dresden.de/util/check-links.sh docs/software/big_data_frameworks.md
```
##### All Modified Files
@@ -225,14 +225,14 @@ The script can also check the links in all modified files, i.e., markdown files
of the repository and different to the `preview` branch. Use this script before committing your
changes to make sure your commit passes the CI/CD pipeline.
```bash
wikiscript doc.zih.tu-dresden.de/util/check-links.sh -c
```console
marie@local$ wikiscript doc.zih.tu-dresden.de/util/check-links.sh -c
```
##### All Files
Checking the links of all markdown files takes a moment of time:
```bash
wikiscript doc.zih.tu-dresden.de/util/check-links.sh -a
```console
marie@local$ wikiscript doc.zih.tu-dresden.de/util/check-links.sh -a
```
Loading