-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #206 from VorTECHsa/google-analytics
- Loading branch information
Showing
4 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,6 +127,7 @@ venv.bak/ | |
|
||
# mkdocs documentation | ||
/site | ||
mkdocs.yml.backup | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,22 @@ | ||
#!/bin/bash | ||
|
||
rm -rf mkdocs.yml.backup | ||
mkdir -p ./_build/pydocmd/examples | ||
python docs/autogen.py | ||
pydocmd gh-deploy | ||
|
||
# Haven't found a way to do this in a non-convoluted way yet. We need to append google_analytics to our mkdocs file, | ||
# pydocmd doesn't copy google_analytics from the pydocmd file into the mkdocs.yml file, and it also deletes the file | ||
# when pydocmd stops 'serving'. | ||
# To get around this we: | ||
|
||
# 1. serve the docs locally | ||
pydocmd serve & sleep 5 | ||
|
||
# 2. backup the generated mkdocs.yml file | ||
cp mkdocs.yml mkdocs.yml.backup | ||
|
||
# 3. append to the backed up file | ||
echo "google_analytics: ['UA-153895438-1', 'vortechsa.github.io']" >> mkdocs.yml.backup | ||
|
||
# 4. deploy to github pages using our backup file | ||
pydocmd gh-deploy -f ./mkdocs.yml.backup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters