From 1cc1ca9ae1663e478ef41bda90ee187c07d69c87 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Thu, 18 Aug 2022 03:54:43 -0400 Subject: [PATCH 1/9] Search font fix (#1179) --- assets/scss/_search.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/scss/_search.scss b/assets/scss/_search.scss index c5768bb84f..4c8fe88ee1 100644 --- a/assets/scss/_search.scss +++ b/assets/scss/_search.scss @@ -14,7 +14,7 @@ border-radius: 1rem; } - font-family: $font-awesome-font-name, $font-family-base; + font-family: $font-family-base, $font-awesome-font-name; } .popover.offline-search-result { From bed54d3cefc1a53bfbb3e3b42e5a2f2f01b27e44 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Thu, 18 Aug 2022 05:02:38 -0400 Subject: [PATCH 2/9] NPM: pin dep versions and add update script (#1181) --- package.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e3a8f0be8e..a5d87e6aae 100644 --- a/package.json +++ b/package.json @@ -13,14 +13,16 @@ "docs-install": "npm run _cd:docs -- npm install", "get:submodule": "set -x && git submodule update --init ${DEPTH:- --depth 1}", "serve": "npm run cd:docs serve", - "update:pkg:hugo": "npm install --save-dev --save-exact hugo-extended@latest" + "update:pkg:hugo": "npm install --save-exact -D hugo-extended@latest", + "update:pkg:dep": "npm install --save-exact @fortawesome/fontawesome-free@latest bootstrap@4" }, + "cspell": "cSpell:ignore docsy userguide fortawesome fontawesome ", "prettier": { "proseWrap": "always" }, "dependencies": { - "@fortawesome/fontawesome-free": "^6.1.1", - "bootstrap": "^4.6.1" + "@fortawesome/fontawesome-free": "6.1.1", + "bootstrap": "4.6.1" }, "devDependencies": { "hugo-extended": "0.101.0" From 6d4233e91a1cde84d03b69b0d0a926bf8fdf520a Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Thu, 18 Aug 2022 05:35:13 -0400 Subject: [PATCH 3/9] scripts partial: whitespace and other cleanup (#1183) --- layouts/partials/scripts.html | 74 +++++++++++++++++------------------ 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 7894f86398..4c5c05299b 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -4,12 +4,11 @@ +{{ if .Site.Params.mermaid.enable -}} + +{{ end -}} -{{ if .Site.Params.mermaid.enable }} - -{{ end }} - -{{ if .Site.Params.markmap.enable }} +{{ if .Site.Params.markmap.enable -}} -{{ end }} +{{ end -}} +{{ if .Site.Params.plantuml.enable -}} + +{{ end -}} - -{{ if .Site.Params.plantuml.enable }} - -{{ end }} - +{{ if .Site.Params.katex.enable -}} -{{ if .Site.Params.katex.enable }} @@ -46,37 +43,38 @@ integrity="sha512-5ufNcHqOYgilGEHPfuRIQ5B/vDS1M8+UC+DESZ5CwVgGTg+b2Ol/15rYL/GiCWJ/Sx8oVo0FPFok1dPk8U9INQ==" crossorigin="anonymous"> -{{ if .Site.Params.katex.mhchem.enable }} +{{ if .Site.Params.katex.mhchem.enable -}} -{{ end }} +{{ end -}} -{{ end }} +{{ end -}} + +{{ $jsBase := resources.Get "js/base.js" -}} +{{ $jsAnchor := resources.Get "js/anchor.js" -}} +{{ $jsSearch := resources.Get "js/search.js" | resources.ExecuteAsTemplate "js/search.js" .Site.Home -}} +{{ $jsMermaid := resources.Get "js/mermaid.js" | resources.ExecuteAsTemplate "js/mermaid.js" . -}} +{{ $jsMarkmap := resources.Get "js/markmap.js" | resources.ExecuteAsTemplate "js/markmap.js" . -}} +{{ $jsPlantuml := resources.Get "js/plantuml.js" | resources.ExecuteAsTemplate "js/plantuml.js" . -}} +{{ $jsDrawio := resources.Get "js/drawio.js" | resources.ExecuteAsTemplate "js/plantuml.js" . -}} +{{ if .Site.Params.offlineSearch -}} +{{ $jsSearch = resources.Get "js/offline-search.js" -}} +{{ end -}} +{{ $js := (slice $jsBase $jsAnchor $jsSearch $jsMermaid $jsPlantuml $jsMarkmap $jsDrawio) | resources.Concat "js/main.js" -}} +{{ if hugo.IsProduction -}} + {{ $js := $js | minify | fingerprint -}} + +{{ else -}} + +{{ end -}} + +{{ if .Site.Params.prism_syntax_highlighting -}} + +{{ end -}} -{{ $jsBase := resources.Get "js/base.js" }} -{{ $jsAnchor := resources.Get "js/anchor.js" }} -{{ $jsSearch := resources.Get "js/search.js" | resources.ExecuteAsTemplate "js/search.js" .Site.Home }} -{{ $jsMermaid := resources.Get "js/mermaid.js" | resources.ExecuteAsTemplate "js/mermaid.js" . }} -{{ $jsMarkmap := resources.Get "js/markmap.js" | resources.ExecuteAsTemplate "js/markmap.js" . }} -{{ $jsPlantuml := resources.Get "js/plantuml.js" | resources.ExecuteAsTemplate "js/plantuml.js" . }} -{{ $jsDrawio := resources.Get "js/drawio.js" | resources.ExecuteAsTemplate "js/plantuml.js" .}} -{{ if .Site.Params.offlineSearch }} -{{ $jsSearch = resources.Get "js/offline-search.js" }} -{{ end }} -{{ $js := (slice $jsBase $jsAnchor $jsSearch $jsMermaid $jsPlantuml $jsMarkmap $jsDrawio) | resources.Concat "js/main.js" }} -{{ if not hugo.IsProduction }} - -{{ else }} -{{ $js := $js | minify | fingerprint }} - -{{ end }} -{{ if .Site.Params.prism_syntax_highlighting }} - - -{{ end }} -{{ partial "hooks/body-end.html" . }} +{{ partial "hooks/body-end.html" . -}} From 215f68033bbc7bddf8dbec2bbabf8749d1998a17 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Thu, 18 Aug 2022 06:28:41 -0400 Subject: [PATCH 4/9] Config as YAML for Docsy and UG (#1184) --- config.toml | 64 ------------ config.yaml | 46 +++++++++ userguide/config.toml | 223 ------------------------------------------ userguide/config.yaml | 135 +++++++++++++++++++++++++ 4 files changed, 181 insertions(+), 287 deletions(-) delete mode 100644 config.toml create mode 100644 config.yaml delete mode 100644 userguide/config.toml create mode 100644 userguide/config.yaml diff --git a/config.toml b/config.toml deleted file mode 100644 index 874e57fcf1..0000000000 --- a/config.toml +++ /dev/null @@ -1,64 +0,0 @@ -# This the theme configuration for Docsy. -# Allowed configuration in a theme is (currently): -# params (global and per language) -# menu (global and per language) -# outputformats and mediatypes - -[params] -time_format_blog = "Monday, January 02, 2006" -time_format_default = "January 2, 2006" -# Sections to publish in the main RSS feed. -rss_sections = ["blog"] - -[params.drawio] -enable = true -#drawio_server = "https://example.com/" - -# For a full list of parameters used in Docsy sites, see: -# https://github.com/google/docsy-example/blob/master/config.toml - - -[outputFormats] -[outputFormats.PRINT] -baseName = "index" -isHTML = true -mediaType = "text/html" -path = "_print" -permalinkable = false - -[module] -[module.hugoVersion] -extended = true -min = "0.73.0" - [[module.mounts]] - source = 'assets' - target = 'assets' - [[module.mounts]] - source = 'node_modules/bootstrap' - target = 'assets/vendor/bootstrap' - [[module.mounts]] - source = 'node_modules/@fortawesome/fontawesome-free' - target = 'assets/vendor/Font-Awesome' - [[module.mounts]] - source = "i18n" - target = "i18n" - [[module.mounts]] - source = 'layouts' - target = 'layouts' - [[module.mounts]] - source = 'static' - target = 'static' - [[module.mounts]] - source = 'node_modules/@fortawesome/fontawesome-free/webfonts' - target = 'static/webfonts' - # Mounts for projects using Docsy as an NPM package. The source path prefix - # "../.." moves out of themes/docsy so that Docsy can find its dependencies. - [[module.mounts]] - source = '../../node_modules/bootstrap' - target = 'assets/vendor/bootstrap' - [[module.mounts]] - source = '../../node_modules/@fortawesome/fontawesome-free' - target = 'assets/vendor/Font-Awesome' - [[module.mounts]] - source = '../../node_modules/@fortawesome/fontawesome-free/webfonts' - target = 'static/webfonts' diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000000..8a4d145dc3 --- /dev/null +++ b/config.yaml @@ -0,0 +1,46 @@ +# Docsy config +# +# cSpell:ignore docsy fortawesome fontawesome webfonts + +params: + time_format_blog: Monday, January 02, 2006 + time_format_default: January 2, 2006 + rss_sections: [blog] + drawio: + enable: true + +outputFormats: + PRINT: + baseName: index + isHTML: true + mediaType: text/html + path: _print + permalinkable: false + +module: + hugoVersion: + extended: true + min: 0.73.0 + mounts: + - source: assets + target: assets + - source: node_modules/bootstrap + target: assets/vendor/bootstrap + - source: node_modules/@fortawesome/fontawesome-free + target: assets/vendor/Font-Awesome + - source: i18n + target: i18n + - source: layouts + target: layouts + - source: static + target: static + - source: node_modules/@fortawesome/fontawesome-free/webfonts + target: static/webfonts + # Mounts for projects using Docsy as an NPM package. The source path prefix + # "../.." moves out of themes/docsy so that Docsy can find its dependencies. + - source: ../../node_modules/bootstrap + target: assets/vendor/bootstrap + - source: ../../node_modules/@fortawesome/fontawesome-free + target: assets/vendor/Font-Awesome + - source: ../../node_modules/@fortawesome/fontawesome-free/webfonts + target: static/webfonts diff --git a/userguide/config.toml b/userguide/config.toml deleted file mode 100644 index ed8d083581..0000000000 --- a/userguide/config.toml +++ /dev/null @@ -1,223 +0,0 @@ -baseURL = "/" -title = "Docsy Example" - -enableRobotsTXT = true - -# Hugo allows theme composition (and inheritance). The precedence is from left to right. -theme = ["docsy"] - -# Will give values to .Lastmod etc. -enableGitInfo = true - -# disableKinds = ["taxonomy", "taxonomyTerm"] - -# Highlighting config -pygmentsCodeFences = true -pygmentsUseClasses = false -# Use the new Chroma Go highlighter in Hugo. -pygmentsUseClassic = false -#pygmentsOptions = "linenos=table" -# See https://help.farbox.com/pygments.html -pygmentsStyle = "tango" - -# First one is picked as the Twitter card image if not set on page. -#images = ["images/project-illustration.png"] - -[outputs] -home = [ "HTML" ] -page = [ "HTML" ] -section = [ "HTML", "RSS", "print"] - -# Image processing configuration. -[imaging] -resampleFilter = "CatmullRom" -quality = 75 -anchor = "smart" - -# Additional menu items - -[[menu.main]] - name = "Example Site" - weight = 40 - url = "https://example.docsy.dev" - post = '' - -[services] -[services.googleAnalytics] -id = "UA-00000000-0" # FIXME: https://github.com/google/docsy/issues/1097 - -# Language configuration - -[languages] -[languages.en] -title = "Docsy" -description = "Docsy does docs" -languageName ="English" -# Weight used for sorting. -weight = 1 - -[markup] - [markup.goldmark] - [markup.goldmark.renderer] - unsafe = true - [markup.highlight] - # See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html - style = "tango" - # Uncomment if you want your chosen highlight style used for code blocks without a specified language - # guessSyntax = "true" - -# Everything below this are Site Params - -[params] -copyright = "The Docsy Authors" -privacy_policy = "https://policies.google.com/privacy" - -# Menu title if your navbar has a versions selector to access old versions of your site. -# This menu appears only if you have at least one [params.versions] set. -version_menu = "Releases" - -# Flag used in the "version-banner" partial to decide whether to display a -# banner on every page indicating that this is an archived version of the docs. -# Set this flag to "true" if you want to display the banner. -archived_version = false - -# The version number for the version of the docs represented in this doc set. -# Used in the "version-banner" partial to display a version number for the -# current doc set. -version = "0.4.0" - -# A link to latest version of the docs. Used in the "version-banner" partial to -# point people to the main doc site. -url_latest_version = "https://example.com" - -# Repository configuration (URLs for in-page links to opening issues and suggesting changes) -github_repo = "https://github.com/google/docsy" -# An optional link to a related project repo. For example, the sibling repository where your product code lives. -github_project_repo = "https://github.com/google/docsy" - -# Specify a value here if your content directory is not in your repo's root directory -github_subdir = "userguide" - -time_format_blog = "Monday, January 02, 2006" -time_format_default = "January 2, 2006" -# Sections to publish in the main RSS feed. -rss_sections = ["blog"] - -# Google Custom Search Engine ID. Remove or comment out to disable search. -gcs_engine_id = "011217106833237091527:la2vtv2emlw" - -# Enable Algolia DocSearch -algolia_docsearch = false - -#Enable offline search with Lunr.js -offlineSearch = false -offlineSearchSummaryLength = 70 -offlineSearchMaxResults = 10 - -# Enable syntax highlighting and copy buttons on code blocks with Prism -prism_syntax_highlighting = false - -# User interface configuration -[params.ui] -# Enable to show the side bar menu in its compact state. -sidebar_menu_compact = true -sidebar_menu_foldable = false -sidebar_cache_limit = 10 -# Set to true to disable breadcrumb navigation. -breadcrumb_disable = false -# Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled) -sidebar_search_disable = false -# Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top nav bar -navbar_logo = true - -# For details concerning the page feedback widget, see -# https://www.docsy.dev/docs/adding-content/feedback/#user-feedback -[params.ui.feedback] -enable = true -# The responses that the user sees after clicking "yes" (the page was helpful) or "no" (the page was not helpful). -# Update with your own repository and response text. -yes = 'Glad to hear it! Please tell us how we can improve.' -no = 'Sorry to hear that. Please tell us how we can improve.' - -# Adds a reading time to the top of each doc. -# If you want this feature, but occasionally need to remove the Reading time from a single page, -# add "hide_readingtime: true" to the page's front matter -[params.ui.readingtime] -enable = false - -[params.links] -# End user relevant links. These will show up on left side of footer and in the community page if you have one. -[[params.links.user]] - name ="GitHub Discussions" - url = "https://github.com/google/docsy/discussions" - icon = "fa-brands fa-github" - desc = "Discussion and help from your fellow users" -[[params.links.user]] - name = "User mailing list" - url = "https://groups.google.com/forum/#!forum/docsy-users" - icon = "fa-solid fa-envelope" - desc = "Sign up for Docsy announcements" -[[params.links.user]] - name ="Twitter" - url = "https://twitter.com/docsydocs" - icon = "fa-brands fa-twitter" - desc = "Follow us on Twitter to get the latest news!" -[[params.links.user]] - name = "Stack Overflow" - url = "https://stackoverflow.com/questions/tagged/docsy" - icon = "fa-brands fa-stack-overflow" - desc = "Practical questions and curated answers" -# Developer relevant links. These will show up on right side of footer and in the community page if you have one. -[[params.links.developer]] - name = "GitHub" - url = "https://github.com/google/docsy" - icon = "fa-brands fa-github" - desc = "Development takes place here!" -# [[params.links.developer]] - # name = "Slack" - # url = "https://example.org/slack" - # icon = "fa-brands fa-slack" - # desc = "Chat with other project developers" -# [[params.links.developer]] - # name = "Developer mailing list" - # url = "https://example.org/mail" - # icon = "fa-solid fa-envelope" - # desc = "Discuss development issues around the project" - -[params.mermaid] -enable = true -theme = "default" - -[params.plantuml] -enable = true -theme = "default" -svg_image_url = "https://www.plantuml.com/plantuml/svg/" -svg = false - -[params.katex] -enable = true -html_dom_element = "document.body" - -# enable display of chemical equations and physical units via mhchem extension -[params.katex.mhchem] -enable = true - -[params.print] -disable_toc = false - -[params.markmap] -enable = true - -# [params.taxonomy] -# taxonomyCloud = ["tags", "categories"] # set taxonomyCloud = [] to hide taxonomy clouds -# taxonomyCloudTitle = ["Tag Cloud", "Cloud of Categories"] # if used, must have same length as taxonomyCloud -# taxonomyPageHeader = ["tags", "categories"] # set taxonomyPageHeader = [] to hide taxonomies on the page headers - -[taxonomies] -tag = "tags" -category = "categories" - -[module] -[[module.mounts]] - source = 'content/en' - target = 'content' diff --git a/userguide/config.yaml b/userguide/config.yaml new file mode 100644 index 0000000000..db4d85f7a5 --- /dev/null +++ b/userguide/config.yaml @@ -0,0 +1,135 @@ +baseURL: / +title: Docsy Example +enableRobotsTXT: true +theme: [docsy] +enableGitInfo: true + +pygmentsCodeFences: true +pygmentsUseClasses: false +pygmentsUseClassic: false +pygmentsStyle: tango + +outputs: + home: [HTML] + page: [HTML] + section: [HTML, RSS, print] + +imaging: + resampleFilter: CatmullRom + quality: 75 + anchor: smart + +menu: + main: + - name: Example Site + weight: 40 + url: https://example.docsy.dev + post: + +services: + googleAnalytics: + id: UA-00000000-0 + +languages: + en: + title: Docsy + description: Docsy does docs + languageName: English + weight: 1 + +markup: + goldmark: + renderer: + unsafe: true + highlight: + style: tango + +params: + copyright: The Docsy Authors + privacy_policy: https://policies.google.com/privacy + version_menu: Releases + archived_version: false + version: 0.4.0 + url_latest_version: https://example.com + github_repo: https://github.com/google/docsy + github_project_repo: https://github.com/google/docsy + github_subdir: userguide + time_format_blog: Monday, January 02, 2006 + time_format_default: January 2, 2006 + rss_sections: [blog] # TODO: drop since this is the default + gcs_engine_id: 011217106833237091527:la2vtv2emlw + algolia_docsearch: false + offlineSearch: false + offlineSearchSummaryLength: 70 + offlineSearchMaxResults: 10 + prism_syntax_highlighting: false + ui: + sidebar_menu_compact: true + sidebar_menu_foldable: false + sidebar_cache_limit: 10 + breadcrumb_disable: false + sidebar_search_disable: false + navbar_logo: true + feedback: + enable: true + 'yes': >- + Glad to hear it! Please tell us how we can + improve. + 'no': >- + Sorry to hear that. Please tell us how we can + improve. + readingtime: + enable: false + links: + user: + - name: GitHub Discussions + url: https://github.com/google/docsy/discussions + icon: fa-brands fa-github + desc: Discussion and help from your fellow users + - name: User mailing list + url: https://groups.google.com/forum/#!forum/docsy-users + icon: fa-solid fa-envelope + desc: Sign up for Docsy announcements + - name: Twitter + url: https://twitter.com/docsydocs + icon: fa-brands fa-twitter + desc: Follow us on Twitter to get the latest news! + - name: Stack Overflow + url: https://stackoverflow.com/questions/tagged/docsy + icon: fa-brands fa-stack-overflow + desc: Practical questions and curated answers + developer: + - name: GitHub + url: https://github.com/google/docsy + icon: fa-brands fa-github + desc: Development takes place here! + + mermaid: + enable: true + theme: default + plantuml: + enable: true + theme: default + svg_image_url: https://www.plantuml.com/plantuml/svg/ + svg: false + katex: + enable: true + html_dom_element: document.body + mhchem: + enable: true + print: + disable_toc: false + markmap: + enable: true + +taxonomies: + tag: tags + category: categories + +module: + mounts: + - source: content/en + target: content From 29fea0f274fdc13e66965ef69bdabe73324553be Mon Sep 17 00:00:00 2001 From: Sami Ahmed Siddiqui Date: Thu, 18 Aug 2022 20:30:30 +0500 Subject: [PATCH 5/9] Add FontAwesome change in changelog (#1186) --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a8a4fe16c..44ba67f93f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,9 @@ For a full list of the changes to this release, see the [release notes][0.5.0]. **Breaking changes**: -- ... +- [Upgrade FontAwesome to v6](https://fontawesome.com/docs/web/setup/upgrade/) from v5. Lots of icons got renamed, but the v5 names will still work. + + Please review the [Backward compatibility](https://fontawesome.com/docs/web/setup/upgrade/whats-changed#backward-compatibility) information for the complete details. [docsy as an npm package]: https://www.docsy.dev/docs/get-started/other-options/#option-3-docsy-as-an-npm-package From 734358534538294c8263d6d1ee035f14bef6ea0f Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Thu, 18 Aug 2022 15:12:03 -0400 Subject: [PATCH 6/9] navbar.html partial whitespace cleanup (#1189) --- layouts/partials/navbar.html | 97 +++++++++++++++++++++++------------- 1 file changed, 62 insertions(+), 35 deletions(-) diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 0fa9a70fb4..054b942e9b 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -1,35 +1,62 @@ -{{ $cover := and (.HasShortcode "blocks/cover") (not .Site.Params.ui.navbar_translucent_over_cover_disable) }} - +{{ $cover := and + (.HasShortcode "blocks/cover") + (not .Site.Params.ui.navbar_translucent_over_cover_disable) +-}} + + \ No newline at end of file From 10fae88de482d836f0c81437afad5674418a888d Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Thu, 18 Aug 2022 20:18:12 -0400 Subject: [PATCH 7/9] Scripts: get bootstrap.js and popper.js at build time (#1187) --- layouts/partials/scripts.html | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 4c5c05299b..f5d081bf61 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -1,9 +1,3 @@ - - {{ if .Site.Params.mermaid.enable -}} {{ end -}} @@ -55,6 +49,8 @@ {{ printf "onload='renderMathInElement(%s, %s);'" (( .Site.Params.katex.html_dom_element | default "document.body" ) | safeJS ) ( printf "%s" ( $.Site.Params.katex.options | jsonify )) | safeHTMLAttr }}> {{ end -}} +{{ $jsPopper := resources.GetRemote "https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" -}} +{{ $jsBs := resources.Get "vendor/bootstrap/dist/js/bootstrap.js" -}} {{ $jsBase := resources.Get "js/base.js" -}} {{ $jsAnchor := resources.Get "js/anchor.js" -}} {{ $jsSearch := resources.Get "js/search.js" | resources.ExecuteAsTemplate "js/search.js" .Site.Home -}} @@ -63,9 +59,9 @@ {{ $jsPlantuml := resources.Get "js/plantuml.js" | resources.ExecuteAsTemplate "js/plantuml.js" . -}} {{ $jsDrawio := resources.Get "js/drawio.js" | resources.ExecuteAsTemplate "js/plantuml.js" . -}} {{ if .Site.Params.offlineSearch -}} -{{ $jsSearch = resources.Get "js/offline-search.js" -}} + {{ $jsSearch = resources.Get "js/offline-search.js" -}} {{ end -}} -{{ $js := (slice $jsBase $jsAnchor $jsSearch $jsMermaid $jsPlantuml $jsMarkmap $jsDrawio) | resources.Concat "js/main.js" -}} +{{ $js := (slice $jsPopper $jsBs $jsBase $jsAnchor $jsSearch $jsMermaid $jsPlantuml $jsMarkmap $jsDrawio) | resources.Concat "js/main.js" -}} {{ if hugo.IsProduction -}} {{ $js := $js | minify | fingerprint -}} From e61480d1006490f0c113cc7118dc0dc5df789308 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Thu, 18 Aug 2022 20:53:19 -0400 Subject: [PATCH 8/9] Upgrade to Bootstrap 4.6.2 and FontAwesome 6.1.2 (#1191) --- CHANGELOG.md | 10 +++++++--- package.json | 6 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44ba67f93f..9c863103d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,12 +14,16 @@ For a full list of the changes to this release, see the [release notes][0.5.0]. **Breaking changes**: -- [Upgrade FontAwesome to v6](https://fontawesome.com/docs/web/setup/upgrade/) from v5. Lots of icons got renamed, but the v5 names will still work. - - Please review the [Backward compatibility](https://fontawesome.com/docs/web/setup/upgrade/whats-changed#backward-compatibility) information for the complete details. +- **Upgraded Bootstrap** to v4.6.2, resulting in some style changes. For + details, see [v4.6.2 release notes][]. +- **[Upgraded FontAwesome][]** to v6.1.2 from v5. While many icons were renamed, + the v5 names will still work. For all the details, see [What's changed][]. +[v4.6.2 release notes]: https://github.com/twbs/bootstrap/releases/tag/v4.6.2 [docsy as an npm package]: https://www.docsy.dev/docs/get-started/other-options/#option-3-docsy-as-an-npm-package +[upgraded fontawesome]: https://fontawesome.com/docs/web/setup/upgrade/ +[what's changed]: https://fontawesome.com/docs/web/setup/upgrade/whats-changed ## [0.4.0][] diff --git a/package.json b/package.json index a5d87e6aae..ff555360e7 100644 --- a/package.json +++ b/package.json @@ -14,15 +14,15 @@ "get:submodule": "set -x && git submodule update --init ${DEPTH:- --depth 1}", "serve": "npm run cd:docs serve", "update:pkg:hugo": "npm install --save-exact -D hugo-extended@latest", - "update:pkg:dep": "npm install --save-exact @fortawesome/fontawesome-free@latest bootstrap@4" + "update:pkg:dep": "npm install --save-exact @fortawesome/fontawesome-free@6 bootstrap@4" }, "cspell": "cSpell:ignore docsy userguide fortawesome fontawesome ", "prettier": { "proseWrap": "always" }, "dependencies": { - "@fortawesome/fontawesome-free": "6.1.1", - "bootstrap": "4.6.1" + "@fortawesome/fontawesome-free": "6.1.2", + "bootstrap": "4.6.2" }, "devDependencies": { "hugo-extended": "0.101.0" From 519930cf0d642c37941b74a25361e743165f94bc Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Fri, 19 Aug 2022 09:12:34 -0400 Subject: [PATCH 9/9] CHANGELOG: add 0.4.0 and 0.5.0 migration details (#1192) --- CHANGELOG.md | 48 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c863103d8..47ad2299e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ + + # Changelog Useful links: Docsy [releases][] & [tags][]. Jump to the [latest][] release. @@ -6,7 +10,13 @@ For a list of issues targeted for the next release, see the [22Q2][] milestone. ## [0.5.0][] - next planned release (unpublished yet) -For a full list of the changes to this release, see the [release notes][0.5.0]. +For the full list of the changes found in this release, see the [release +notes][0.5.0]. **BREAKING CHANGES** are documented below. + +**After you update** your project's Docsy: + +- Update your project setup (see [0.4.0][]) if you haven't already. +- Run `npm install`. **New**: @@ -28,27 +38,32 @@ For a full list of the changes to this release, see the [release notes][0.5.0]. ## [0.4.0][] For a full list of the changes to this release, see the [release notes][0.4.0]. +Potential **BREAKING CHANGES** are documented below. -**Breaking changes**: +**After you update** your project's Docsy, run `npm install`. -- Docsy no longer uses git submodules for Bootstrap and FontAwesome. If your - project uses [Hugo Modules][], then this change doesn't impact you. +### Update your project setup - For projects with [other Docsy setups][], use the NPM packages of Bootstrap - and FontAwesome. Migrate your site by following these steps (execute commands - from your project's root directory): +If your project uses Docsy as follows: - 1. Update Docsy to 0.4.0. - 2. Delete obsolete Docsy Git submodules: +- [Hugo Module][], then this change doesn't impact you. +- For [other Docsy setups][], this is a **BREAKING CHANGE** -- read on. + +Docsy now fetches Bootstrap and FontAwesome as NPM packages rather than git +submodules. This has an impact on your project-build setup. To migrate your +site, follow these steps (execute commands from your project's root directory): + + 1. Delete obsolete Docsy Git submodules: ```console $ rm -Rf themes/docsy/assets/vendor ``` - 3. Get Docsy dependencies: + 2. Get Docsy dependencies: ```console $ (cd themes/docsy && npm install) ``` - 4. (Optional) If your site uses NPM, consider getting Docsy dependencies via - a [prepare][] script as follows: + 3. Update your build scripts to fetch Docsy dependencies automatically. For + example, if your site build uses NPM scripts, consider getting Docsy + dependencies via a [prepare][] script as follows: ```json { "name": "my-website", @@ -59,9 +74,14 @@ For a full list of the changes to this release, see the [release notes][0.4.0]. "...": "..." } ``` - 5. Proceed as usual to build or serve your site. + 4. (Optional) Build script cleanup. If your project uses Docsy as a git + submodule, Docsy updates no longer require the `--recursive` flag when + running `git submodule update`. Consider dropping the flag if you have no + other recursive git submodules. + +Proceed as usual to build or serve your site. -[hugo modules]: https://www.docsy.dev/docs/get-started/docsy-as-module/ +[hugo module]: https://www.docsy.dev/docs/get-started/docsy-as-module/ [other docsy setups]: https://www.docsy.dev/docs/get-started/other-options/ [prepare]: https://docs.npmjs.com/cli/v8/using-npm/scripts#prepare-and-prepublish