From dd76e35993fe0f9173c2e9673051bb583493a5f7 Mon Sep 17 00:00:00 2001 From: Andrew Goodricke Date: Fri, 2 Feb 2024 11:28:18 +0000 Subject: [PATCH 1/5] NX-Assets: testing converted branches --- config.yml | 38 +- docs/writing-documentation.md | 48 +- lib/builder.js | 3 - modules/metalsmith/doc_assets.js | 228 --- scripts/copy_branch.sh | 1 + shortlinks.json | 2487 ++++++++++++++++++++++++++++++ verify/site/index.js | 2 +- 7 files changed, 2527 insertions(+), 280 deletions(-) delete mode 100644 modules/metalsmith/doc_assets.js diff --git a/config.yml b/config.yml index 8d46e096..ef54ff7d 100644 --- a/config.yml +++ b/config.yml @@ -67,28 +67,28 @@ default: platform: url: git@github.com:nuxeo/doc.nuxeo.com-content.git branches: - static: + 'static-nx-assets': no_versioning: true design: no_versioning: true - '2023': + '2023-nx-assets': label: 'LTS 2023' order: 10 - '2021': + '2021-nx-assets': label: 'LTS 2021' order: 20 url_path: '2021' - '1010': + '1010-nx-assets': label: 'LTS 2019' noindex: true order: 30 url_path: '1010' - '910': + '910-nx-assets': label: 'LTS 2017' noindex: true order: 40 url_path: '910' - '810': + '810-nx-assets': label: 'LTS 2016' noindex: true order: 50 @@ -101,68 +101,68 @@ default: label: 'none' noindex: true url_path: '60' - master: + 'master-nx-assets': label: 'none' noindex: true url_path: 'master' java: url: git@github.com:nuxeo/doc.nuxeo.com-client-java.git branches: - '3.13': + '3.13-nx-assets': label: '3.13' url_path: '3.13' order: 0 - '3.12': + '3.12-nx-assets': label: '3.12' url_path: '3.12' noindex: true order: 10 - '3.11': + '3.11-nx-assets': label: '3.11' url_path: '3.11' noindex: true order: 20 - '3.10': + '3.10-nx-assets': label: '3.10' url_path: '3.10' noindex: true order: 30 - '3.9': + '3.9-nx-assets': label: '3.9' url_path: '3.9' noindex: true order: 40 - '3.8': + '3.8-nx-assets': label: '3.8' url_path: '3.8' noindex: true order: 50 - '3.7': + '3.7-nx-assets': label: '3.7' url_path: '3.7' noindex: true order: 60 - '3.6': + '3.6-nx-assets': label: '3.6' url_path: '3.6' noindex: true order: 70 - '3.5': + '3.5-nx-assets': label: '3.5' url_path: '3.5' noindex: true order: 80 - '3.4': + '3.4-nx-assets': label: '3.4' url_path: '3.4' noindex: true order: 90 - '3.3': + '3.3-nx-assets': label: '3.3' url_path: '3.3' noindex: true order: 100 - '3.2': + '3.2-nx-assets': label: '3.2' url_path: '3.2' noindex: true diff --git a/docs/writing-documentation.md b/docs/writing-documentation.md index 24a319e7..118744e7 100644 --- a/docs/writing-documentation.md +++ b/docs/writing-documentation.md @@ -43,22 +43,12 @@ cd doc.nuxeo.com-content #### Run Locally -You will need your Nuxeo Intranet credentials for the screenshots to display correctly. - ```bash -NX_ASSETS_USER='{username}' NX_ASSETS_PWD='{password}' npm run dev +npm run dev ``` -Make sure to replace `{username}` and `{password}` with your credentials. - Once started, http://localhost:3000 opens automatically. Browse to the URL you want to see your changes. -If the screenshots aren't a concern, you can run locally without the `NX_ASSETS_...` credentials: - -```bash -npm run dev -``` - If you want to skip the initial build and use the existing one as the base, you can do: ```bash @@ -106,15 +96,15 @@ See [main project trouble shooting](https://github.com/nuxeo/doc.nuxeo.com/blob/ # Create a Page -**FROM GITHUB UI** +**FROM GITHUB UI** -You can create a new page from GitHub UI: +You can create a new page from GitHub UI: -1. Go to the folder on GitHub where you want your page to be created (for example if you want to add a new page under [Web UI](https://doc.nuxeo.com/nxdoc/web-ui), the new page will have to be created [here](https://github.com/nuxeo/doc.nuxeo.com-content/tree/master/src/nxdoc/web-ui)). +1. Go to the folder on GitHub where you want your page to be created (for example if you want to add a new page under [Web UI](https://doc.nuxeo.com/nxdoc/web-ui), the new page will have to be created [here](https://github.com/nuxeo/doc.nuxeo.com-content/tree/master/src/nxdoc/web-ui)). -2. Click on **Create new file** at the top of the table +2. Click on **Create new file** at the top of the table -3. A blank page is displayed, copy paste the content in the [new-page-template.md](new-page-template.md). +3. A blank page is displayed, copy paste the content in the [new-page-template.md](new-page-template.md). 4. Make sure to give your page a title and to name your file `.md` @@ -328,7 +318,7 @@ These require us to use the reference style of links: ### To Images -Most of the screenshots are stored in the Intranet under [this folder](https://intranet.nuxeo.com/nuxeo/ui/#!/doc/4af58911-f0b1-4a79-a517-4fdde449478e). +Most of the screenshots are stored in the Intranet under [this folder](https://intranet.nuxeo.com/nuxeo/ui/#!/doc/4af58911-f0b1-4a79-a517-4fdde449478e). **Add a New Screenshot** @@ -342,18 +332,18 @@ Most of the screenshots are stored in the Intranet under [this folder](https://i 2. Go to the existing folder named after the title of the documentation page concerned. 3. Click on **Create** > **DOCASSET**. 4. Fill in the metadata related to your screenshot and click on Create.
- Your screenshot document is created. + Your screenshot document is created. 5. You will see an Asset markdown snippet section under the preview of your screenshot with a generated unique ID. -6. Make sure to select **Use border** and **Override size** to adjust the size of your screenshot.
- Generally, an icon is 20px, a pop-up 350px and a screenshot is 650px (that's the max size for a screenshot). -7. Click on the copy icon next to the snippet section and paste it on the documentation page. +6. Make sure to select **Use border** and **Override size** to adjust the size of your screenshot.
+ Generally, an icon is 20px, a pop-up 350px and a screenshot is 650px (that's the max size for a screenshot). +7. Click on the copy icon next to the snippet section and paste it on the documentation page. **Update an Existing Screenshot** 1. Go to the existing folder named after the title of the documentation page concerned 2. Find the screenshot that you want to replace -3. Click on the **Replace** icon under the preview of the screenshot. -4. The screenshot ID won't change so once the doc build will be redeployed it will fetch the updated screenshot. +3. Click on the **Replace** icon under the preview of the screenshot. +4. The screenshot ID won't change so once the doc build will be redeployed it will fetch the updated screenshot. +-->