diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml new file mode 100644 index 0000000..1d3e4d9 --- /dev/null +++ b/.github/workflows/build-docs.yml @@ -0,0 +1,41 @@ +on: + pull_request: + paths: + - .github/workflows/build-docs.yml + - docs/** + push: + paths: + - .github/workflows/build-docs.yml + - docs/** + workflow_dispatch: + +jobs: + build-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - run: | + pip install -r requirements.txt + working-directory: docs + + - run: | + mkdocs build -f docs/mkdocs.yml -d ../site + + - uses: actions/upload-pages-artifact@v3 + with: + path: site/ + + deploy: + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + needs: build-docs + permissions: + id-token: write + pages: write + runs-on: ubuntu-latest + steps: + - uses: actions/deploy-pages@v4 + id: deployment diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d9f2479..d947723 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,14 @@ on: - push: pull_request: + paths: + - .github/workflows/build.yml + - Lip/** + - Lip.Tests/** + push: + paths: + - .github/workflows/build.yml + - Lip/** + - Lip.Tests/** workflow_dispatch: jobs: diff --git a/.gitignore b/.gitignore index 1d74e21..9f8ed82 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ .vscode/ + +/.venv/ +/site/ diff --git a/docs/img/favicon.ico b/docs/img/favicon.ico new file mode 100644 index 0000000..b60da2f Binary files /dev/null and b/docs/img/favicon.ico differ diff --git a/docs/img/logo.webp b/docs/img/logo.webp new file mode 100644 index 0000000..369ab0c Binary files /dev/null and b/docs/img/logo.webp differ diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml new file mode 100644 index 0000000..18581dc --- /dev/null +++ b/docs/mkdocs.yml @@ -0,0 +1,83 @@ +site_name: lip Docs +repo_url: https://github.com/futrime/lip + +docs_dir: . +exclude_docs: | + /mkdocs.yml + /requirements.txt + +nav: + - User Guide: + - user-guide/index.md + - user-guide/getting-started.md + - user-guide/installation.md + - user-guide/basic-use.md + - Topic Guides: [] + - Reference: [] + - Commands: [] + - Packaging Guide: + - packaging-guide/index.md + - Marketplace: https://bedrinth.com + +theme: + name: material + features: + - navigation.tabs + - navigation.tabs.sticky + favicon: img/favicon.ico + logo: img/logo.webp + palette: + - media: "(prefers-color-scheme: light)" + scheme: default + primary: white + toggle: + icon: material/brightness-7 + name: Switch to dark mode + + - media: "(prefers-color-scheme: dark)" + scheme: slate + toggle: + icon: material/brightness-4 + name: Switch to light mode + +markdown_extensions: + - abbr + - admonition + - attr_list + - def_list + - footnotes + - md_in_html + - toc + - tables + - pymdownx.arithmatex + - pymdownx.betterem + - pymdownx.caret + - pymdownx.mark + - pymdownx.tilde + - pymdownx.critic + - pymdownx.details + - pymdownx.emoji + - pymdownx.highlight: + auto_title: true + linenums: true + - pymdownx.inlinehilite + - pymdownx.keys + - pymdownx.smartsymbols + - pymdownx.snippets + - pymdownx.superfences + - pymdownx.tabbed: + alternate_style: true + - pymdownx.tasklist + +plugins: + - i18n: + languages: + - locale: en + default: true + name: English + + - locale: zh + name: 中文 + nav_translations: {} + + - search diff --git a/docs/packaging-guide/index.md b/docs/packaging-guide/index.md new file mode 100644 index 0000000..06800c0 --- /dev/null +++ b/docs/packaging-guide/index.md @@ -0,0 +1,2 @@ +# About Packaging + diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..b8752fe --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,30 @@ +babel==2.16.0 +certifi==2024.12.14 +charset-normalizer==3.4.1 +click==8.1.8 +colorama==0.4.6 +ghp-import==2.1.0 +idna==3.10 +Jinja2==3.1.5 +Markdown==3.7 +MarkupSafe==3.0.2 +mergedeep==1.3.4 +mkdocs==1.6.1 +mkdocs-get-deps==0.2.0 +mkdocs-material==9.5.49 +mkdocs-material-extensions==1.3.1 +mkdocs-static-i18n==1.2.3 +packaging==24.2 +paginate==0.5.7 +pathspec==0.12.1 +platformdirs==4.3.6 +Pygments==2.18.0 +pymdown-extensions==10.13 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyyaml_env_tag==0.1 +regex==2024.11.6 +requests==2.32.3 +six==1.17.0 +urllib3==2.3.0 +watchdog==6.0.0 diff --git a/docs/user-guide/basic-use.md b/docs/user-guide/basic-use.md new file mode 100644 index 0000000..d8b0f34 --- /dev/null +++ b/docs/user-guide/basic-use.md @@ -0,0 +1 @@ +# Basic Use diff --git a/docs/user-guide/getting-started.md b/docs/user-guide/getting-started.md new file mode 100644 index 0000000..bad5562 --- /dev/null +++ b/docs/user-guide/getting-started.md @@ -0,0 +1 @@ +# Getting Started diff --git a/docs/user-guide/index.md b/docs/user-guide/index.md new file mode 100644 index 0000000..125801d --- /dev/null +++ b/docs/user-guide/index.md @@ -0,0 +1,10 @@ +# About lip + +lip is the general package installer that lets you install packages from any Git repository. Developers can use lip to share, manage, and install packages across different projects and platforms. + +If you want to learn about how to use lip, check out the following resources: + +- [Getting Started](getting-started.md) +- [Packaging Guide](../packaging-guide/index.md) + +If you find bugs, need help, or want to talk to the developers, please report them on the [GitHub Issues](https://github.com/futrime/lip/issues) page. diff --git a/docs/user-guide/installation.md b/docs/user-guide/installation.md new file mode 100644 index 0000000..e69de29