Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ For the full list of changes, see the [0.x.y] release notes.
- **[Breadcrumb navigation]** support has been enhanced and adjusted:
- You can now disable breadcrumbs for an entire project, or individual pages
or sections by setting `ui.breadcrumb_disable` to true. For details, see
[Breadcrumb navigation].
[Breadcrumb navigation][].
- **Blog** pages now also have breadcrumbs by default ([#1788]).
- Index-page single-element breadcrumb lists are hidden by default ([#2160]).
- Support for a [td-content-after-header.html] page-content render hook, which
can be [content type] specific ([#2192]).
- Support for a [td/content-after-header.html] page-content render hook, which
can be [content type][] specific ([#2192]). For details, see the [User
Guide][before-page-content].

**Other changes**:

Expand All @@ -63,13 +64,15 @@ For the full list of changes, see the [0.x.y] release notes.
[#2192]: https://github.com/google/docsy/pull/2192
[#2223]: https://github.com/google/docsy/pull/2223
[#2243]: https://github.com/google/docsy/pull/2243
[before-page-content]:
https://www.docsy.dev/docs/adding-content/lookandfeel/#before-page-content
[Breadcrumb navigation]:
https://www.docsy.dev/docs/adding-content/navigation/#breadcrumb-navigation
[content type]: https://gohugo.io/quick-reference/glossary/#content-type
[Heading self links]:
https://www.docsy.dev/docs/adding-content/navigation/#heading-self-links
[td-content-after-header.html]:
https://github.com/google/docsy/blob/main/layouts/td-content-after-header.html
[td/content-after-header.html]:
https://github.com/google/docsy/blob/main/layouts/_partials/td/content-after-header.html

## 0.11.0

Expand Down
2 changes: 1 addition & 1 deletion layouts/blog/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h1>{{ .Title }}</h1>
{{ partial "reading-time.html" . -}}
{{ end -}}
</header>
{{ .Render "td-content-after-header" -}}
{{ partial "td/content-after-header" . -}}
{{ .Content }}
{{ if (.Site.Config.Services.Disqus.Shortname) -}}
<br />
Expand Down
2 changes: 1 addition & 1 deletion layouts/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h1>{{ .Title }}</h1>
{{ partial "reading-time.html" . -}}
{{ end -}}
</header>
{{ .Render "td-content-after-header" -}}
{{ partial "td/content-after-header" . -}}
{{ .Content }}
{{ partial "feedback.html" . -}}
{{ if (.Site.Config.Services.Disqus.Shortname) -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/docs/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h1>{{ .Title }}</h1>
{{ partial "reading-time.html" . -}}
{{ end -}}
</header>
{{ .Render "td-content-after-header" -}}
{{ partial "td/content-after-header" . -}}
{{ .Content }}
{{ partial "section-index.html" . -}}
{{ partial "feedback.html" . -}}
Expand Down
3 changes: 1 addition & 2 deletions userguide/.htmltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ IgnoreURLs: # list of regexs of paths or URLs to be ignored
- ^https://badges.netlify.com/api
- ^https://code.jquery.com
# TEMPORARY until we're done with https://github.com/google/docsy/issues/2243
- ^https://github.com/google/docsy/blob/main/layouts/td-content-after-header.html
- ^https://github.com/google/docsy/blob/main/layouts/baseof.html
- ^https://github.com/google/docsy/blob/main/layouts/_partials/td/content-after-header.html
10 changes: 10 additions & 0 deletions userguide/content/en/docs/adding-content/lookandfeel.md
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,16 @@ Both [head.html] and [scripts.html] are included from [baseof.html], Docsy's
[scripts.html]:
https://github.com/google/docsy/blob/main/layouts/_partials/head.html

### Adding a banner before page content (EXPERIMENTAL) {#before-page-content}

To have a banner, or other similar content, appear at the top of the pages in a
section, add the content to the [td/content-after-header.html] partial. It will
appear inside the `div.td-content`, after `</header>`, just before `.Content` is
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only suggested change here is to take out one of the commas as it's a bit hard to read, so:

It will appear inside the div.td-content after </header>, just before .Content is
rendered.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks; see a2b7378.

rendered.

[td/content-after-header.html]:
https://github.com/google/docsy/blob/main/layouts/_partials/td/content-after-header.html

## Adding custom class to the body element

By default, Docsy adds the `td-{{ .Kind }}` class, where the kind is the kind of
Expand Down
3 changes: 2 additions & 1 deletion userguide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"_commit:public": "HASH=$(git rev-parse --short main); cd public && git add -A && git commit -m \"Site at $HASH\"",
"_hugo-dev": "npm run _hugo -- -e dev -DFE",
"_hugo": "hugo --cleanDestinationDir --themesDir ../..",
"_refcache:prune": "jq 'with_entries(select(.value.StatusCode < 400))' static/refcache.json > tmp/refcache.json && mv tmp/refcache.json static/refcache.json",
"_serve": "npm run _hugo-dev -- serve --minify --disableFastRender --renderToMemory",
"build:preview": "npm run _hugo-dev -- --minify --baseURL \"${DEPLOY_PRIME_URL:-http://localhost}\"",
"build:production": "npm run _hugo -- --minify",
Expand All @@ -33,5 +34,5 @@
"postcss-cli": "^11.0.1",
"rtlcss": "^4.3.0"
},
"cSpell:ignore": "- docsy htmltest pkgs postbuild precheck rtlcss -"
"cSpell:ignore": "- docsy htmltest pkgs postbuild precheck refcache rtlcss -"
}
8 changes: 8 additions & 0 deletions userguide/static/refcache.json
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,10 @@
"StatusCode": 206,
"LastSeen": "2025-05-16T09:20:38.127906-04:00"
},
"https://github.com/google/docsy/blob/main/layouts/baseof.html": {
"StatusCode": 206,
"LastSeen": "2025-05-22T12:25:13.516369-04:00"
},
"https://github.com/google/docsy/blob/main/layouts/blog/baseof.html": {
"StatusCode": 206,
"LastSeen": "2025-05-16T09:20:42.383402-04:00"
Expand Down Expand Up @@ -2303,6 +2307,10 @@
"StatusCode": 206,
"LastSeen": "2024-11-06T12:06:01.765051-05:00"
},
"https://www.docsy.dev/docs/adding-content/lookandfeel/#before-page-content": {
"StatusCode": 206,
"LastSeen": "2025-05-22T13:24:36.066951-04:00"
},
"https://www.docsy.dev/docs/adding-content/lookandfeel/#code-highlighting-with-chroma": {
"StatusCode": 206,
"LastSeen": "2024-11-06T12:07:28.264639-05:00"
Expand Down