This repository is the source code for documentation of AstroWarp.
Build by mkdocs 1.5.3, with theme mkdocs-material 9.4.6
Create a new python virtualenv
python3 -m venv docs-venv
Activate the virtualenv, then
pip install mkdocs-material
or pip install mkdocs-material=="9.*"
Or use the requirements.txt in the root of the project
pip install -r requirements.txt
Refer: https://squidfunk.github.io/mkdocs-material/getting-started/#with-pip
Please view the docs online at https://docs.gl-inet.com/goodcloud
Each page use markdown, please check out this basic syntax of markdown here.
If you wanna a link to open in new tab, add {target="_blank"}
at the end of link block.
Prefer to use png.
If the size of image is too big, please use the PhotoSwipe, check out here.
Use gl-50-desktop
, gl-60-desktop
, gl-70-desktop
,gl-80-desktop
, gl-90-desktop
to set the percentage of the image width on desktop browser.
![gl.inet enable vpn cascading](https://static.gl-inet.com/docs/router/en/4/tutorials/vpn_cascading/enable_vpn_cascading.png){class="gl-50-desktop"}
Example:
![gl.inet enable vpn cascading](https://static.gl-inet.com/docs/router/en/4/tutorials/vpn_cascading/enable_vpn_cascading.png){class="gl-50-desktop"}
Use {class="glboxshadow"}
to add shadow effect to the image.
Example:
![tap block](https://static.gl-inet.com/docs/router/en/4/tutorials/how-to-block-client-devices/tap-block.jpeg){class="glboxshadow"}
<figure>
<img src="https://dummyimage.com/600x400/eee/aaa" width="300" />
<figcaption>Image caption</figcaption>
</figure>
[easytethering](../../../tutorials/tether)
Using the v4 version, v5 version looks better, but need to load js module. Don't know how to work it out in mkdocs.
Suggest to use PhotoSwipe when the width of image is large than 1021px.
<div class="gl-lightbox" itemscope itemtype="http://schema.org/ImageGallery">
<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
<a href="https://static.gl-inet.com/docs/router/en/3/setup/gl-b2200/hardware/hardware_1.jpg" itemprop="contentUrl" data-size="3167x2480">
<img src="https://static.gl-inet.com/docs/router/en/3/setup/gl-b2200/hardware/hardware_1.jpg" itemprop="thumbnail" alt="gl-b2200 pcb pinout" />
</a>
</figure>
</div>
Reference:
https://photoswipe.com/documentation/getting-started.html
https://codepen.io/dimsemenov/pen/ZYbPJM
There is a plugin named mike
is for versoning, it need to deploy with Github Page, but I don't use Github Page, I just copy the file structure like mike
does. Please check out mkdocs-material-example-versioning, and switch to gh-pages
branch.
Reference:
https://squidfunk.github.io/mkdocs-material-example-versioning/
whoami
# go to docs-build-astrowarp path to get latest git commit
# incase some guys build on their computer
cd /root/docs-build-astrowarp/
git reset --hard HEAD
git pull
# activate virtualenv
cd /root/docs-venv/
. ./bin/activate
# git pull latest commit
cd docs-astrowarp
git checkout master
git reset --hard HEAD
git pull
# build docs to /root/docs-build-astrowarp/en/
mkdocs build
# deactivate virtualenv
deactivate
echo "finish building"
#
cd /root/docs-build-astrowarp/
git add .
git commit -m "docs astrowarp build"
git push
echo "done"