mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Adjusted build process
This commit is contained in:
parent
5e95a69b7e
commit
0bfdd09c02
42
.travis.sh
42
.travis.sh
@ -23,24 +23,24 @@
|
|||||||
# Exit, if one command fails
|
# Exit, if one command fails
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Create directory for overrides, so we don't clutter up the base theme with
|
# # Create directory for overrides, so we don't clutter up the base theme with
|
||||||
# our custom adjustments for our own hosted documentation
|
# # our custom adjustments for our own hosted documentation
|
||||||
mkdir -p overrides
|
# mkdir -p overrides
|
||||||
cat > overrides/main.html <<-EOM
|
# cat > overrides/main.html <<-EOM
|
||||||
{% extends "base.html" %}
|
# {% extends "base.html" %}
|
||||||
{% block scripts %}
|
# {% block scripts %}
|
||||||
{{ super() }}
|
# {{ super() }}
|
||||||
<script>
|
# <script>
|
||||||
(function(i,s,o,g,r,a,m){
|
# (function(i,s,o,g,r,a,m){
|
||||||
i["GinsengAnalyticsObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||
|
# i["GinsengAnalyticsObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||
|
||||||
[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
# []).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;
|
# m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;
|
||||||
m.parentNode.insertBefore(a,m)
|
# m.parentNode.insertBefore(a,m)
|
||||||
})(window, document,
|
# })(window, document,
|
||||||
"script", "https://ginseng.ai/analytics.js", "gx");
|
# "script", "https://ginseng.ai/analytics.js", "gx");
|
||||||
</script>
|
# </script>
|
||||||
{% endblock %}
|
# {% endblock %}
|
||||||
EOM
|
# EOM
|
||||||
|
|
||||||
# Deploy documentation to GitHub pages
|
# Deploy documentation to GitHub pages
|
||||||
if [ "$TRAVIS_BRANCH" == "master" -a "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
if [ "$TRAVIS_BRANCH" == "master" -a "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
||||||
@ -54,9 +54,9 @@ if [ "$TRAVIS_BRANCH" == "master" -a "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
|||||||
# Install Material, so we can use it as a base template and add overrides
|
# Install Material, so we can use it as a base template and add overrides
|
||||||
python setup.py install
|
python setup.py install
|
||||||
|
|
||||||
# Override theme configuration
|
# # Override theme configuration
|
||||||
sed -i 's/name: null/name: material/g' mkdocs.yml
|
# sed -i 's/name: null/name: material/g' mkdocs.yml
|
||||||
sed -i 's/custom_dir: material/custom_dir: overrides/g' mkdocs.yml
|
# sed -i 's/custom_dir: material/custom_dir: overrides/g' mkdocs.yml
|
||||||
|
|
||||||
# Build documentation with overrides and publish to GitHub pages
|
# Build documentation with overrides and publish to GitHub pages
|
||||||
mkdocs gh-deploy --force
|
mkdocs gh-deploy --force
|
||||||
|
@ -177,7 +177,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ 'assets/javascripts/application.e72fd936.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/application.a26c1c19.js' | url }}"></script>
|
||||||
{% if lang.t("search.language") != "en" %}
|
{% if lang.t("search.language") != "en" %}
|
||||||
{% set languages = lang.t("search.language").split(",") %}
|
{% set languages = lang.t("search.language").split(",") %}
|
||||||
{% if languages | length and languages[0] != "" %}
|
{% if languages | length and languages[0] != "" %}
|
||||||
|
Loading…
Reference in New Issue
Block a user