From 7763e2a8ef375d16f0773e4e5e67e4373a258a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Thu, 14 Nov 2024 13:01:02 +0100 Subject: [PATCH 1/8] Upgrade docsy to 0.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Commaille --- go.mod | 2 +- go.sum | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index d17af3038..52d0f21c4 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/matrix-org/matrix-spec go 1.12 -require github.com/matrix-org/docsy v0.0.0-20241030165433-a14705b7e3ca // indirect +require github.com/matrix-org/docsy v0.0.0-20241106102557-ec7b98ee4014 // indirect diff --git a/go.sum b/go.sum index d76f35349..04125160e 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,4 @@ -github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= -github.com/matrix-org/docsy v0.0.0-20241030165433-a14705b7e3ca h1:WqKYQIF3JdWxY6b+OZQbdCjczOmELuUxpXhXSXJ/F58= -github.com/matrix-org/docsy v0.0.0-20241030165433-a14705b7e3ca/go.mod h1:TAN2cSMJzy0hnx9OYDbBYluS8raV61UHxT/tfjaLt3g= -github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= +github.com/FortAwesome/Font-Awesome v0.0.0-20240716171331-37eff7fa00de/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= +github.com/matrix-org/docsy v0.0.0-20241106102557-ec7b98ee4014 h1:CNvxuuURuxkEjA0QN+lRKELc7PRDsX270e8v4GDF3II= +github.com/matrix-org/docsy v0.0.0-20241106102557-ec7b98ee4014/go.mod h1:4Ek1bcdbfU/j8hIatEjNhIs1Yua85FtQf3kLvoYZ0bQ= +github.com/twbs/bootstrap v5.3.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= From 37cec7f6d3a9d50454c4088b293381a505b01e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Thu, 14 Nov 2024 13:01:37 +0100 Subject: [PATCH 2/8] Upgrade Hugo to 0.139.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Commaille --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d67cd441b..25a2fb68c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,8 +1,7 @@ name: "Spec" env: - # Cannot build the spec with Hugo 0.125.0 and docsy < 0.10.0 because of https://github.com/google/docsy/issues/1930 - HUGO_VERSION: 0.124.1 + HUGO_VERSION: 0.139.0 on: push: From 567f6571d3ebf5e605e66b4cf840f958e136e26a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Mon, 18 Nov 2024 14:51:17 +0100 Subject: [PATCH 3/8] Update footer partial MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Commaille --- assets/scss/_styles_project.scss | 5 +++- config.toml | 17 +++++++------ layouts/partials/footer.html | 39 ----------------------------- layouts/partials/footer/center.html | 30 ++++++++++++++++++++++ 4 files changed, 44 insertions(+), 47 deletions(-) delete mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/footer/center.html diff --git a/assets/scss/_styles_project.scss b/assets/scss/_styles_project.scss index 5081d8e87..9b0207157 100644 --- a/assets/scss/_styles_project.scss +++ b/assets/scss/_styles_project.scss @@ -122,8 +122,11 @@ Custom SCSS for the Matrix spec } /* Customise footer */ -footer { +.td-footer { box-shadow: 0px 0px 8px rgba(179, 179, 179, 0.25); + padding-top: 2rem; + color: var(--bs-body-color); + background-color: var(--bs-body-color-bg); } /* Auto numbering for headings */ diff --git a/config.toml b/config.toml index 2494ad1e9..5315829c0 100644 --- a/config.toml +++ b/config.toml @@ -55,7 +55,6 @@ description = "Home of the Matrix specification for decentralised communication" [params] copyright = "The Matrix.org Foundation CIC" -privacy_policy = "https://matrix.org/legal/privacy-notice" [params.version] # must be one of "unstable", "current", "historical" @@ -71,8 +70,6 @@ current_version_url = "https://spec.matrix.org/latest" # User interface configuration [params.ui] -# Set to true to disable the About link in the site footer -footer_about_disable = false # Collapse HTTP API and event
elements rendered_data_collapsed = false # Hide the search entry in the sidebar @@ -88,22 +85,28 @@ sidebar_menu_compact = true # icon = "fa fa-envelope" # desc = "Discussion and help from your fellow users" # Developer relevant links. These will show up on right side of footer and in the community page if you have one. -[[params.links.developer]] +# [[params.links.developer]] +# name = "GitHub" +# url = "https://github.com/matrix-org" +# icon = "fab fa-github" +# desc = "Matrix on GitHub" +# Custom links shown in the center of the footer. (Only supported by our fork of docsy's 'footer/central' partial.) +[[params.links.bottom]] name = "GitHub" url = "https://github.com/matrix-org" icon = "fab fa-github" desc = "Matrix on GitHub" -[[params.links.developer]] +[[params.links.bottom]] name = "GitLab" url = "https://gitlab.matrix.org/matrix-org" icon = "fab fa-gitlab" desc = "Matrix on GitLab" -[[params.links.developer]] +[[params.links.bottom]] name = "YouTube" url = "https://www.youtube.com/channel/UCVFkW-chclhuyYRbmmfwt6w" icon = "fab fa-youtube" desc = "Matrix YouTube channel" -[[params.links.developer]] +[[params.links.bottom]] name = "Twitter" url = "https://twitter.com/matrixdotorg" icon = "fab fa-twitter" diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html deleted file mode 100644 index 3506f8342..000000000 --- a/layouts/partials/footer.html +++ /dev/null @@ -1,39 +0,0 @@ -{{/* - - A modified version of the footer.html partial in Docsy. - -*/}} - -{{ $links := .Site.Params.links }} -
-
-
-
- {{ with $links }} - {{ with index . "developer"}} - {{ template "footer-links-block" . }} - {{ end }} - {{ end }} -
-
-
-
- {{ with .Site.Params.copyright }}© {{ now.Year}} {{ .}}{{ end }} - {{ if not .Site.Params.ui.footer_about_disable }} - {{ with .Site.GetPage "about" }}

