From 30e7f7792f98d6568beea36fb13631675d2deeae Mon Sep 17 00:00:00 2001 From: Dup4 Date: Tue, 15 Feb 2022 10:20:57 +0800 Subject: [PATCH 1/7] chore: add .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..7b8eeeb3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +.vscode/ From 9af09b3c8a379bac503748847cda3354a0f57ca8 Mon Sep 17 00:00:00 2001 From: Dup4 Date: Tue, 15 Feb 2022 12:44:15 +0800 Subject: [PATCH 2/7] style: format --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 620309f1..3e1fc820 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,11 @@ -name: ci +name: ci + on: push: branches: - master - main + jobs: deploy: runs-on: ubuntu-latest @@ -12,6 +14,6 @@ jobs: - uses: actions/setup-python@v2 with: python-version: 3.x + - run: pip install mkdocs-material - run: mkdocs gh-deploy --force - From 5acb4a2eab9a6227c2791fc46784afddbcef3cf2 Mon Sep 17 00:00:00 2001 From: Dup4 Date: Tue, 15 Feb 2022 12:50:03 +0800 Subject: [PATCH 3/7] chore: add .editorconfig --- .editorconfig | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..afcf2694 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.yml] +indent_size = 2 From bbf4f04c94dbd01366d8640c199eb84e4b1a047d Mon Sep 17 00:00:00 2001 From: Dup4 Date: Tue, 15 Feb 2022 12:50:14 +0800 Subject: [PATCH 4/7] chore: add requirements --- requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..4c8f017d --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +mkdocs-material From f71ff89e3dcd4df14e145fdb542344182b82e532 Mon Sep 17 00:00:00 2001 From: Dup4 Date: Tue, 15 Feb 2022 12:50:28 +0800 Subject: [PATCH 5/7] chore: ignore some dir --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 7b8eeeb3..b094241e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ .DS_Store .vscode/ + +/venv +/site From a00b2620b81e823d66e9f77a4a88f9aa609ccc0c Mon Sep 17 00:00:00 2001 From: Dup4 Date: Tue, 15 Feb 2022 13:03:11 +0800 Subject: [PATCH 6/7] chore: add more configuration in mkdocs.yml --- .github/workflows/ci.yml | 7 ++-- mkdocs.yml | 73 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 75 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e1fc820..4ebcf830 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: ci on: push: - branches: + branches: - master - main @@ -11,9 +11,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/setup-python@v2 with: python-version: 3.x - - run: pip install mkdocs-material + - run: pip3 install -U -r requirements.txt - run: mkdocs gh-deploy --force diff --git a/mkdocs.yml b/mkdocs.yml index 48540659..893326e3 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,7 +1,74 @@ site_name: CS自学指南 +site_url: https://csdiy.wiki/ +site_author: PKUFlyingPig +site_description: >- + CS自学指南 + +repo_name: cs-self-learning +repo_url: https://github.com/pkuflyingpig/cs-self-learning/ + +copyright: Copyright © 2021-present PKUFlyingPig + theme: name: material -repo_url: https://github.com/pkuflyingpig/cs-self-learning/ + language: zh + + static_templates: + - 404.html + + include_search_page: false + search_index_only: true + + features: + - header.autohide + # - navigation.instant + # - navigation.expand + # - navigation.sections + - navigation.tracking + # - navigation.tabs + # - navigation.tabs.sticky + - navigation.top + # - navigation.indexes + - search.highlight + - search.share + - search.suggest + # - toc.integrate + - content.code.annotate + + palette: + - media: "(prefers-color-scheme: light)" + scheme: default + primary: light blue + accent: deep purple + toggle: + icon: material/weather-sunny + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: cyan + accent: deep purple + toggle: + icon: material/weather-night + name: Switch to light mode + + font: + text: Roboto + code: Roboto Mono + icon: + repo: fontawesome/brands/github + +plugins: + - search: + lang: ja + - git-revision-date-localized + - minify: + minify_html: true + +extra: + social: + - icon: fontawesome/brands/github + link: https://github.com/pkuflyingpig/cs-self-learning/ + nav: - 前言: 'index.md' - 一个仅供参考的CS学习规划: 'CS学习规划.md' @@ -45,7 +112,7 @@ nav: - 软件工程: - 'MIT 6.031: Software Construction': '软件工程/6031.md' - 'UCB CS169: software engineering': '软件工程/CS169.md' - - 体系结构: + - 体系结构: - 'Coursera: Nand2Tetris': '体系结构/N2T.md' - 'UCB CS61C: Great Ideas in Computer Architecture': '体系结构/CS61C.md' - 'CMU 15-213: CSAPP': '体系结构/CSAPP.md' @@ -79,7 +146,7 @@ nav: - '智能计算系统': '人工智能/CYJ.md' - 机器学习: - 'Coursera: Machine Learning': '机器学习/ML.md' - - 'Stanford CS229: Machine Learning': '机器学习/CS229.md' + - 'Stanford CS229: Machine Learning': '机器学习/CS229.md' - 'UCB CS189: Introduction to Machine Learning': '机器学习/CS189.md' - 深度学习: - 'Coursera: Deep Learning': '深度学习/CS230.md' From c7052b87d88d57bf5db455cecebb7366ccaee0b3 Mon Sep 17 00:00:00 2001 From: Dup4 Date: Tue, 15 Feb 2022 13:06:57 +0800 Subject: [PATCH 7/7] chore: add plugin requirements --- requirements.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/requirements.txt b/requirements.txt index 4c8f017d..b629fb25 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,4 @@ mkdocs-material + +mkdocs-minify-plugin >= 0.4.0 +mkdocs-git-revision-date-localized-plugin >= 0.9.3