Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error for missing breadcrumbs (scientific-python/blog.scientific-python.org#158) #584

Conversation

alphapapa
Copy link
Contributor

@alphapapa alphapapa commented Apr 12, 2024

  • layouts/partials/breadcrumbs.html: Log an error and fail the build
    if a breadcrumb is missing (i.e. if a page used in a breadcrumb has a
    missing "title" field in its front matter).

This only applies to content pages which are referred to in
breadcrumbs; other pages are still allowed to not have titles.

See scientific-python/blog.scientific-python.org#158.

Output from the build (e.g. make serve-dev) looks like:

Start building sites … 
hugo v0.120.3-a4892a07b41b7b3f1f143140ee4ec0a9a5cf3970+extended linux/amd64 BuildDate=2023-11-01T17:57:00Z VendorInfo=gohugoio

ERROR Missing breadcrumb: Page has no "title" field.  Filename:"/home/me/src/scientific-python-hugo-theme/blog/content/posts/scipy/internships/_index.md"
Total in 953 ms
Error: error building site: logged 1 error(s)
make: *** [Makefile:68: blog] Error 1

Copy link

netlify bot commented Apr 12, 2024

Deploy Preview for scientific-python-hugo-theme ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 472c9c6
🔍 Latest deploy log https://app.netlify.com/sites/scientific-python-hugo-theme/deploys/6627f04c226ba30008f663a3
😎 Deploy Preview https://deploy-preview-584--scientific-python-hugo-theme.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 80
Accessibility: 100
Best Practices: 100
SEO: 83
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@alphapapa alphapapa self-assigned this Apr 12, 2024
@alphapapa
Copy link
Contributor Author

Note that the deployment failure is due to the newly introduced check: https://app.netlify.com/sites/scientific-python-hugo-theme/deploys/6618df4e90d3a700082594cd#L152 It should pass after scientific-python/blog.scientific-python.org#215 is merged.

@alphapapa alphapapa force-pushed the wip/blog-158-missing-breadcrumbs branch from 070d63c to 1ff7b13 Compare April 23, 2024 17:27
@alphapapa alphapapa added the type: Enhancement New feature or request label Apr 23, 2024
@alphapapa
Copy link
Contributor Author

@stefanv @jarrodmillman This should be ready to merge now.

…on.org#158)

* layouts/partials/breadcrumbs.html: Log an error and fail the build
if a breadcrumb is missing (i.e. if a page used in a breadcrumb has a
missing "title" field in its front matter).

This only applies to content pages which are referred to in
breadcrumbs; other pages are still allowed to not have titles.

See <scientific-python/blog.scientific-python.org#158>.
@alphapapa alphapapa force-pushed the wip/blog-158-missing-breadcrumbs branch from 1ff7b13 to 472c9c6 Compare April 23, 2024 17:30
@jarrodmillman jarrodmillman merged commit 6199d83 into scientific-python:main Apr 23, 2024
6 checks passed
@jarrodmillman jarrodmillman added this to the 0.17 milestone Apr 23, 2024
@alphapapa alphapapa deleted the wip/blog-158-missing-breadcrumbs branch April 23, 2024 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants