From 430888a4a017513e044d144943ff0230843eefd0 Mon Sep 17 00:00:00 2001 From: Martin Nonnenmacher Date: Thu, 15 Aug 2024 22:13:16 +0200 Subject: [PATCH 1/3] docs: Remove Docusaurus template text Removate template text which contains a broken link to fix the build. Signed-off-by: Martin Nonnenmacher --- .../sw_development_monitoring/index.mdx | 147 +----------------- 1 file changed, 1 insertion(+), 146 deletions(-) diff --git a/website/docs/part_B_software_management/sw_development_monitoring/index.mdx b/website/docs/part_B_software_management/sw_development_monitoring/index.mdx index 808457f..e433441 100644 --- a/website/docs/part_B_software_management/sw_development_monitoring/index.mdx +++ b/website/docs/part_B_software_management/sw_development_monitoring/index.mdx @@ -4,149 +4,4 @@ sidebar_position: 4 # Software Development Monitoring -Docusaurus supports **[Markdown](https://daringfireball.net/projects/markdown/syntax)** and a few **additional features**. - -## Front Matter - -Markdown documents have metadata at the top called [Front Matter](https://jekyllrb.com/docs/front-matter/): - -```text title="my-doc.md" -// highlight-start ---- -id: my-doc-id -title: My document title -description: My document description -slug: /my-custom-url ---- -// highlight-end - -## Markdown heading - -Markdown text with [links](./hello.md) -``` - -## Links - -Regular Markdown links are supported, using url paths or relative file paths. - -```md -Let's see how to [Create a page](/create-a-page). -``` - -```md -Let's see how to [Create a page](./create-a-page.md). -``` - -**Result:** Let's see how to [Create a page](./create-a-page.md). - -## Images - -Regular Markdown images are supported. - -You can use absolute paths to reference images in the static directory (`static/img/docusaurus.png`): - -```md -![Docusaurus logo](/img/docusaurus.png) -``` - -![Docusaurus logo](/img/docusaurus.png) - -You can reference images relative to the current file as well. This is particularly useful to colocate images close to the Markdown files using them: - -```md -![Docusaurus logo](./img/docusaurus.png) -``` - -## Code Blocks - -Markdown code blocks are supported with Syntax highlighting. - -````md -```jsx title="src/components/HelloDocusaurus.js" -function HelloDocusaurus() { - return

Hello, Docusaurus!

; -} -``` -```` - -```jsx title="src/components/HelloDocusaurus.js" -function HelloDocusaurus() { - return

Hello, Docusaurus!

; -} -``` - -## Admonitions - -Docusaurus has a special syntax to create admonitions and callouts: - -```md -:::tip My tip - -Use this awesome feature option - -::: - -:::danger Take care - -This action is dangerous - -::: -``` - -:::tip My tip - -Use this awesome feature option - -::: - -:::danger Take care - -This action is dangerous - -::: - -## MDX and React Components - -[MDX](https://mdxjs.com/) can make your documentation more **interactive** and allows using any **React components inside Markdown**: - -```jsx -export const Highlight = ({children, color}) => ( - { - alert(`You clicked the color ${color} with label ${children}`) - }}> - {children} - -); - -This is Docusaurus green ! - -This is Facebook blue ! -``` - -export const Highlight = ({children, color}) => ( - { - alert(`You clicked the color ${color} with label ${children}`); - }}> - {children} - -); - -This is Docusaurus green ! - -This is Facebook blue ! +tbd From f2f2af86de278969ae111eb5392d007f8c4b6cc9 Mon Sep 17 00:00:00 2001 From: Martin Nonnenmacher Date: Thu, 15 Aug 2024 21:57:48 +0200 Subject: [PATCH 2/3] ci: Add workflows to test and deploy the website Add a workflow to verify that the website build works in PRs, and a workflow to deploy the website from the main branch. Signed-off-by: Martin Nonnenmacher --- .github/workflows/website-deploy.yml | 39 ++++++++++++++++++++++++++++ .github/workflows/website-test.yml | 24 +++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .github/workflows/website-deploy.yml create mode 100644 .github/workflows/website-test.yml diff --git a/.github/workflows/website-deploy.yml b/.github/workflows/website-deploy.yml new file mode 100644 index 0000000..a6473d9 --- /dev/null +++ b/.github/workflows/website-deploy.yml @@ -0,0 +1,39 @@ +name: Website Deploy + +on: + push: + branches: + - main + +jobs: + build: + name: Website Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + cache-dependency-path: website/package-lock.json + - name: Install dependencies + run: npm ci + working-directory: website + - name: Build website + run: npm run build + working-directory: website + - uses: actions/upload-pages-artifact@v3 + with: + path: website/build + deploy: + name: Website Deploy + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/website-test.yml b/.github/workflows/website-test.yml new file mode 100644 index 0000000..e3095ce --- /dev/null +++ b/.github/workflows/website-test.yml @@ -0,0 +1,24 @@ +name: Website Test + +on: + pull_request: + branches: + - main + +jobs: + test: + name: Website Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + cache-dependency-path: website/package-lock.json + - name: Install dependencies + run: npm ci + working-directory: website + - name: Test build + run: npm run build + working-directory: website From 2e53929ee9a6e9aed06c4e04b8e1b6f8750cda8c Mon Sep 17 00:00:00 2001 From: Marcel Kurzmann Date: Fri, 16 Aug 2024 09:41:49 +0200 Subject: [PATCH 3/3] Update docusaurus.config.js - Bugfix for base Url Signed-off-by: Marcel Kurzmann --- website/docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 4e58f8d..5833aec 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -16,7 +16,7 @@ const config = { url: 'https://your-docusaurus-site.example.com', // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' - baseUrl: '/', + baseUrl: '/guidance/', // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these.