Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gl-inet/docs3.x
GL.iNet documentation for firmware 3.x
https://github.com/gl-inet/docs3.x
Last synced: 3 months ago
JSON representation
GL.iNet documentation for firmware 3.x
- Host: GitHub
- URL: https://github.com/gl-inet/docs3.x
- Owner: gl-inet
- Created: 2018-06-30T11:13:06.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-23T08:55:59.000Z (5 months ago)
- Last Synced: 2024-06-23T09:50:36.163Z (5 months ago)
- Language: HTML
- Homepage: https://docs.gl-inet.com/en/3/
- Size: 16.8 MB
- Stars: 140
- Watchers: 22
- Forks: 27
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-starred - docs3.x - GL.iNet documents for firmware 3.x (JavaScript)
README
# GL.iNet documentation
This repository is the source code for documentation of GL.iNet routers firmware 3.x
## Environment
Build by [mkdocs](https://www.mkdocs.org/) 1.2.2, with theme [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) 7.2.2
Using [python 3.x virtual environment](https://docs.python.org/3/tutorial/venv.html), create a virtual environment, activate it, git clone this project source code inside it. There is a **requirements.txt** file in the project, run the command below to install packages.
`pip install -r requirements.txt`
## Installation
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](https://squidfunk.github.io/mkdocs-material/getting-started/#with-pip)
## Online View
Please view the docs online at [https://docs.gl-inet.com/router/en/3/](https://docs.gl-inet.com/router/en/3/)
## Guide
### Markdown syntax
Each page use markdown, please check out this basic syntax of markdown [here](https://www.markdownguide.org/basic-syntax/).
### Open in new tab
If you wanna a link to open in new tab, add `{target="_blank"}` at the end of link block.
### Image file type
Prefer to use png.
### Image lightbox
If the size of image is too big, please use the PhotoSwipe, check out [here](#about-plugin-photoswipe).
### Image captions
```html
Image caption```
### Use relative path to link internal content
```
[Repeater](../../../tutorials/repeater)
```## About plugin PhotoSwipe
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.
```
```Reference:
[https://photoswipe.com/documentation/getting-started.html](https://photoswipe.com/documentation/getting-started.html)
[https://codepen.io/dimsemenov/pen/ZYbPJM](https://codepen.io/dimsemenov/pen/ZYbPJM)
## About versoning
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](https://github.com/squidfunk/mkdocs-material-example-versioning), and switch to `gh-pages` branch.
Reference:
[Setting up versioning](https://squidfunk.github.io/mkdocs-material/setup/setting-up-versioning/)
[https://squidfunk.github.io/mkdocs-material-example-versioning/](https://squidfunk.github.io/mkdocs-material-example-versioning/)
## Jenkins integration
```
# go to docs-build path to get latest git commit
# incase some guys build on their computer
cd /root/docs-build/
git reset --hard HEAD
git pull
# activate virtualenv
cd /root/docs-venv/
. ./bin/activate
# git pull latest commit
cd docs3.x
git checkout master
git reset --hard HEAD
git pull
# build docs to /root/docs-build/router/en/3/
mkdocs build
# deactivate virtualenv
deactivate
echo "finish building"
#
cd /root/docs-build/
git add .
git commit -m "docs3 build"
git push
echo "done"
```