From 45f7ffc4e4df49ed30db91b453bcb7f2df64be43 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Wed, 8 Mar 2023 22:09:23 +0100 Subject: [PATCH 1/7] Make automatic detection of draw.io diagrams an opt-in (#1185) --- CHANGELOG.md | 7 ++++-- hugo.yaml | 2 -- .../diagrams-and-formulae/index.md | 22 +++++++++---------- userguide/hugo.yaml | 3 +++ 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3f01ce89e..3f19a71662 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,8 +18,10 @@ For a list of issues targeted for the next release, see the [23Q1][] milestone. **Breaking changes:** -- **Upgraded Bootstrap ([#470])** to v5.2. For a list of Bootstrap's breaking - changes, see the [Bootstrap migration guide][bsv5mig]. Other Docsy-specific +- **Detection of draw.io diagrams** is now **disabled** by default [#1185][] + +- **[Upgraded Bootstrap ([#470][])** to v5.2. For a list of Bootstrap breaking + changes, see the [Bootstrap migration guide][bsv5mig]. Other, Docsy-specific changes are listed below: - Clean up of unused, or rarely used, variables, functions, and mixins: - Dropped `$primary-light` @@ -52,6 +54,7 @@ For a list of issues targeted for the next release, see the [23Q1][] milestone. - Draw.io diagram edit button: replaced custom colors by BS's outline primary. [#470]: https://github.com/google/docsy/issues/470 +[#1185]: https://github.com/google/docsy/issues/1185 [#906]: https://github.com/google/docsy/issues/906 [#939]: https://github.com/google/docsy/issues/939 [#1369]: https://github.com/google/docsy/issues/1369 diff --git a/hugo.yaml b/hugo.yaml index 8a4d145dc3..b6efdf112f 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -6,8 +6,6 @@ params: time_format_blog: Monday, January 02, 2006 time_format_default: January 2, 2006 rss_sections: [blog] - drawio: - enable: true outputFormats: PRINT: diff --git a/userguide/content/en/docs/adding-content/diagrams-and-formulae/index.md b/userguide/content/en/docs/adding-content/diagrams-and-formulae/index.md index 50451c5d96..eb8147a911 100644 --- a/userguide/content/en/docs/adding-content/diagrams-and-formulae/index.md +++ b/userguide/content/en/docs/adding-content/diagrams-and-formulae/index.md @@ -1,6 +1,6 @@ --- -title: "Diagrams and Formulae" -linkTitle: "Diagrams and Formulae" +title: Diagrams and Formulae +linkTitle: Diagrams and Formulae weight: 11 description: Add generated diagrams and scientific formulae to your site. math: true @@ -634,39 +634,39 @@ params: ## Diagrams with Diagrams.net -[Diagrams.net](https://diagrams.net/) (aka draw.io) provides a free and open source diagram editor that can generate a wider range of diagrams than Mermaid or PlantUML using a web or desktop editor. +[Diagrams.net](https://diagrams.net/) (aka `draw.io`) provides a free and open source diagram editor that can generate a wider range of diagrams than Mermaid or PlantUML using a web or desktop editor. -SVG and PNG files exported with the tool contain the source code of the original diagram by default, which allows the diagrams.net site to import those images again for edit in the future. Docsy can detect this and automatically add an "edit" button over any image that can be edited using the online site. +SVG and PNG files exported with the tool contain the source code of the original diagram by default, which allows the diagrams.net site to import those images again for edit in the future. With `draw.io` enabled, Docsy will detect this and automatically add an `Edit` button over any image that can be edited using the online site. -Hover over the image below and click edit to instantly start working with it. Clicking the "Save" button will cause the edited diagram to be exported using the same filename and filetype, and downloaded to your browser. +Hover over the image below and click edit to instantly start working with it. Clicking the `Save` button will cause the edited diagram to be exported using the same filename and filetype, and downloaded to your browser. {{%alert title="Note" color="primary" %}} -If you're creating a new diagram, be sure to File -> Export in either svg or png format (svg is usually the best choice) and ensure the "Include a copy of my diagram" is selected so it can be edited again later. +If you're creating a new diagram, be sure to `File -> Export` in either `svg` or `png` format (`svg` is usually the best choice) and ensure the `Include a copy of my diagram` is selected so it can be edited again later. {{%/alert%}} As the diagram data is transported via the browser, the diagrams.net server does not need to access the content on your Docsy server directly at all. -{{< figure src="docsy-diagrams.svg" caption="Mouse over the above image and click the edit button!">}} +{{< figure src="docsy-diagrams.svg" caption="Mouse over the above image and click the `Edit` button!">}} -To disable detection of diagrams, update `hugo.toml`/`hugo.yaml`/`hugo.json`: +To enable detection of diagrams, update `hugo.toml`/`hugo.yaml`/`hugo.json`: {{< tabpane persistLang=false >}} {{< tab header="Configuration file:" disabled=true />}} {{< tab header="hugo.toml" lang="toml" >}} [params.drawio] -enable = false +enable = true {{< /tab >}} {{< tab header="hugo.yaml" lang="yaml" >}} params: drawio: - enable: false + enable: true {{< /tab >}} {{< tab header="hugo.json" lang="json" >}} { "params": { "drawio": { - "enable": false + "enable": true } } } diff --git a/userguide/hugo.yaml b/userguide/hugo.yaml index 4c05b16069..8057b275cf 100644 --- a/userguide/hugo.yaml +++ b/userguide/hugo.yaml @@ -123,6 +123,9 @@ params: theme: default flowchart: diagramPadding: 20 + drawio: + enable: true + taxonomies: tag: tags From 516a592b1060118e9056b4df694932235cda1690 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Wed, 31 May 2023 10:33:46 -0400 Subject: [PATCH 2/7] Update userguide/content/en/docs/adding-content/diagrams-and-formulae/index.md --- .../en/docs/adding-content/diagrams-and-formulae/index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/userguide/content/en/docs/adding-content/diagrams-and-formulae/index.md b/userguide/content/en/docs/adding-content/diagrams-and-formulae/index.md index eb8147a911..a1b8cba84f 100644 --- a/userguide/content/en/docs/adding-content/diagrams-and-formulae/index.md +++ b/userguide/content/en/docs/adding-content/diagrams-and-formulae/index.md @@ -1,6 +1,5 @@ --- title: Diagrams and Formulae -linkTitle: Diagrams and Formulae weight: 11 description: Add generated diagrams and scientific formulae to your site. math: true From 06b76b7151782b78735eb2a7b9d21dc3788197a6 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Wed, 31 May 2023 10:35:11 -0400 Subject: [PATCH 3/7] Update hugo.yaml --- userguide/hugo.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/userguide/hugo.yaml b/userguide/hugo.yaml index 8057b275cf..db2d2d8fe5 100644 --- a/userguide/hugo.yaml +++ b/userguide/hugo.yaml @@ -126,7 +126,6 @@ params: drawio: enable: true - taxonomies: tag: tags category: categories From 3adf39563f21a3358ce96e3ad04fc45045887768 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Wed, 31 May 2023 10:35:53 -0400 Subject: [PATCH 4/7] Update CHANGELOG.md --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f19a71662..9fae5b97e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,8 +18,6 @@ For a list of issues targeted for the next release, see the [23Q1][] milestone. **Breaking changes:** -- **Detection of draw.io diagrams** is now **disabled** by default [#1185][] - - **[Upgraded Bootstrap ([#470][])** to v5.2. For a list of Bootstrap breaking changes, see the [Bootstrap migration guide][bsv5mig]. Other, Docsy-specific changes are listed below: @@ -45,6 +43,8 @@ For a list of issues targeted for the next release, see the [23Q1][] milestone. [chroma-docsy]: https://www.docsy.dev/docs/adding-content/lookandfeel/#code-highlighting-with-chroma +- **Detection of draw.io diagrams** is now **disabled** by default [#1185][] + **Other changes**: - `$list-inline-padding` is increased in support of footer icons ([#1523]). If @@ -54,9 +54,9 @@ For a list of issues targeted for the next release, see the [23Q1][] milestone. - Draw.io diagram edit button: replaced custom colors by BS's outline primary. [#470]: https://github.com/google/docsy/issues/470 -[#1185]: https://github.com/google/docsy/issues/1185 [#906]: https://github.com/google/docsy/issues/906 [#939]: https://github.com/google/docsy/issues/939 +[#1185]: https://github.com/google/docsy/issues/1185 [#1369]: https://github.com/google/docsy/issues/1369 [#1376]: https://github.com/google/docsy/issues/1369 [#1442]: https://github.com/google/docsy/issues/1442 From 2e45cfc3d03e010fed8b8deea9243d4cf10768c1 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Wed, 31 May 2023 10:36:37 -0400 Subject: [PATCH 5/7] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fae5b97e8..393ae985af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ For a list of issues targeted for the next release, see the [23Q1][] milestone. **Breaking changes:** -- **[Upgraded Bootstrap ([#470][])** to v5.2. For a list of Bootstrap breaking +- **Upgraded Bootstrap ([#470])** to v5.2. For a list of Bootstrap breaking changes, see the [Bootstrap migration guide][bsv5mig]. Other, Docsy-specific changes are listed below: - Clean up of unused, or rarely used, variables, functions, and mixins: From 2fbb64f1970c68ce6d3075f19fb7ad88ea71f439 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Wed, 31 May 2023 10:37:29 -0400 Subject: [PATCH 6/7] Update CHANGELOG.md --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 393ae985af..3e9d7d7422 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,8 +18,8 @@ For a list of issues targeted for the next release, see the [23Q1][] milestone. **Breaking changes:** -- **Upgraded Bootstrap ([#470])** to v5.2. For a list of Bootstrap breaking - changes, see the [Bootstrap migration guide][bsv5mig]. Other, Docsy-specific +- **Upgraded Bootstrap ([#470])** to v5.2. For a list of Bootstrap's breaking + changes, see the [Bootstrap migration page][bsv5mig]. Other, Docsy-specific changes are listed below: - Clean up of unused, or rarely used, variables, functions, and mixins: - Dropped `$primary-light` From 6f98a66b68bf19d456ab424eb7cae3cf6e31948c Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Wed, 31 May 2023 10:38:19 -0400 Subject: [PATCH 7/7] Update CHANGELOG.md --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e9d7d7422..53650cf59d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,8 +19,7 @@ For a list of issues targeted for the next release, see the [23Q1][] milestone. **Breaking changes:** - **Upgraded Bootstrap ([#470])** to v5.2. For a list of Bootstrap's breaking - changes, see the [Bootstrap migration page][bsv5mig]. Other, Docsy-specific - changes are listed below: + changes, see the [Bootstrap migration page][bsv5mig]. Docsy-specific changes: - Clean up of unused, or rarely used, variables, functions, and mixins: - Dropped `$primary-light` - Dropped `color-diff()`