Maintenance Guide
This page introduces the upload and local deployment methods for maintainers. Return to About Wiki.
Tencent Docs Maintenance
Find GitHub difficult and just want to add a piece of information? You can directly edit the Qingdao University Wiki Campus Guide Tencent Docs (log in and modify according to the corresponding section in the left directory tree). Administrators will regularly sync new content supplemented by the community in Tencent Docs back to this site. This is a zero-threshold maintenance method, recommended for friends unfamiliar with Git.
Upload Files
Steps:
- Put the files to share into the
docs/share/files/directory -
In the list on the file sharing homepage (
docs/share/index.md), add a line of reference in Markdown format:[Material Name](files/Material Name.pdf)Example
After rendering, it becomes a clickable download link.[Qingdao University Undergraduate Freshman Guide.pdf](files/éå²å¤§å¦æ¬ç§æ°çæå.pdf)
Notes:
- Files should have concise and appropriate Chinese names, such as
éå²å¤§å¦æ¬ç§æ°çæå.pdf -
Larger files (such as tens of MB compressed packages, videos) are not recommended to be directly placed in the repository. You can first upload them to a cloud drive (Baidu Netdisk, Alibaba Cloud Disk) or GitHub Releases, then put the download link on the homepage:
[Material Name](Download Link) -
Information involving personal privacy (name, student ID, ID number, etc.) should be desensitized before uploading
Upload Images
Steps:
-
Images are uniformly placed in the
docs/pics/directory, and placed in corresponding subfolders according to sections:Subfolder Corresponding Section pics/home/Homepage illustrations pics/new/New student manual pics/live/Life guide pics/study/Study and academics pics/service/Campus services pics/college/College details pics/organization/Student organizations pics/share/File sharing pics/words/Words for you pics/about/About Wiki -
Naming format:
<Page Name>-Fig<Number>-<Description>.png, for examplestudy-å?-æ ¡å.png -
Reference in the page in Markdown format:
Example
- Reference in
docs/study/system.md: - Reference the same image in
docs/new/preparation.md: - Reference in
docs/index.md:
- Reference in
Notes:
- Subfolders correspond one-to-one with page directories; images that cannot find a corresponding section are placed in
home/ - Preferably use
.png/.jpgformat; compress images as much as possible to avoid slowing down webpage loading - Please use images you have taken or obtained authorization for to avoid copyright issues
How to Maintain This Section
This Wiki is built in the "Markdown files + configuration files" method, maintenance is very simple:
- Add / Modify content: Directly create or edit
.mdfiles in thedocs/directory, no need to write any code -
Update navigation: After a new page is created, just add a line in the
navof the root directory'smkdocs.yml, for example:- New Section: - New Page: new/page.md -
Local deployment: After installing dependencies, execute
mkdocs servefor local preview. For specific steps, see "Local Deployment" below
Maintenance principle: Pages only store text and links, data should be stored externally as much as possible, so the Wiki will always remain lightweight and easy to maintain.
Local Deployment
To preview or modify the Wiki on your local machine, you need to install dependencies first (requires Python to be installed):
pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin
Then start local preview in the project root directory:
mkdocs serve
Open http://127.0.0.1:8000 in a browser to preview; the page will automatically refresh after modifying files.
Tip
- The above command installs the minimum dependencies required for local preview, consistent with online build (GitHub Actions)
- If the command is not found, add Python's Scripts directory to the system PATH, or use
python -m mkdocs serveinstead - When port 8000 is occupied, you can specify another port:
mkdocs serve -a 127.0.0.1:8123