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

[Docs] Add BUILD_SOCIAL_CARD env, skip social card build by default #130

Merged
merged 1 commit into from
Sep 30, 2024
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
2 changes: 2 additions & 0 deletions .github/workflows/check_homepage_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ jobs:
run: pip install '.[docs]'
- name: Build homepage
run: mkdocs build --verbose --strict
env:
BUILD_SOCIAL_CARD: true
2 changes: 2 additions & 0 deletions .github/workflows/deploy_homepage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ jobs:
run: pip install '.[docs]'
- name: Build homepage
run: mkdocs gh-deploy --force
env:
BUILD_SOCIAL_CARD: true
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ plugins:
- search
- autorefs
- social:
enabled: !ENV [BUILD_SOCIAL_CARD, false]
cards_dir: assets/img/social
cards_layout_options:
background_color: "#f7e96d"
Expand Down
4 changes: 4 additions & 0 deletions scripts/preview_docs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env bash

# This script builds a local version of the documentation and makes it available at localhost:7777.
# By default it does not build social preview cards. If you want to debug social cards,
# set the environment variable `BUILD_SOCIAL_CARD=true` to this script.

pip list | grep mkdocs-material 2>&1 >/dev/null

if [[ ! $? -eq 0 ]]; then
Expand Down
Loading