Skip to content

Commit

Permalink
refactor: organized docs (#1596)
Browse files Browse the repository at this point in the history
* refactor: organzie API docs

* ci: fix action versions

* refactor: mkdocs moved to docs/main

* ci: docs dependency update

---------

Co-authored-by: Zijian Zhang <[email protected]>
  • Loading branch information
OEOTYAN and futrime authored Nov 8, 2024
1 parent 03c025a commit d74122b
Show file tree
Hide file tree
Showing 47 changed files with 54 additions and 35 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/docs/main/" # Location of package manifests
schedule:
interval: "weekly"
23 changes: 13 additions & 10 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true

- run: |
git clone --depth 1 --branch v2.3.4 https://github.com/jothepro/doxygen-awesome-css.git docs/api/doxygen-awesome-css
- run : |
mkdir -p site/api
- uses: mattnotmitt/[email protected]
- uses: mattnotmitt/doxygen-action@v1
with:
doxyfile-path: ./docs/api/Doxyfile

- run: |
tar -cvf artifact.tar -C site/ .
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: doxygen-pages
path: |
Expand All @@ -37,15 +40,15 @@ jobs:
- uses: actions/checkout@v4

- run: |
pip install -r requirements.txt
pip install -r docs/main/requirements.txt
- run: |
mkdocs build
mkdocs build -f docs/main/mkdocs.yml -d ../../site
- run: |
tar -cvf artifact.tar -C site/ .
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: mkdocs-pages
path: |
Expand All @@ -57,7 +60,7 @@ jobs:
- build-mkdocs
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
path: artifacts/

Expand All @@ -67,7 +70,7 @@ jobs:
tar -xvf artifacts/doxygen-pages/artifact.tar -C site/
tar -xvf artifacts/mkdocs-pages/artifact.tar -C site/
- uses: actions/upload-pages-artifact@v2
- uses: actions/upload-pages-artifact@v3
with:
path: site/

Expand All @@ -80,4 +83,4 @@ jobs:
pages: write
runs-on: ubuntu-latest
steps:
- uses: actions/deploy-pages@v2
- uses: actions/deploy-pages@v4
25 changes: 16 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
*.app



## https://github.com/github/gitignore/blob/main/CMake.gitignore
CMakeLists.txt.user
CMakeCache.txt
Expand All @@ -46,6 +47,7 @@ compile_commands.json
CTestTestfile.cmake



## https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
Expand Down Expand Up @@ -437,6 +439,7 @@ FodyWeavers.xsd
*.sln.iml



## https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
.vscode/*
!.vscode/settings.json
Expand All @@ -452,6 +455,7 @@ FodyWeavers.xsd
*.vsix



## https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
Expand Down Expand Up @@ -532,22 +536,25 @@ fabric.properties
.idea/caches/build_file_checksums.ser


## XMake

## Miscellaneous
# XMake
/.xmake/
/build/
/CMakeLists.txt
/vsxmake2022

# MkDocs
## Documentation
/docs/api/doxygen-awesome-css/
/site/

## Project specific
# IDE
/.idea/
/.vscode/
.idea/
.vscode/

# Testing
/bin/
/src/ll/test/include_all.cpp
/src-test/**/include_all.cpp

# Test
src-test/**/include_all.cpp

bin/
src/ll/test/include_all.cpp
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

10 changes: 5 additions & 5 deletions Doxyfile → docs/api/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ PROJECT_BRIEF =
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.

PROJECT_LOGO = docs/img/logo_small.svg
PROJECT_LOGO = docs/api/logo.svg

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
Expand Down Expand Up @@ -815,7 +815,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.

LAYOUT_FILE = DoxygenLayout.xml
LAYOUT_FILE = docs/api/DoxygenLayout.xml

# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
# the reference definitions. This must be a list of .bib files. The .bib
Expand Down Expand Up @@ -1309,7 +1309,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_HEADER = docs/api/assets/header.html
HTML_HEADER = docs/api/header.html

# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
# generated HTML page. If the tag is left blank doxygen will generate a standard
Expand Down Expand Up @@ -1349,7 +1349,7 @@ HTML_STYLESHEET =
# documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_EXTRA_STYLESHEET = docs/api/assets/doxygen-awesome-css/doxygen-awesome.css
HTML_EXTRA_STYLESHEET = docs/api/doxygen-awesome-css/doxygen-awesome.css

# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
Expand All @@ -1359,7 +1359,7 @@ HTML_EXTRA_STYLESHEET = docs/api/assets/doxygen-awesome-css/doxygen-awesome.css
# files will be copied as-is; there are no commands or markers available.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_EXTRA_FILES = docs/api/assets/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js
HTML_EXTRA_FILES = docs/api/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js

# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output
# should be rendered with a dark or light theme.
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion docs/api/assets/doxygen-awesome-css
Submodule doxygen-awesome-css deleted from df83fb
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Then, you need to install LeviLamina somewhere. This tutorial is for LeviLamina

Visit [levilamina-mod-template](https://github.com/LiteLDev/levilamina-mod-template) and click `Use this template` to use this template to initialize your mod repository.

![Create from template](img/levilamina-mod-template.png)
![Create from template](levilamina-mod-template.png)

Clone the mod repository to your local machine using Git, and then open it with VSCode. You need to modify some of the files to fill in your mod information.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

访问[levilamina-mod-template](https://github.com/LiteLDev/levilamina-mod-template),点击`Use this template`以使用这个模板初始化你的模组仓库。

![Create from template](img/levilamina-mod-template.png)
![Create from template](levilamina-mod-template.png)

将模组仓库使用Git克隆到本地,然后使用VSCode打开。你需要修改其中的一些文件,填写你的模组信息。

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
12 changes: 7 additions & 5 deletions mkdocs.yml → docs/main/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
site_name: LeviLamina Docs
repo_url: https://github.com/LiteLDev/LeviLamina
docs_dir: .

exclude_docs: |
/mkdocs.yml
/requirements.txt
nav:
- Home: index.md
Expand Down Expand Up @@ -32,16 +37,13 @@ nav:
- Maintainer Guides:
- maintainer_guides/cpp_style_guide.md

exclude_docs: |
api/assets/
theme:
name: material
features:
- navigation.tabs
- navigation.tabs.sticky
favicon: img/favicon.ico
logo: img/logo.svg
favicon: favicon.ico
logo: logo.svg
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d74122b

Please sign in to comment.