diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000000..c73e61385c8 Binary files /dev/null and b/.DS_Store differ diff --git a/.commitlintrc.json b/.commitlintrc.json new file mode 100644 index 00000000000..7f04d9cbd4e --- /dev/null +++ b/.commitlintrc.json @@ -0,0 +1,8 @@ +{ + "rules": { + "body-max-line-length": [ + 0, + "always" + ] + } +} diff --git a/.github/.DS_Store b/.github/.DS_Store new file mode 100644 index 00000000000..de7d5a2ee32 Binary files /dev/null and b/.github/.DS_Store differ diff --git a/.github/DISCUSSION_TEMPLATE/general.yml b/.github/DISCUSSION_TEMPLATE/general.yml deleted file mode 100644 index 4e879f95049..00000000000 --- a/.github/DISCUSSION_TEMPLATE/general.yml +++ /dev/null @@ -1,26 +0,0 @@ -body: - - type: checkboxes - attributes: - label: Checklist - description: Following the guidelines can make you more likely to get responses. - options: - - label: >- - I have read and accepted the - [contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md). - required: true - - - type: dropdown - attributes: - label: What is the topic? - options: - - Sharing tips and tricks - - Just chatting - validations: - required: true - - - type: textarea - attributes: - label: Description - description: Please describe in detail what you want to share. - validations: - required: true diff --git a/.github/DISCUSSION_TEMPLATE/q-a.yml b/.github/DISCUSSION_TEMPLATE/q-a.yml deleted file mode 100644 index a2e2aa150c0..00000000000 --- a/.github/DISCUSSION_TEMPLATE/q-a.yml +++ /dev/null @@ -1,40 +0,0 @@ -body: - - type: checkboxes - attributes: - label: Checklist - description: Following the guidelines can make you more likely to get responses. - options: - - label: >- - I have read and accepted the - [contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md). - required: true - - - type: dropdown - id: download - attributes: - label: How did you create the site? - options: - - Generated from `chirpy-starter` - - Built from `jekyll-theme-chirpy` - validations: - required: true - - - type: textarea - attributes: - label: Description - description: Please describe your need in detail. - validations: - required: true - - - type: textarea - attributes: - label: Operations you have already tried - description: Describe the effort you went through. - validations: - required: true - - - type: textarea - attributes: - label: Anything else? - description: | - Links? References? Or logs? Anything that will give us more context about the issue you are encountering! diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index f22921b7049..00000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -ko_fi: coteschung -custom: https://sponsor.cotes.page diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml deleted file mode 100644 index 7b513fb5841..00000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Bug Report -description: Create a report to help us improve -body: - - type: checkboxes - attributes: - label: Checklist - description: Following the guidelines can make you more likely to get responses. - options: - - label: >- - I have read and accepted the - [contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md). - required: true - - - type: dropdown - id: download - attributes: - label: How did you create the site? - options: - - Generated from `chirpy-starter` - - Built from `jekyll-theme-chirpy` - validations: - required: true - - - type: textarea - attributes: - label: Describe the bug - description: A clear and concise description of what the bug is. - validations: - required: true - - - type: textarea - attributes: - label: Steps To Reproduce - description: Steps to reproduce the behavior. - placeholder: | - 1. In this environment... - 2. With this config... - 3. Run '...' - 4. See error... - validations: - required: true - - - type: textarea - attributes: - label: Expected Behavior - description: A concise description of what you expected to happen. - validations: - required: true - - - type: textarea - attributes: - label: Environment - value: | - - Ruby: - - Jekyll: - - Chirpy: - validations: - required: true - - - type: textarea - attributes: - label: Anything else? - description: | - Links? References? Or logs? Anything that will give us more context about the issue you are encountering! diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 1dfb2b26dd0..00000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Ask the community for help - url: https://github.com/cotes2020/jekyll-theme-chirpy/discussions - about: Please ask and answer questions here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml deleted file mode 100644 index 79570359f17..00000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Feature Request -description: Suggest an idea for this project -labels: - - enhancement -body: - - type: checkboxes - attributes: - label: Checklist - description: Following the guidelines can make you more likely to get responses. - options: - - label: >- - I have read and accepted the - [contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md). - required: true - - - type: textarea - attributes: - label: Is your feature request related to a problem? Please describe - description: A clear and concise description of what the problem is. - validations: - required: true - - - type: textarea - attributes: - label: Describe the solution you'd like - description: A clear and concise description of what you want to happen. - validations: - required: true - - - type: textarea - attributes: - label: Describe alternatives you've considered - description: A clear and concise description of any alternative solutions or features you've considered. - - - type: textarea - attributes: - label: Additional context - description: Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0ff984a75d4..8e41f4f45a2 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,17 +1,34 @@ +## Description + + + ## Type of change - + + - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) -- [ ] Improvement (refactoring and improving code) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Documentation update -## Description +## How has this been tested + -## Additional context - +- [ ] I have run `bash ./tools/test` (at the root of the project) locally and passed +- [ ] I have tested this feature in the browser + +### Test Configuration + +- Browser type & version: +- Operating system: +- Ruby version: +- Bundler version: +- Jekyll version: diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 2e239a45073..af4a88534d0 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,10 +1,7 @@ name: CD on: push: - tags: - - "v[0-9]+.[0-9]+.[0-9]+" - branches: - - docs + branches: [production, docs] jobs: launch: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7b1f5a692a..423c5860ed5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,31 +8,45 @@ on: - ".github/**" - "!.github/workflows/ci.yml" - ".gitignore" - - "docs/**" - "README.md" - "LICENSE" pull_request: paths: - "**" + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + + jobs: build: runs-on: ubuntu-latest strategy: matrix: - ruby: ["3.0", "3.1", "3.2"] + ruby: [2.7, 3] steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 # for posts's lastmod + # submodules: true + # If using the 'assets' git submodule from Chirpy Starter, uncomment above + # (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets) + - name: Setup Pages + id: pages + uses: actions/configure-pages@v5 - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: ${{ matrix.ruby }} + ruby-version: 3.2 bundler-cache: true - name: Setup Node @@ -43,3 +57,14 @@ jobs: - name: Test Site run: bash tools/test + + - name: Build site + run: bundle exec jekyll b -d "_site${{ steps.pages.outputs.base_path }}" + env: + JEKYLL_ENV: "production" + + - name: Test site + run: | + bundle exec htmlproofer _site \ + \-\-disable-external=true \ + \-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/" diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml deleted file mode 100644 index d79814a2883..00000000000 --- a/.github/workflows/commitlint.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Lint Commit Messages -on: pull_request - -jobs: - commitlint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: wagoid/commitlint-github-action@v5 diff --git a/.github/workflows/grace-project-apt.yml b/.github/workflows/grace-project-apt.yml new file mode 100644 index 00000000000..9b37ffbe2cc --- /dev/null +++ b/.github/workflows/grace-project-apt.yml @@ -0,0 +1,87 @@ +name: 'Grace project - Apt' + +on: + push: + branches: + - master + # paths-ignore: + # - .gitignore + # - README.md + # - LICENSE + # schedule: + # - cron: '0 21 * * *' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + run_project_csv_builder: + name: project webscrap_apt create csv + # runs-on: macOS-latest + runs-on: ubuntu-latest + + steps: + - name: Print a greeting + env: + MY_VAR: Hi there! My name is + PROJECT_NAME: webscrap_apt + run: | + echo $MY_VAR $PROJECT_NAME. + + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 # for posts's lastmod + + - name: run apt project script + # run: bash ./wh.sh \ + run: python ./_posts/00CodeNote/project/webscrap_apt/play.py -t all + + # - name: Install Python dependencies + # run: python -m pip install -r ./_posts/00CodeNote/project/webscrap_apt/requirements.txt + + # - name: run img player + # run: python ./_posts/00CodeNote/project/webscrap_apt/img_play.py + + - name: Commit and push changes + run: | + git config --global user.name "grace" + git config --global user.email "lgraceye@hotmail.com" + git pull origin master + git add . + git commit -m "Auto updating csv to repo" + git push + + run_project_img_builder: + name: project webscrap_apt print img + # runs-on: macOS-latest + runs-on: ubuntu-latest + needs: run_project_csv_builder + + steps: + - name: Print a greeting + env: + MY_VAR: Hi there! My name is + PROJECT_NAME: webscrap_apt + run: | + echo $MY_VAR $PROJECT_NAME. + + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 # for posts's lastmod + + - name: Install Python dependencies + run: python -m pip install -r ./_posts/00CodeNote/project/webscrap_apt/requirements.txt + + - name: run img player + run: python ./_posts/00CodeNote/project/webscrap_apt/img_play.py + + - name: Commit and push changes + run: | + git config --global user.name "grace" + git config --global user.email "lgraceye@hotmail.com" + # git pull origin master + git add . + git commit -m "Auto updating img to repo" + git push diff --git a/.github/workflows/grace-project-tesla.yml b/.github/workflows/grace-project-tesla.yml new file mode 100644 index 00000000000..08e1ec5454c --- /dev/null +++ b/.github/workflows/grace-project-tesla.yml @@ -0,0 +1,55 @@ +name: 'Grace project - Tesla' + +on: + push: + branches: + - master +# schedule: +# - cron: '0 21 * * *' + # - cron: '*/30 * * * *' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + run_project_output_builder: + name: project webscrap_tesla create output + runs-on: ubuntu-latest + + steps: + - name: Print a greeting + env: + MY_VAR: Hi there! My name is + PROJECT_NAME: webscrap_tesla + run: | + echo $MY_VAR $PROJECT_NAME. + + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 # for posts's lastmod + + - name: Install Python dependencies + run: python -m pip install -r ./_posts/00CodeNote/project/webscrap_tesla/requirements.txt + + - name: Install chromium dependencies + run: | + sudo apt-get update + sudo apt-get install -y chromium-browser + pip install selenium + + - name: run tesla project script + # run: bash ./wh.sh \ + run: python ./_posts/00CodeNote/project/webscrap_tesla/run.py --headless + + # - name: run img player + # run: python ./_posts/00CodeNote/project/webscrap_tesla/img_play.py + + - name: Commit and push changes + run: | + git config --global user.name "grace" + git config --global user.email "lgraceye@hotmail.com" + git pull origin master + git add . + git commit -m "Auto updating output to repo" + git push diff --git a/.github/workflows/pages-deploy.yml.hook b/.github/workflows/pages-deploy.yml similarity index 97% rename from .github/workflows/pages-deploy.yml.hook rename to .github/workflows/pages-deploy.yml index c33b2a6b889..65f933ababd 100644 --- a/.github/workflows/pages-deploy.yml.hook +++ b/.github/workflows/pages-deploy.yml @@ -37,7 +37,7 @@ jobs: - name: Setup Pages id: pages - uses: actions/configure-pages@v4 + uses: actions/configure-pages@v5 - name: Setup Ruby uses: ruby/setup-ruby@v1 diff --git a/.github/workflows/style-lint.yml b/.github/workflows/style-lint.yml deleted file mode 100644 index f7aa54db344..00000000000 --- a/.github/workflows/style-lint.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: "Style Lint" - -on: - push: - branches-ignore: - - "production" - - "docs" - paths: - - "_sass/**/*.scss" - pull_request: - paths: - - "_sass/**/*.scss" - -jobs: - stylelint: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node - uses: actions/setup-node@v4 - - run: npm i - - run: npm test diff --git a/.gitignore b/.gitignore index cee9e1210f5..9297f91f4cd 100644 --- a/.gitignore +++ b/.gitignore @@ -17,5 +17,45 @@ package-lock.json # IDE configurations .idea +.clj-kondo/ +.lsp/ +.vscode/ +.DS_Store + # Misc -assets/js/dist +_posts/.DS_Store +_posts/00Abook/Data Structures and Algorithms in Java, 6th Edition.pdf +_posts/00Abook/GCP/PCSE_Workbook.pdf +_posts/00Abook/GCP/Preparing for Professional Cloud Security Engineer Journey workbook.pdf +_posts/00AGeneralNote/1330460_finding_100.json +_posts/00AGeneralNote/1330460_finding_high.json +_posts/00AGeneralNote/Application/SU/SketchUp-aa +_posts/00AGeneralNote/Application/SU/SketchUp-ab +_posts/00AGeneralNote/Application/SU/SketchUp-ac +_posts/00AGeneralNote/Application/SU/SketchUp-ad +_posts/00AGeneralNote/Application/SU/SketchUp-ae +_posts/00AGeneralNote/Application/SU/SketchUp-af +_posts/00AGeneralNote/Application/SU/SketchUp-ag +_posts/00AGeneralNote/Application/SU/SketchUp-ah +_posts/00AGeneralNote/Application/SU/SketchUp-ai +_posts/00AGeneralNote/Application/SU/SketchUp-aj +_posts/00AGeneralNote/finding_1330460.json +_posts/00AGeneralNote/output.txt +_posts/00AGeneralNote/Paper/Data Structures and Algorithms in Java, 6th Edition.pdf +_posts/00AGeneralNote/Paper/GCP/PCSE_Workbook.pdf +_posts/00AGeneralNote/Paper/GCP/Preparing for Professional Cloud Security Engineer Journey workbook.pdf +_posts/00AGeneralNote/run.py +_posts/00AGeneralNote/WorkCommand.md +_posts/00AIssueBook/Application/SU/SketchUp-aa +_posts/00AIssueBook/Application/SU/SketchUp-ab +_posts/00AIssueBook/Application/SU/SketchUp-ac +_posts/00AIssueBook/Application/SU/SketchUp-ad +_posts/00AIssueBook/Application/SU/SketchUp-ae +_posts/00AIssueBook/Application/SU/SketchUp-af +_posts/00AIssueBook/Application/SU/SketchUp-ag +_posts/00AIssueBook/Application/SU/SketchUp-ah +_posts/00AIssueBook/Application/SU/SketchUp-ai +_posts/00AIssueBook/Application/SU/SketchUp-aj +_posts/00AIssueBook/M1.md +_posts/10SecConcepts/.DS_Store +.vscode/* diff --git a/.gitmodules b/.gitmodules index 58062c54bd3..e69de29bb2d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "assets/lib"] - path = assets/lib - url = https://github.com/cotes2020/chirpy-static-assets.git diff --git a/.markdownlint.json b/.markdownlint.json index 831991edaef..3c75f92f301 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -1,8 +1,11 @@ { - "commands-show-output": false, - "blanks-around-fences": false, - "line-length": false, - "no-inline-html": { - "allowed_elements": ["kbd", "sub"] - } + "commands-show-output": false, + "blanks-around-fences": false, + "line-length": false, + "no-inline-html": { + "allowed_elements": [ + "kbd", + "sub" + ] + } } diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000000..347bab1f4d2 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,67 @@ +exclude: ".txt|.csv" + +repos: + # - repo: local + # hooks: + # # - id: pylint + # # name: pylint + # # entry: pylint + # # language: system + # # types: [python] + # - id: black + # name: black + # entry: black + # language: system + # types: [python] + + # must be initialized via pre-commit install + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + # - id: check-added-large-files # Prevent giant files from being committed + - id: check-docstring-first # Checks a common error of defining a docstring after code. + - id: check-json + - id: check-merge-conflict + - id: check-xml + - id: check-yaml + argsa: [--allow-multiple-documents] + - id: detect-private-key # Detects the presence of private keys + - id: end-of-file-fixer # Fix the empty EOF + - id: pretty-format-json + args: + - --autofix + - --indent=4 + - --no-sort-keys + - id: trailing-whitespace # Fix the redundant whitespace + + # Check for typos + - repo: https://github.com/codespell-project/codespell + rev: v2.2.2 + hooks: + - id: codespell + args: + - --ignore-words=allow.txt + - --exclude-file=allow.txt + exclude: \.ipynb$ + + # ======= check python ======= + # - repo: https://github.com/ambv/black + # rev: 22.12.0 + # hooks: + # - id: black + # language_version: python3 + # - repo: https://github.com/asottile/pyupgrade + # rev: v3.3.1 + # hooks: + # - id: pyupgrade + # args: [--py38-plus] + - repo: https://github.com/PyCQA/autoflake + rev: v2.0.0 + hooks: + - id: autoflake + # removes unused imports and unused variables + - repo: https://github.com/pycqa/isort + rev: 5.12.0 + hooks: + - id: isort + # sort the import package diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 00000000000..55d26a07cdd --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,27 @@ +{ + "extends": "stylelint-config-standard-scss", + "rules": { + "no-descending-specificity": null, + "shorthand-property-no-redundant-values": null, + "at-rule-no-vendor-prefix": null, + "property-no-vendor-prefix": null, + "selector-no-vendor-prefix": null, + "value-no-vendor-prefix": null, + "color-function-notation": "legacy", + "alpha-value-notation": "number", + "selector-not-notation": "simple", + "color-hex-length": "long", + "declaration-block-single-line-max-declarations": 3, + "scss/operator-no-newline-after": null, + "rule-empty-line-before": [ + "always", + { + "ignore": [ + "after-comment", + "first-nested", + "inside-block" + ] + } + ] + } +} diff --git a/.versionrc.json b/.versionrc.json new file mode 100644 index 00000000000..c3aa5a9af92 --- /dev/null +++ b/.versionrc.json @@ -0,0 +1,20 @@ +{ + "skip": { + "commit": true, + "tag": true + }, + "types": [ + { + "type": "feat", + "section": "Features" + }, + { + "type": "fix", + "section": "Bug Fixes" + }, + { + "type": "perf", + "section": "Improvements" + } + ] +} diff --git a/README.md b/README.md index f084852eeee..591072ebd07 100644 --- a/README.md +++ b/README.md @@ -1,83 +1,109 @@ - -
+
+
+
+
+
- [**Live Demo** →][demo]
+Sharks
+Whales
+` elements whose direct parent is an `
Sharks
` in the example matches this pattern, + - but `Whales
` does not match because its `