Skip to content
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

Mkdocs updates to allow community PRs to pass the build.yml check/workflow #690

Merged
merged 21 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
with:
python-version: 3.x
- run: pip install -r requirements.txt
- run: pip install ${{ secrets.MKDOCS_RESOURCES }}
- run: mkdocs build --strict

env:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
key: ${{ github.ref }}
path: .cache
- run: pip install -r requirements.txt
- run: pip install ${{ secrets.MKDOCS_RESOURCES }}
- run: mkdocs gh-deploy --force
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
1 change: 0 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
key: ${{ github.ref }}
path: .cache
- run: pip install -r requirements.txt
- run: pip install ${{ secrets.MKDOCS_RESOURCES }}
- run: mkdocs gh-deploy --force
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/publish-docker-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
# Build and test Docker image
- run: |
echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u nanocurrency --password-stdin
docker pull ghcr.io/nanocurrency/mkdocs-material-insiders:latest
docker pull squidfunk/mkdocs-material:9.4.10@sha256:01605a03397a654b74b9de3157f56915d1e075e2d3bd22fcf3fb82c443553c25
docker build -t ghcr.io/nanocurrency/nano-docs:latest .
docker push ghcr.io/nanocurrency/nano-docs:latest
docker push ghcr.io/nanocurrency/nano-docs:latest
4 changes: 2 additions & 2 deletions .github/workflows/publish-docker-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
# Build and test Docker image
- run: |
echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u nanocurrency --password-stdin
docker pull ghcr.io/nanocurrency/mkdocs-material-insiders:latest
docker pull squidfunk/mkdocs-material:9.4.10@sha256:01605a03397a654b74b9de3157f56915d1e075e2d3bd22fcf3fb82c443553c25
docker build -t ghcr.io/nanocurrency/nano-docs:pr-${{ env.PR_NUMBER }} .
docker push ghcr.io/nanocurrency/nano-docs:pr-${{ env.PR_NUMBER }}
docker push ghcr.io/nanocurrency/nano-docs:pr-${{ env.PR_NUMBER }}
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/nanocurrency/mkdocs-material-insiders:latest
FROM squidfunk/mkdocs-material:9.4.10@sha256:01605a03397a654b74b9de3157f56915d1e075e2d3bd22fcf3fb82c443553c25

# Set build directory
#WORKDIR /docs
Expand All @@ -7,6 +7,7 @@ FROM ghcr.io/nanocurrency/mkdocs-material-insiders:latest
COPY ./ /docs

RUN \
pip install --upgrade pip && \
pip install -r /docs/requirements.txt

# Set working directory
Expand All @@ -17,4 +18,4 @@ EXPOSE 8000

# Start development server by default
ENTRYPOINT ["mkdocs"]
CMD ["serve", "--dev-addr=0.0.0.0:8000"]
CMD ["serve", "--dev-addr=0.0.0.0:8000"]
8 changes: 4 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ markdown_extensions:
- pymdownx.critic
- pymdownx.details
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:pymdownx.emoji.to_svg
- pymdownx.highlight
- pymdownx.inlinehilite
Expand Down Expand Up @@ -191,9 +191,9 @@ plugins:
separator: '[\s\-,:!=\[\]()"/]+|(?!\b)(?=[A-Z][a-z])|\.(?!\d)|&[lg]t;'
- social:
cards: !ENV [ PRODUCTION, FALSE ]
cards_color:
fill: "#20204c"
text: "#FFFFFF"
cards_layout_options:
background_color: "#20204c"
color: "#FFFFFF"
- redirects:
redirect_maps:
'running-a-node/rocksdb-ledger-backend.md': 'running-a-node/ledger-management.md'
Expand Down
6 changes: 0 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ Note that because a local volume isn't being mounted this pull request review ap

Access the site at http://localhost:8000. This supports automatic rebuilding, so anytime changes are saved to the documentation or configuration, it will be rebuilt and refresh the page. Some search indexing may remain cache between builds.

## Theme

We sponsor the developer of this theme on GitHub ([@squidfunk](https://github.com/squidfunk)) in order to get access to special features of the [Insiders](https://squidfunk.github.io/mkdocs-material-insiders/) version. Our [@nano-infrastructure](https://github.com/nano-infrastructure) account has the permissions to the private repository for that Insiders theme and using a personal access token in the GitHub deployment workflow (set as a GitHub secret in this repository), the theme is pulled down as part of deployment.

Those developing locally may not have access to some of the special features of this insider theme, but most changes done by external contributors do not need the special theme - changes are backwards compatible with the regular theme. If you need access to the Insiders theme please contact the Nano core team.

## Formatting and Organization Tips

## Title and description
Expand Down
6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Direct dependencies
mkdocs-material-extensions>=1.0
mkdocs-redirects>=1.0.0
mkdocs>=1.5
mkdocs-material[imaging]>=9.4
mkdocs-material-extensions>=1.3
mkdocs-redirects>=1.2