From c3c251f389eb1de25d61e4b1affb162a761cf168 Mon Sep 17 00:00:00 2001 From: HAHWUL Date: Wed, 9 Oct 2024 01:49:41 +0900 Subject: [PATCH 1/2] Add jekyll-sitemap plugin to Gemfile and _config.yml Signed-off-by: HAHWUL --- docs/Gemfile | 1 + docs/Gemfile.lock | 3 +++ docs/_config.yml | 3 +++ 3 files changed, 7 insertions(+) diff --git a/docs/Gemfile b/docs/Gemfile index 97ceb515..94d2a252 100644 --- a/docs/Gemfile +++ b/docs/Gemfile @@ -9,4 +9,5 @@ gem "just-the-docs" # Plugins group :jekyll_plugins do gem "jekyll-securitytxt" + gem "jekyll-sitemap" end diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index b6a9164a..2780e52b 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -46,6 +46,8 @@ GEM jekyll jekyll-seo-tag (2.8.0) jekyll (>= 3.8, < 5.0) + jekyll-sitemap (1.4.0) + jekyll (>= 3.7, < 5.0) jekyll-watch (2.2.1) listen (~> 3.0) just-the-docs (0.10.0) @@ -88,6 +90,7 @@ PLATFORMS DEPENDENCIES jekyll (~> 4.3.3) jekyll-securitytxt + jekyll-sitemap just-the-docs BUNDLED WITH diff --git a/docs/_config.yml b/docs/_config.yml index 80d9cd40..414b7823 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -9,6 +9,9 @@ aux_links: Github: https://github.com/owasp-noir/noir OWASP: https://owasp.org/www-project-noir/ +plugins: + - jekyll-sitemap + # Footer "Edit this page on GitHub" link text gh_edit_link: true # show or hide edit this page link gh_edit_link_text: "Edit this page on GitHub." From 0f292ad294256df86b6a29ff113af02d79bfac0c Mon Sep 17 00:00:00 2001 From: HAHWUL Date: Wed, 9 Oct 2024 01:49:45 +0900 Subject: [PATCH 2/2] Add deadlink workflow to check for broken links in the repository Signed-off-by: HAHWUL --- .github/workflows/deadlinks.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/deadlinks.yml diff --git a/.github/workflows/deadlinks.yml b/.github/workflows/deadlinks.yml new file mode 100644 index 00000000..142e2e45 --- /dev/null +++ b/.github/workflows/deadlinks.yml @@ -0,0 +1,30 @@ +--- + name: DeadLink + # Controls when the workflow will run + on: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + # A workflow run is made up of one or more jobs that can run sequentially or in parallel + jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - name: Find Broken Link + uses: hahwul/deadfinder@1.4.3 + id: broken-link + with: + command: sitemap + target: https://owasp-noir.github.io/noir/sitemap.xml + - name: Create an issue + uses: dacbd/create-issue-action@main + with: + token: ${{ github.token }} + title: DeadLink Issue + body: | + ```json + ${{ steps.broken-link.outputs.output }} + ``` \ No newline at end of file