{{ .Title }}

{{ end }} - {{ end }} -
-
-
-
-{{ define "footer-links-block" }} -
    - {{ range . }} -
  • - - - -
  • - {{ end }} -
-{{ end }} diff --git a/layouts/partials/footer/center.html b/layouts/partials/footer/center.html new file mode 100644 index 000000000..cd3f04e0c --- /dev/null +++ b/layouts/partials/footer/center.html @@ -0,0 +1,30 @@ +{{- /* + + Modified version of the footer/center.html partial of Docsy, adding "bottom" + links on top of the copyright. + +*/ -}} + +{{ with .Site.Params.links -}} + {{ with index . "bottom" -}} + {{- partial "footer/links.html" . -}} + {{ end -}} +{{ end -}} + +
+{{ partial "footer/copyright.html" . -}} +
+ +{{ with .Site.Params.privacy_policy -}} + {{ T "footer_privacy_policy" }} +{{- end -}} + +{{ if ne .Site.Params.ui.footer_about_disable nil -}} + {{ warnf "Config parameter '.params.ui.footer_about_disable' is DEPRECATED, use '.params.ui.footer_about_enable' instead." -}} +{{ end -}} + +{{ if or .Site.Params.ui.footer_about_enable (eq .Site.Params.ui.footer_about_disable false) -}} + {{ with .Site.GetPage "about" -}} + + {{- end -}} +{{ end -}} \ No newline at end of file From 75f784e3e87e933c3ec3877d7c36dbc55078f3a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Mon, 18 Nov 2024 15:05:57 +0100 Subject: [PATCH 4/8] Update navbar partial MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Commaille --- layouts/partials/navbar.html | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index db6a982ae..ca8347eef 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -1,10 +1,10 @@ -{{/* +{{- /* A version of the navbar.html partial in Docsy, only modified to include the spec version, which is calculated using an inline `version-string` partial. -*/}} +*/ -}} {{ $cover := and (.HasShortcode "blocks/cover") @@ -12,8 +12,8 @@ -}} {{ $baseURL := urls.Parse $.Site.Params.Baseurl -}} -