Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ RUN apt update && \
apt install -y sudo apt-utils bash-completion wget ruby git magic-wormhole \
python3 python3-pip python3-setuptools python3-wheel

RUN pip install --break-system-packages mkdocs && \
wget https://raw.githubusercontent.com/icub-tech-iit/documentation/master/mkdocs.yml && \
pip install --break-system-packages $(mkdocs get-deps) && \
rm mkdocs.yml
RUN pip install --break-system-packages zensical

RUN gem install yaml

Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ jobs:
run: |
sudo apt update
sudo apt install -y python3-wheel python3-setuptools
pip install --break-system-packages --upgrade Jinja2
pip install --break-system-packages --user mkdocs
pip install --break-system-packages --user $(mkdocs get-deps)
pip install --break-system-packages --upgrade pygments
pip install --break-system-packages --user zensical
echo "${HOME}/.local/bin" >> ${GITHUB_PATH}

- name: Configure Git
Expand All @@ -36,9 +33,9 @@ jobs:
git config --global user.email "actions@github.com"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git

- name: Build Mkdocs
- name: Build Zensical
run: |
mkdocs build
zensical build --clean

- name: Create and prepare gh-pages anew
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@ jobs:
run: |
sudo apt update
sudo apt install -y python3-wheel python3-setuptools
pip install --break-system-packages --upgrade Jinja2
pip install --break-system-packages --user mkdocs
pip install --break-system-packages --user $(mkdocs get-deps)
pip install --break-system-packages --upgrade pygments
pip install --break-system-packages --user zensical
echo "${HOME}/.local/bin" >> ${GITHUB_PATH}

- name: Build Mkdocs
- name: Build Zensical
run: |
mkdocs build --strict > log 2>&1
zensical build --clean --strict > log 2>&1

- name: Print Log
if: always()
Expand Down
29 changes: 12 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,20 @@ When forking the repository, remember to copy out all the branches. Then, work o
Follow the steps below where you have to correctly fill up the signature `your-fork`:
- Browse to https://github.com/your-fork/documentation/actions and enable the actions if they got disabled.
- Browse to https://github.com/your-fork/documentation/actions/workflows/gh-pages.yml and click on the <kbd>Run workflow</kbd> button.
- Browse to https://github.com/your-fork/documentation/settings/pages, select the `gh-pages` branch and wait until the GitHub Pages link becomes green to click on!
- Browse to https://github.com/your-fork/documentation/settings/pages, select <kbd>Deploy from a branch</kbd> button and then the couple `gh-pages` branch and `/root`; finally, wait until the GitHub Pages link becomes green to click on!

# 🔽 Local Workflow

## 💻 Install the environment yourself
If you prefer to work on the documentation on your own computer without using Cloud IDEs as described in the previous section,
you need to install [**`mkdocs`**](https://www.mkdocs.org/) first.
you need to install [**`zensical`**](https://zensical.org/) first.

Once installed, just clone this repo, navigate to it and install the required dependencies:
Once installed, just clone this repo, navigate to it and serve the content:
```console
git clone https://github.com/icub-tech-iit/documentation.git
cd documentation
pip install --break-system-packages $(mkdocs get-deps)
```

Finally, serve the content:
```console
mkdocs serve
pip install zensical
Comment thread
pattacini marked this conversation as resolved.
zensical serve
```

## 📦 Rely on package managers
Expand All @@ -61,19 +57,18 @@ In the next sections, we will describe in detail how to install the required dep
You can use the [conda-forge](https://conda-forge.org/) distribution to install the required dependencies on Linux, macOS or Windows.
First of all you need a conda distribution, for example [Miniforge3](https://github.com/conda-forge/miniforge).

If you already have a conda distribution, just create a new [environment](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) (for example called `mkdocs-env`) and install in it the require dependencies:
If you already have a conda distribution, just create a new [environment](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) (for example called `zensical-env`) and install in it the required dependencies:
```console
git clone https://github.com/icub-tech-iit/documentation.git
cd documentation
conda create -n mkdocs-env
conda activate mkdocs-env
conda install --channel conda-forge mkdocs
conda install --channel conda-forge $(mkdocs get-deps)
conda create -n zensical-env
conda activate zensical-env
pip install zensical
```

After the installation, whenever you need to test the website just activate the `mkdocs-env` environment and call `mkdocs serve` in the `documentation` directory:
After the installation, whenever you need to test the website just activate the `zensical-env` environment and call `zensical serve` in the `documentation` directory:
```console
cd documentation
conda activate mkdocs-env
mkdocs serve
conda activate zensical-env
zensical serve
```
8 changes: 4 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ theme:
# Palette toggle for automatic mode
- media: "(prefers-color-scheme)"
toggle:
icon: material/brightness-auto
icon: lucide/sun-moon
name: Switch to light mode
# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: indigo
accent: indigo
toggle:
icon: material/brightness-7
icon: lucide/sun
name: Switch to dark mode
# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: indigo
accent: indigo
accent: orange
toggle:
icon: material/brightness-4
icon: lucide/moon-star
name: Switch to system preference

font:
Expand Down