From 8c6eced6c9cc117845cea57e789aa0cdea815c19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8D=E4=BA=88?= Date: Mon, 27 May 2024 19:41:31 +0800 Subject: [PATCH] Add basic structure --- .editorconfig | 9 +++ .github/workflows/pagebuild.yml | 24 ++++++++ .gitignore | 5 ++ docs/.editorconfig | 8 +++ docs/index.md | 13 +++++ docs/stylesheets/extra.css | 8 +++ mkdocs.yml | 99 +++++++++++++++++++++++++++++++++ overrides/partial/comments.html | 54 ++++++++++++++++++ 8 files changed, 220 insertions(+) create mode 100644 .editorconfig create mode 100644 .github/workflows/pagebuild.yml create mode 100644 .gitignore create mode 100644 docs/.editorconfig create mode 100644 docs/index.md create mode 100644 docs/stylesheets/extra.css create mode 100644 mkdocs.yml create mode 100644 overrides/partial/comments.html diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..900c75c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true + +[**/*.yml] +indent_style = space +indent_size = 2 diff --git a/.github/workflows/pagebuild.yml b/.github/workflows/pagebuild.yml new file mode 100644 index 0000000..591f657 --- /dev/null +++ b/.github/workflows/pagebuild.yml @@ -0,0 +1,24 @@ +name: Page-build +on: + push: + branches: + - main +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.x + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - uses: actions/cache@v3 + with: + key: mkdocs-material-${{ env.cache_id }} + path: .cache + restore-keys: | + mkdocs-material- + - run: pip install mkdocs-material pillow cairosvg Pygments + - run: mkdocs gh-deploy --force \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0931263 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +# IDE specific +.vscode + +# mkdocs framework +site diff --git a/docs/.editorconfig b/docs/.editorconfig new file mode 100644 index 0000000..7a7fb85 --- /dev/null +++ b/docs/.editorconfig @@ -0,0 +1,8 @@ +root = false + +[*.md] +indent_size = 4 +indent_style = space +trim_trailing_whitespace = true +end_of_line = lf +insert_final_newline = true \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..f75da55 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,13 @@ +--- +comments: true +--- + +# tl;dr: Privacy + +欢迎来到本网站的主页面! + +这是一个正在扩展的列表,其中的内容能帮助你在互联网上保护你的个人信息。 + +## 做出贡献 + +**我们需要帮助!** 大家提供的更多信息能让这个仓库变得更好!详情参阅[此讨论贴](https://github.com/CloneWith/CloneWith.github.io/discussions/36)。 diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css new file mode 100644 index 0000000..2fe54b4 --- /dev/null +++ b/docs/stylesheets/extra.css @@ -0,0 +1,8 @@ +body { + font-family: 'HarmonyOS Sans SC', 'Cascadia Code PL', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; +} + +:root { + --md-code-font: "Cascadia Code PL"; + --md-text-font: "HarmonyOS Sans SC"; +} diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..ee1dcf2 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,99 @@ +site_name: "tl;dr: Privacy" + +theme: + name: material + custom_dir: overrides + icon: + logo: material/shield-check + tag: + default: material/tag-text + credit: material/trophy-award + req: material/exclamation + misc: material/more + help: material/information + wip: material/pencil + + features: + - navigation.instant + - navigation.tracking + - navigation.tabs + - navigation.tabs.sticky + - navigation.sections + - navigation.expand + - toc.follow + - navigation.indexes + - navigation.top + - navigation.footer + - search.suggest + - search.highlight + - search.share + - content.code.copy + - content.code.annotate + palette: + # Palette toggle for light mode + - scheme: default + primary: teal + accent: teal + toggle: + icon: material/brightness-7 + name: Switch to dark mode + # Palette toggle for dark mode + - scheme: + primary: teal + accent: teal + toggle: + icon: material/brightness-4 + name: Switch to light mode + +plugins: + - tags + - search + +markdown_extensions: + - footnotes + - tables + - pymdownx.critic + - pymdownx.caret + - pymdownx.keys + - pymdownx.mark + - pymdownx.tilde + - admonition + - pymdownx.details + - pymdownx.superfences + - attr_list + - md_in_html + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.emoji: + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg + - pymdownx.arithmatex: + generic: true + - toc: + slugify: !!python/object/apply:pymdownx.slugs.slugify + kwds: + case: lower + +extra: + tags: + credit: credit + guide: help + misc: misc + WIP: wip + collaboration: coop + collab: coop + request: req + social: + - icon: fontawesome/brands/github + link: https://github.com/CloneWith + - icon: simple/osu + link: https://osu.ppy.sh/users/30973609 + - icon: simple/bilibili + link: https://space.bilibili.com/2046252132 + +extra_css: + - stylesheets/extra.css \ No newline at end of file diff --git a/overrides/partial/comments.html b/overrides/partial/comments.html new file mode 100644 index 0000000..d2bd14e --- /dev/null +++ b/overrides/partial/comments.html @@ -0,0 +1,54 @@ +{% if page.meta.comments %} +

{{ lang.t("meta.comments") }}

+ + + + + +{% endif %}