merge upstream#1
Open
emhl wants to merge 219 commits into
Open
Conversation
…465) Co-authored-by: Alexandra Zaharia <alexandra.zaharia@platform.sh>
Solves #455 by statically configuring the page source to use the source and description of the first image in bigimg. When the description is empty, also pre-hides the description box. When JavaScript is enabled, this theme's main.js (https://github.com/halogenica/beautifulhugo/blob/master/static/js/main.js) takes over and will overwrite this style attribute, changing the image in use.
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
Ox-hugo uses an array for authors by default which breaks this theme. Some themes already support multiple authors e.g. ananke
Adding Disclaimer Text to the footer. Signed-off-by: Robert Terakedis <rterakedis@vmware.com> Co-authored-by: Robert Terakedis <rterakedis@vmware.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This reverts commit 1d98d70.
This reverts commit 3c55b34.
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Convert theme to hugo module * ci: bump PR build too Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * Bump hugo SSG to latest version * Update .github/workflows/ci.yml --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
* seo/article: Fix dateModified and add timezone * Remove new line at the end of the file
* Fixes Upstream Issue 349 - tag link has double forward slash * Updated fix for Upstream Issue 349 - tag link has double forward slash
* Add cusdis support * update example website config.toml
added logo manager for asset, if is assets, optimize the logo in Hugo pipelines
* Site.Author is deprecated, use Params.author instead * Update footer.html * Update footer.html * Update footer.html * Update footer.html * Update footer.html * Update footer.html * Update footer.html * Update ci.yml * Update ci.yml * Update footer.html * Update ci.yml * Update ci.yml --------- Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
* Fixed deprecated site.isServer param to hugo.isServer param * Also fixed another deprecated function for disqus * Updated README.md In the face of that we will update to 0.120 it would also be nice to update the README to reference the hugo.* file as the config instead of the config.* file. I also changed the description of the disqus feature to match the updated version of the code * Added checks for hugoVersion and disqus feature * Fixed accidental delete * Removed new line
Change CSS selector from to so all child elements receive consistent padding/margin, not just <p> tags. Remove wrapping <p> around markdownify output since it can produce block-level elements, which is invalid HTML inside <p> and causes browsers to break element nesting. Closes #221, Closes #254 Assisted-by: OpenCode:GLM-5
Add static/css/print.css with @media print rules that: - Hide interactive elements (navbar, TOC panel, theme toggle, social share buttons, search modal, comments, copy-code buttons, pager) - Fix big-img header text visibility by removing background-image and forcing black text (prevents invisible white-on-white when browsers skip backgrounds) - Append link URLs after anchor text for print readability - Reset dark mode colors to black-on-white - Use print-safe layout (full-width, no fixed positioning, page margins) - Prevent bad page breaks (headings, images, blockquotes, code blocks) - Wrap code blocks for print instead of horizontal scroll - Show all tab-pane content when printing tabs shortcode - Simplify tables, callout boxes, recipe cards, and footer Load the stylesheet with media="print" in head.html for zero screen overhead. Assisted-by: OpenCode:GLM-5
Navbar menu entries are now translatable via the i18n system. When a menu item has an identifier field, the theme looks up a matching menu_<identifier> key in the current language's i18n file. If found, the translated string replaces the menu name; otherwise the configured name is used as fallback. This works for both top-level menu items and dropdown children. Added menu_* translation keys for common items (blog, posts, tags, categories, archives, about, and the example-site section names) to all 20 language files. Documented the feature in the SEO & i18n page. Closes #319 Assisted-by: OpenCode:GLM-5
When Hugo's i18n can't find a translation key, it returns an empty string rather than the key itself. The existing check (ne $translated $key) was true for empty strings, causing untranslated menu items to display as blank instead of falling back to the original .Name value. Added an and $translated guard to reject empty translations. Assisted-by: OpenCode:GLM-5
When a figure shortcode used a relative path like images/fig.png (without a leading /), relURL treated it as site-root-relative, producing /images/fig.png instead of the correct /post/name-of-post/images/fig.png. This regressed when print .Site.BaseURL was replaced with relURL. Now, paths not starting with / or http are prepended with .Page.RelPermalink before being passed to relURL, restoring page-bundle image resolution. Assisted-by: OpenCode:glm-5
The 404 template skips the header partial, so it lacked the intro-header div that provides margin-top to push content below the fixed navbar. On narrow/mobile viewports the navbar overlapped the 404 text. Adding an empty intro-header div matches the fallback output of the header partial and restores proper spacing. Assisted-by: OpenCode:GLM-5
Fix typo 'noimageinde' -> 'noimageindex' in meta-robots.html that prevented the noimageindex robots meta tag from working. Document previously undocumented features across example site pages: - SEO structured-data params (organizationName, organizationLogo, organizationAddress, socialProfiles, alternatePageName) - TOC panel UX (slide-out panel, scroll tracking, keyboard close) - Print stylesheet behavior - prefers-reduced-motion accessibility support - Bootstrap 5 tooltips - Archetypes (post, page, default, recipe) - Author front matter Markdown link syntax - Avatar WebP auto-processing - Date format validation at build time - GitHub buttons site-level defaults (ghBadge, ghCount) - description and type in per-page front matter table Fix language count (19 -> 20) and remove phantom Breton entry. Assisted-by: OpenCode:GLM-5
The recipe page type was only documented in configuration.md but missing from the pages-and-layouts page which covers every other page type. Add a brief section with example front matter and a cross-reference to the full recipe reference. Assisted-by: OpenCode:GLM-5
* feat: side-arrow post navigation for wide screens Replace bottom pager buttons with fixed side arrows on wide screens (like mdBook/WIT docs style). On narrow screens, show a bottom pager with prev/next titles and a centered view-source button. The footer z-index is raised above the side arrows so it isn't obscured. - Add .nav-side-arrow fixed-position arrows with chevron icons - Hide bottom pager on wide screens; hide side arrows on narrow - Move show-source button to center of pager row - Show prev/next labels with post titles as tooltips - Add dark mode styles for side arrows - Raise footer z-index to 51 (above arrows at 50) Assisted-by: OpenCode:glm-5 * feat: add showPostNav config param and update docs Add a showPostNav param (default true) to allow disabling post navigation per-site or per-page. Update documentation to describe the new side-arrow navigation style and the configurable param. Assisted-by: OpenCode:glm-5 Signed-off-by: Henry Schreiner <henryfs@princeton.edu> * chore: demo showPostNav on pirates post, move bottom spacing to main Add showPostNav: false to the pirates example post with an explanatory note. Move the 2rem bottom margin from the pager to [role=main] so pages without nav buttons also have breathing room before the footer. Assisted-by: OpenCode:glm-5 Signed-off-by: Henry Schreiner <henryfs@princeton.edu> --------- Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Add a canonical link tag using the page's permalink to improve search engine optimization and prevent duplicate content issues.
* feat(layouts): allow custom home title in navbar Update the navigation bar to use `homeTitle` from site parameters if defined, falling back to the default site title. This provides more flexibility in controlling the brand name displayed in the header. * feat(footer): allow custom home title in footer link Update the footer partial to use `homeTitle` from site parameters if provided, falling back to the default site title. This allows users more flexibility in customizing the text displayed for the home link in the footer. * fix(footer): improve conditional logic for home title link Refactor the footer partial to correctly handle the visibility of the home title link and its preceding separator. This ensures the link is rendered if either `homeTitle` or `Site.Title` is defined, improving the robustness of the conditional checks. * docs: mention locations for homeTitle Assisted-by: glm-5.1 Signed-off-by: Henry Schreiner <henryfs@princeton.edu> --------- Signed-off-by: Henry Schreiner <henryfs@princeton.edu> Co-authored-by: Henry Schreiner <henryfs@princeton.edu>
* fix: always show read more link for recipe summaries Recipe pages always have additional content (ingredients, instructions) rendered in the recipe card on the single page. When the content body is short enough that Hugo does not truncate it, the summary view showed the full content without a [Read More] link, hiding the recipe card from users. Now recipe-type pages always display the summary with a read more link. Assisted-by: OpenCode:glm-5 * docs: include recipe Signed-off-by: Henry Schreiner <henryfs@princeton.edu> --------- Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
* feat: add integrated client-side search using Fuse.js Implement a fast client-side search feature. This includes: - New search layout and logic using a JSON index of site content. - Configuration options in `hugo.toml` for customizable search labels and placeholders. - Updated documentation in README.md and the example site configuration page. - Added a dedicated search page to the example site. - Created the necessary JSON output templates to support the search index. * docs: expand search configuration options and fix parameter access Add new configurable parameters for the search functionality to allow for better localization and customization of the search interface, including loading states, error messages, and pagination labels. Changes: - Updated `exampleSite/content/page/configuration.md` and `exampleSite/hugo.toml` to include new search parameters. - Fixed a bug in `layouts/_default/search.html` where search parameters were being accessed via `.Params` instead of `.Site.Params`, ensuring correct configuration loading. * fix(search): improve search result phrasing and translate comments Update the search result labels in `hugo.toml` and the rendering logic in `search.js` to ensure a more natural phrasing of the results count. Additionally, translate JavaScript comments from French to English for better maintainability. * refactor: extract search index logic to partial and improve search.js - Move search index generation from `index.json` and `list.json` into a shared partial `search_index.json.html` to reduce duplication. - Add a safety check in `search.js` within the `feelingLucky` function to ensure the first search result exists and contains a URL before attempting redirection. * feat(search): allow custom home title in search header Update the search page header to use `homeTitle` from site parameters if available, falling back to the default site title. This provides more flexibility in naming the home link on the search results page. * feat: search bar and simpler search page Assisted-by: Copilot:claude-sonnet-4.6 Signed-off-by: Henry Schreiner <henryfs@princeton.edu> * feat: search providors, and use translations Assisted-by: Copilot:claude-sonnet-4.6 * fix: add translations Assisted-by: OpenCode:GLM-5.1 Signed-off-by: Henry Schreiner <henryfs@princeton.edu> * refactor: combine search JS into single search-fuse.js Merge search-core.js, search-provider-fuse.js, and navbar-search.js into one file. All three were always loaded together as a unit, and the provider abstraction layer had no other providers to support. Reduces 3 script requests to 1 on every page with search enabled. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * feat: load fuse.js from CDN unless selfHosted Add fuse.js to scripts.html with the same CDN/selfHosted conditional used for Bootstrap, PhotoSwipe, and other vendor libraries. Remove the dynamic script-injection loader from search-fuse.js now that the script is loaded eagerly as a proper <script> tag. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com> --------- Signed-off-by: Henry Schreiner <henryfs@princeton.edu> Co-authored-by: Henry Schreiner <henryfs@princeton.edu> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
Add the `text-reset` CSS class to author links in the post metadata partial to ensure they inherit the surrounding text color and maintain visual consistency.
Assisted-by: OpenCode:glm-5.1 Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
The box-shadow on .toc-panel was bleeding out from the off-screen (translated -100%) panel, creating a visible gradient on the far left edge of the page — especially noticeable in dark mode. Move the shadow to .toc-panel.toc-open so it only appears when the panel is visible. Assisted-by: OpenCode:glm-5
Remove duplicated content across example site documentation pages by establishing canonical homes for each topic and adding crosslinks. Key changes: - Slim configuration.md (531→373 lines): move comment systems, SEO robots, and analytics/search to their dedicated pages with crosslinks - Merge layout-options.md into pages-and-layouts.md and delete the former; move Pages & Layouts from Features to Setup menu - Add Analytics & Search section to seo-and-i18n.md (moved from configuration.md) - Trim shortcodes.md (456→302 lines): replace duplicated parameter tables for beautifulfigure, gallery, mermaid, and include-code with crosslinks to their dedicated pages - Trim code-blocks.md: replace duplicated syntax highlighting config with crosslink to configuration.md - Trim theming.md: replace duplicated theme-dependent content and white-background sections with crosslinks to markdown-extensions.md - Trim math-and-diagrams.md: replace duplicated mathEngine config table with crosslink to configuration.md - Update stale crosslinks in release post, README.md, and AGENTS.md Net result: ~400 fewer lines of duplicated content, 1 page eliminated, every topic now has a single canonical home with crosslinks. Assisted-by: OpenCode:glm-5
absURL generates absolute URLs that break when the site is deployed under a subpath (e.g. halogenica.net/beautifulhugo/). The search page was requesting /css/search.css and /js/search.js instead of /beautifulhugo/css/search.css and /beautifulhugo/js/search.js, resulting in 404 errors. Switch to relURL/relLangURL which respect the baseURL subpath. Assisted-by: OpenCode:glm-5
Humanize the recipe times. - This just provides the intial ability to show recipe times in a human readable format. - It might be worth while convert hours to minutes to prevent the recipe width from growing too much.
Rewrite recipe/humanize-time.html to use i18n keys for all time unit labels (days, hours, minutes, seconds) instead of hardcoded English strings. Parse full ISO 8601 duration format including days and seconds. Add recipeDay/recipeHour/recipeMinute/recipeSecond i18n keys to all 20 locale files with proper plural forms (one/other for most, few/many for Slavic languages, other-only for CJK). Assisted-by: OpenCode:glm-5.1
* fix: correct paths for subdirectory deployments - Remove absolute '/index.json' fallback in search-fuse.js that bypassed relURL for subdirectory deployments - Guard footer commit link with .Site.Params.commit check so 'commit = false' doesn't render 'false' + hash in the URL - Clean up redundant 'and' in show-source.html GitInfo conditional Assisted-by: opencode:glm-5 * fix: default search provider to fuse instead of none When [Params.search] is absent from config, the provider defaulted to "none" instead of "fuse", disabling search unexpectedly. The search-provider partial now defaults to "fuse" so search works out of the box. Assisted-by: opencode:glm-5 * Apply suggestion from @henryiii
relURL with a leading slash (e.g. "/index.json") produces a server-root path, ignoring the baseURL subpath. Remove the leading slash so relURL correctly prepends the path component (e.g. "/beautifulhugo/index.json" instead of "/index.json"). Also add comment= to example site config. Assisted-by: OpenCode:glm-5
Add callout, include-code, and no-ai-summary shortcodes. Add recipe content type, TOC panel, robot/AI meta tags, view source button, custom HTML hooks, and MathJax support. Replace outdated 'Home page callout' with slide-out TOC panel. Assisted-by: OpenCode:glm-5
Same relURL leading-slash issue as the search index URL: "/css/search.css" and "/js/search.js" with relURL produce server-root paths that ignore the baseURL subpath. Remove leading slashes so they resolve correctly under subpath deployments like /beautifulhugo/. Assisted-by: OpenCode:glm-5
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
…#744) The search page uses type:search, so the header partial generates a search-heading class, but CSS only had rules for page-heading, tags-heading, and categories-heading. This caused the search page title to be left-aligned with inconsistent font sizing compared to other pages. Assisted-by: OpenCode:glm-5
The vendored Bootstrap 5.3.5 CSS does not include [data-bs-theme="dark"]
alert overrides. Since the Beautiful Hugo theme uses a custom
data-theme="dark" attribute, the six main Bootstrap alert types
(primary, secondary, info, success, warning, danger) retained their
light-mode pastel backgrounds and dark text in dark mode, making them
nearly unreadable.
Add explicit [data-theme="dark"] overrides for .alert-{type}.callout
border, background, and text colors (and their .alert-heading colors)
to static/css/dark.css, matching Bootstrap 5's dark emphasis palette.
Assisted-by: OpenCode:Kimi-K2.6
Override Bootstrap tooltip background color from black (#000) to dark grey (#343a40) for better visual appearance. Assisted-by: OpenCode:NRP/kimi
* feat(search): decode HTML entities in search results Add a `decodeHtml` helper function to ensure that HTML-encoded characters in page titles and excerpts are properly decoded before being escaped and rendered in the search results dropdown. This prevents double-encoding or raw entity display in the UI. * refactor: replace DOM element creation with DOMParser for HTML decoding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.