diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 3760b0777..000000000 --- a/.gitmodules +++ /dev/null @@ -1,7 +0,0 @@ -[submodule "themes/docsy"] - path = themes/docsy - # We use our own forked version of the Docsy theme, - # to avoid loading fonts from CDNs, which Docsy currently - # doesn't support (see https://github.com/google/docsy/issues/605). - url = https://github.com/matrix-org/docsy.git - branch = master diff --git a/README.md b/README.md index 089bfe17b..8b40c0f51 100644 --- a/README.md +++ b/README.md @@ -61,13 +61,12 @@ place after an MSC has been accepted, not as part of a proposal itself. 1. Install the extended version (often the OS default) of Hugo: . Note that at least Hugo - v0.93.0 is required. + v0.110.0 is required. Alternatively, use the Docker image at https://hub.docker.com/r/klakegg/hugo/. (The "extended edition" is required to process the SCSS.) -2. Run `npm i` to install the dependencies and fetch the docsy git submodule. - Note that this will require NodeJS to be installed. +2. Run `npm i` to install the dependencies. Note that this will require NodeJS to be installed. 3. Run `npm run get-proposals` to seed proposal data. This is merely for populating the content of the "Spec Change Proposals" page and is not required. 4. Run `hugo serve` (or `docker run --rm -it -v $(pwd):/src -p 1313:1313 diff --git a/assets/scss/custom.scss b/assets/scss/_styles_project.scss similarity index 95% rename from assets/scss/custom.scss rename to assets/scss/_styles_project.scss index c147b6458..b275db4f2 100644 --- a/assets/scss/custom.scss +++ b/assets/scss/_styles_project.scss @@ -18,9 +18,6 @@ limitations under the License. Custom SCSS for the Matrix spec */ -@import "variables_project"; -@import "variables"; - /* Import the CSS classes for the syntax highlighter. * * This is generated with: @@ -49,6 +46,10 @@ Custom SCSS for the Matrix spec } + .nav-link { + font-weight: normal; + } + a { color: $black; } @@ -292,7 +293,7 @@ footer { } /* Styles for sections that are rendered from data, such as HTTP APIs and event schemas */ -.rendered-data { +.td-content .rendered-data { background-color: $secondary-lightest-background; padding: 0.85rem; margin: 0.85rem 0; @@ -346,7 +347,7 @@ footer { } p code, table code { - background-color: inherit; + background-color: transparent; } table { @@ -396,6 +397,7 @@ footer { th, td, caption { padding: 1rem; + border-top: 1px $table-border-color solid; } &.object-table, &.response-table, &.content-type-table { @@ -408,14 +410,12 @@ footer { // ... but avoid double border between caption and table border-bottom: 0; - } - caption, tbody tr { - background-color: $table-row-default; + background-color: $secondary-lighter-background; } - tbody tr:nth-child(even) { - background-color: $table-row-alternate; + tbody tr { + --bs-table-striped-bg: #{$secondary-lighter-background}; } } @@ -517,3 +517,15 @@ dd { border-radius: 0.25rem; // was $border-radius, but that var isn't accessible here. } } + +/* Style for breadcrumbs */ +.td-breadcrumbs { + padding: .75rem 1rem; + background-color: #eee; + border-radius: .25rem; + margin-bottom: 1rem; + + .breadcrumb { + margin: 0; + } +} \ No newline at end of file diff --git a/assets/scss/_variables_project.scss b/assets/scss/_variables_project.scss index 8ff5fe989..6eec3e7c0 100644 --- a/assets/scss/_variables_project.scss +++ b/assets/scss/_variables_project.scss @@ -20,7 +20,7 @@ $dark: #333; $gray-100: #FBFBFB; $secondary-background: #E5F5FB; -$secondary-lighter-background: #F4FaFC; +$secondary-lighter-background: #F4FAFC; $secondary-lightest-background: #FBFDFD; @@ -33,8 +33,7 @@ $warning-background: #FFE0E0; // colours for definition tables. // the border colour matches that used for "highlight" divs $table-border-color: rgba(black, .125); -$table-row-alternate: $secondary-lightest-background; -$table-row-default: $secondary-lighter-background; +$table-bg: $secondary-lightest-background; /* Configure docsy to use the default system fonts instead of Google Fonts. * See https://www.docsy.dev/docs/adding-content/lookandfeel/#fonts */ diff --git a/changelogs/internal/newsfragments/1699.clarification b/changelogs/internal/newsfragments/1699.clarification new file mode 100644 index 000000000..7d1c05266 --- /dev/null +++ b/changelogs/internal/newsfragments/1699.clarification @@ -0,0 +1 @@ +Update Docsy to v0.8.0. diff --git a/config.toml b/config.toml index 0ed67d161..15a284b5c 100644 --- a/config.toml +++ b/config.toml @@ -7,9 +7,6 @@ canonifyURLs = true enableRobotsTXT = true -# Hugo allows theme composition (and inheritance). The precedence is from left to right. -theme = ["docsy"] - # We disable RSS, because (a) it's useless, (b) Hugo seems to generate broken # links to it when used with a --baseURL (for example, https://spec.matrix.org/v1.4/ # contains ``). @@ -23,6 +20,21 @@ languageName ="English" # Weight used for sorting. weight = 1 +# Entries in the main menu in the header. +[menus] +[[menus.main]] + name = 'Foundation' + url = 'https://matrix.org/foundation/' + weight = 10 +[[menus.main]] + name = 'FAQs' + url = 'https://matrix.org/faq' + weight = 20 +[[menus.main]] + name = 'Blog' + url = 'https://matrix.org/blog/posts' + weight = 30 + [markup] [markup.goldmark] [markup.goldmark.renderer] @@ -111,3 +123,13 @@ sidebar_menu_compact = true X-Frame-Options = "sameorigin" Access-Control-Allow-Origin = "*" Access-Control-Allow-Methods = "GET" + +# hugo module configuration + +[module] + [module.hugoVersion] + extended = true + min = "0.110.0" + [[module.imports]] + path = "github.com/matrix-org/docsy" + disable = false diff --git a/go.mod b/go.mod new file mode 100644 index 000000000..7988b29ff --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module github.com/matrix-org/matrix-spec + +go 1.12 + +require github.com/matrix-org/docsy v0.0.0-20231227121313-d55dbaf3aaaf // indirect diff --git a/go.sum b/go.sum new file mode 100644 index 000000000..1fb47ebda --- /dev/null +++ b/go.sum @@ -0,0 +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-20231227121313-d55dbaf3aaaf h1:e1mutHvMYJ92F/VkAp2ixQthXf6zNHJll4wYGbBHznI= +github.com/matrix-org/docsy v0.0.0-20231227121313-d55dbaf3aaaf/go.mod h1:TAN2cSMJzy0hnx9OYDbBYluS8raV61UHxT/tfjaLt3g= +github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= diff --git a/layouts/partials/breadcrumb.html b/layouts/partials/breadcrumb.html index 8e1fb9b24..af3a95516 100644 --- a/layouts/partials/breadcrumb.html +++ b/layouts/partials/breadcrumb.html @@ -8,8 +8,8 @@ */}} {{ if not .IsHome }} -