Update documentation due to the VitePress migration#1005
Update documentation due to the VitePress migration#1005grego952 merged 20 commits intokyma-project:mainfrom
Conversation
Co-authored-by: Nina Hingerl <76950046+NHingerl@users.noreply.github.com>
| }, | ||
| ``` | ||
|
|
||
| If you want to add documentation for a new module, you must also add the module repository name do the `deploy.yml` file, under `jobs.copy-docs.strategy.matrix.repository`. For example: |
There was a problem hiding this comment.
I would say this is step 4.
| If you want to add documentation for a new module, you must also add the module repository name do the `deploy.yml` file, under `jobs.copy-docs.strategy.matrix.repository`. For example: | |
| 4. In the `/kyma` repository, add the module repository name to the [`deploy.yml`](https://github.com/kyma-project/kyma/blob/main/.github/workflows/deploy.yml) file under the **jobs.copy-docs.strategy.matrix.repository** element. For example: |
|
|
||
| 1. Create a pull request adding your content to a Markdown file located in the `/docs` folder. | ||
| 2. Add a new `_sidebar.md` file including a link to your document, or update an existing `_sidebar.md` to include it. | ||
| 2. Add a new `_sidebar.ts` file including a link to your document, or update an existing `_sidebar.ts` to include it. |
There was a problem hiding this comment.
| 2. Add a new `_sidebar.ts` file including a link to your document, or update an existing `_sidebar.ts` to include it. | |
| 2. Go to [`/kyma/.vitepress/config.mjs`](https://github.com/kyma-project/kyma/blob/main/.vitepress/config.mjs#L138) and provide your document details in the **sidebar** element, under **themeConfig**. Use the following pattern: |
We could also add the example:
{
text: 'Troubleshooting',
link: '/04-operation-guides/troubleshooting/README',
},
| > **CAUTION:** When you update navigation paths in documentation, make sure you check all `_sidebar.md` files that may be affected. | ||
| > **CAUTION:** When you update navigation paths in documentation, make sure you check all `_sidebar.ts` files that may be affected. | ||
|
|
||
| 4. Run the [Deploy VitePress site to GitHub Pages](https://github.com/kyma-project/kyma/actions/workflows/deploy.yml) or wait for the CronJob to start it (every day at midnight). |
There was a problem hiding this comment.
| 4. Run the [Deploy VitePress site to GitHub Pages](https://github.com/kyma-project/kyma/actions/workflows/deploy.yml) or wait for the CronJob to start it (every day at midnight). | |
| 5. Run the [Deploy VitePress site to GitHub Pages](https://github.com/kyma-project/kyma/actions/workflows/deploy.yml) or wait for the CronJob to start it (every day at midnight). |
| > **CAUTION:** When you update navigation paths in documentation, make sure you check all `_sidebar.ts` files that may be affected. | ||
|
|
||
| 4. Run the [Deploy VitePress site to GitHub Pages](https://github.com/kyma-project/kyma/actions/workflows/deploy.yml) or wait for the CronJob to start it (every day at midnight). | ||
| 5. Make sure that the `public` folder is deleted after the build. If not, delete it manually to clean up the environment. |
There was a problem hiding this comment.
| 5. Make sure that the `public` folder is deleted after the build. If not, delete it manually to clean up the environment. | |
| 6. Make sure that the `public` folder in the root of the `/kyma` repository is deleted after the build. If not, delete it manually to clean up the environment. |
|
|
||
| ## Execute Prettier | ||
|
|
||
| Prettier helps maintain proper formatting. The project is already configured to use this formatter automatically, provided you are using Visual Studio Code (it leverages the VSCode Prettier plugin). Unfortunately, it runs prettier at commit time on Git; if you are not using Git integrated in VSCode for commits, you must execute it manually by running the following command: |
There was a problem hiding this comment.
I'm not sure if I understand. So if I'm using Visual Studio Code, do I need to install the VSC Prettier plugin?
There was a problem hiding this comment.
I'll rephrase that.
| Before you publish new documentation on the Kyma website, you can preview your changes to see if the formatting of the text is correct, images fit well, and links work as expected. To do that, see the following steps: | ||
|
|
||
| That is possible thanks to the [**docsify preview feature**](https://docsify.js.org/#/quickstart?id=preview-your-site) supported by [docsify](https://docsify.js.org/#/). | ||
| 1. Go to the [`kyma/hack`](https://github.com/kyma-project/kyma/tree/main/hack), and execute the `copy_external_content.sh` script: |
There was a problem hiding this comment.
Do the files in the hack folder also need to be updated once we add a new module repo? For example, https://github.com/kyma-project/kyma/blob/main/hack/copy_external_content.sh?
Co-authored-by: Małgorzata Świeca <malgorzata.swieca@sap.com>
| ```mjs | ||
| { | ||
| text: 'My Module', | ||
| link: '/external-content/my-module/docs/user/README.md', | ||
| collapsed: true, | ||
| items: makeSidebarAbsolutePath( | ||
| myModuleSidebar, | ||
| 'my-module', | ||
| ), | ||
| }, | ||
| ``` |
There was a problem hiding this comment.
Please indent the code example.
| ```yaml | ||
| jobs: | ||
| copy-docs: | ||
| strategy: | ||
| matrix: | ||
| repository: | ||
| - btp-manager | ||
| - istio | ||
| - serverless | ||
| - {YOUR_MODULE_REPO} | ||
| ``` |
There was a problem hiding this comment.
Please make sure it is indented under the step.
| ```bash | ||
| npm install | ||
| npm run docs:dev | ||
| ``` |
There was a problem hiding this comment.
Could you indent it under the bullet point?
| ```bash | ||
| npm run docs:build | ||
| npm run docs:preview | ||
| ``` |
There was a problem hiding this comment.
Could you indent it under the bullet point?
Co-authored-by: Małgorzata Świeca <malgorzata.swieca@sap.com>
Description
Changes proposed in this pull request:
Related issue(s)