Commit graph

149 commits

Author SHA1 Message Date
Alex Shpak
90eab4a917 #591, hide search field if JS is not enabled 2024-05-18 12:44:13 +02:00
Eitan Adler
1c78b920b0
replace .Site.IsMultiLingual with hugo.IsMultilingual (#609)
# Problem

The warning
```
INFO  deprecated: .Site.IsMultiLingual was deprecated in Hugo v0.124.0
and will be removed in a future release. Use hugo.IsMultilingual
instead.``

shows up

# Solution

Follow the deprecation warning
2024-05-18 12:31:58 +02:00
wenbingzhang
1c42a96572
Replace flexsearch with fusejs (#600)
Co-authored-by: 张文兵 <wenbing@mgtv.com>
2024-05-18 12:29:55 +02:00
Leo Heitmann Ruiz
0baec34596
Use null alt text when icon is next to action (#610) 2024-04-13 11:18:14 +02:00
Alex Shpak
01645fc56d #521: add canonical url to the header 2024-02-17 18:04:57 +01:00
Andreas Deininger
2d7ce27f77
Fix: make use of .Site.Params.BookFavicon (#576) 2024-01-10 12:39:18 +01:00
Alex Shpak
16f6203f90 #455, add BookFavicon parameter 2023-08-08 12:40:46 +02:00
nobu1308
1cebd589f6
Update meta theme-color in html-head.html (#527)
theme-color that works in both light and dark mode
2023-08-08 12:10:07 +02:00
Alex Shpak
1318a717ed #441, add menu.params.class support 2022-11-02 23:42:10 +01:00
Mikey Lombardi (He/Him)
6090fddebd
(MAINT) Respect LinkTitle in page metadata (#483)
Prior to this commit, the partial for determining a page title used the
`Title` property of a page, if present, or humanized and titleized the
file name if not.

It did not use the `LinkTitle` property at all (defined in the
[front matter][01]). According to the [menu documentation][02]:

> The following order is used to determine an Identifier:
>
> `.Name > .LinkTitle > .Title`
>
> This means that `.Title` will be used unless `.LinkTitle is present,
> etc.

Similar, the documentation for [menu entry variables][03] states:

> The `name` key, if set for the menu entry, sets this value. If that
> key is not set, and if the menu entry is set in a page front-matter,
> this value defaults to the page's `.LinkTitle`.

Together, these imply that if `.LinkTitle` is specified, it should be
preferred over `.Title` for the generated nav menu.

[01]: https://gohugo.io/content-management/front-matter/
[02]: https://gohugo.io/content-management/menus/#nesting
[03]: https://gohugo.io/variables/menus/#menu-entry-variables
2022-10-05 10:01:03 +02:00
Alex Shpak
1852b16d93 #440L Adjust bookHref, check .Content again, add redirect 2022-04-26 13:14:22 +02:00
Horea Christian
c2014a08a5
Add BookHref, set explicit URL for the menu (#440) 2022-04-26 13:10:39 +02:00
Giuseppe Masino
98d19b8e95
Make menu entries' link relative (#421)
This change allows hugo to build pages correcly when
`canonifyURLs = false` and `relativeURLs = true`.
Otherwise the links on the menu will be canonicalized regardless of
configuration.
This results in broken sites in a number of situations, such as sites
served behind a reverse-proxy that don't want to account for the prefix
they're served under.
2022-02-18 17:35:02 +01:00
Alex Shpak
3a65df3a76 #408, #410: Use LanguageCode in templates if specified 2022-01-13 19:20:02 +01:00
Alex Shpak
8bb6d7ebec #369, switch to google_analytics.html internal template 2021-10-19 22:05:41 +02:00
Jack Morgan
9d4916fcc2
Allow site title to be customised via parital (#384)
* Allow site title to be customised via parital
* Modify readme to highlight available partials
* Rename template for consistency
* Move title tags to head partial
2021-09-27 09:36:02 +02:00
xhdix
f2fb37b1ad
add color-scheme to head-html (#387) 2021-09-26 21:47:58 +02:00
Alex Shpak
26de844a19 #343, #165: Move lang selector to left menu 2021-08-18 11:12:58 +02:00
Alex Shpak
fde10f1319 #285, skip integrity attribute if site is built without hostname 2021-05-21 00:50:38 +02:00
Alex Shpak
f6e8d1b693 Add deprecation notice for menu bundle 2021-05-21 00:46:53 +02:00
Nikolay Raspopov
345cb5d947
Prefer existing and translated variant of home page (#342)
* Prefer existing and translated variant of home page as the site link in the menu header.
* More compact "cond"-version of fix.
2021-05-20 22:02:31 +02:00
Alex Shpak
553d378db3 Fix lighthouse remarks: icon sizes, noopener 2021-05-20 19:00:15 +02:00
Alex Shpak
d7c644f0e7 Refactor search, prepare for pre-built indexing 2021-05-19 20:26:21 +02:00
Alex Shpak
6720168dd5 #281, Copy code block content on click 2021-05-03 23:52:00 +02:00
Alex Shpak
9e9c7d3403 Improve posts title rendering 2021-05-03 22:05:25 +02:00
Alex Shpak
c197f3399b #286, Add ability to set image for posts 2021-05-03 21:47:19 +02:00
Pim Snel
e0823c2138
collapsed menu right arrow, uncollapsed down arrow (#332) 2021-05-03 21:18:49 +02:00
Collin Brooks
ba38e17b1b
Add custom commit path for last edited link (#319)
- A new `BookCommitPath` paramter was added that allows the 'commit'
   portion of the link to a page's last edited commit hash to be
   specified.
 - This is useful when github is not the default repository for a
   project.

Co-authored-by: Collin Brooks <cbrooks@sentryds.com>
2021-04-11 17:50:54 +02:00
Caleb Jasik
9791db1ce7
Bug Fix: Empty .Site.Params.contentDir (#312)
* Bug Fix: Empty .Site.Params.contentDir

When .Site.Params.contentDir is left as the default: "content", calling .Site.Params.contentDir returns nothing, or maybe an empty string. To fix this, we set a default value for .Site.Params.contentDir to "content" and the url is built correctly.

* Use the `default` function instead of `or`

https://gohugo.io/functions/default/
2021-02-22 19:48:49 +01:00
Alex Shpak
d9fe59a6e9 Refactor aside menus, add extra wrapper 2021-01-26 22:20:30 +01:00
Tiger Oakes
012ccee53d
Add before and after partials for toc (#296)
Closes #257
2021-01-26 18:45:08 +01:00
Alex Ivanov
c828c6660f
Add OnlyTranslated property (#303)
* Add OnlyTranslated property

Signed-off-by: Alex Ivanov <ai@contributor.pw>

* Add newlines

Signed-off-by: Alex Ivanov <ai@contributor.pw>

* rename property

Signed-off-by: Alex Ivanov <ai@contributor.pw>
2021-01-21 11:42:26 +01:00
Alex Shpak
5cc3d6719c #231, Allow open collapsed menu without changing page 2020-09-14 22:45:58 +02:00
Vincent Vialard
1608ade3f4
- hide ToC icon in header if ToC not enabled (#225) 2020-05-25 22:40:54 +02:00
Alex Shpak
65484b0f4c #215, Fix menu translateX for RTL (negative X) 2020-05-18 23:58:21 +02:00
Alex Shpak
e2ffa7b3ad Add manifest 2020-05-01 17:35:08 +02:00
Alex Shpak
2b430b0b41 #212, Fix use of IsAncestor after hugo breaking change 2020-04-28 22:00:24 +02:00
tyler71
b88d5f6b12
Edit this page content dir lang independent (#202)
#200
2020-04-16 17:40:17 +02:00
Alex Shpak
94c8230e1e #197, Use RelPermalink to identify nested pages in collapsed menu 2020-04-14 22:56:31 +02:00
Alex Shpak
9719692512 Introduce serviceWorker, disabled by default 2020-04-12 20:50:03 +02:00
Alex Shpak
15339ab6a6 #157, Refactor side menu, simpler and renders all pages at root 2020-04-11 14:35:29 +02:00
Alex Shpak
8927a3c672 #162, Add docs/date partial, for date customization 2020-04-10 20:24:36 +02:00
Alex Shpak
1eeabcad67 #187, Use .Permalink for lang switch, align icons 2020-04-03 17:42:48 +02:00
Alex Shpak
6e146b1bf1 #188, Add hreflang metadata to html head 2020-04-02 22:47:36 +02:00
Alex Shpak
b91e9eaea7 #186, Make title generation cross-platform 2020-03-31 23:29:21 +02:00
Alex Shpak
a9867292af Fix current page highlight in new Hugo version 2020-03-30 18:00:15 +02:00
Alex Shpak
a3059fe4f7 #140, Use new GetTerms function to fix tag titles 2020-03-19 22:00:45 +01:00
Alex Shpak
0d1ba29999 #177, #176 Simplify description in html head 2020-03-13 18:15:51 +01:00
undergroundwires
13ef4c1efc
prioritize more related parameters for description #176 (#177) 2020-03-13 18:14:22 +01:00
Alex Shpak
9c8663eb34 #155, Do not show collapse indicator in non-section pages 2020-03-01 00:49:34 +01:00