Skip to content

Commit

Permalink
BUILD_SOCIAL_CARD env and no social card by default
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywonchung committed Sep 30, 2024
1 parent ba49042 commit 93f43fd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
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

0 comments on commit 93f43fd

Please sign in to comment.