Closed cjyabraham closed 8 months ago
Name | Link |
---|---|
Latest commit | f3cfc11f06c130f1932c5311144761e7baa1ca88 |
Latest deploy log | https://app.netlify.com/sites/dot-org-hugo-theme-demo-thetwopct/deploys/65aea1df346129000830dcdf |
Deploy Preview | https://deploy-preview-37--dot-org-hugo-theme-demo-thetwopct.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Name | Link |
---|---|
Latest commit | f3cfc11f06c130f1932c5311144761e7baa1ca88 |
Latest deploy log | https://app.netlify.com/sites/dot-org-hugo-theme-demo/deploys/65aea1dfc25e7e00083350e7 |
Deploy Preview | https://deploy-preview-37--dot-org-hugo-theme-demo.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
@cjyabraham Do you think adding the search to the site/header should be a theme option?
@cjyabraham A few things popped up when running locally
1) Was it intentional to leave out this data-pagefind-body
attribute as currently the header and footer are searched, which could give some poor results.
[Parsing files]
Did not find a data-pagefind-body element on the site.
↳ Indexing all <body> elements on the site.
2) There is no /es/demo-page, so maybe Hugo is using the en language content? If Hugo does that, I wonder if we need to add some smarts to the head of the page to detect it (I'm still not 100% sure how the languages/fallover/works)
[Reading languages]
* "/es/demo-page/" has no html lang attribute
3) I find the Search icon a little bold and jarring. There is a thinner one in the TODO branding icons section which matches the font a little closer. I will swap that in and add a hover color change.
4) Locally, I cannot get the search bar to appear on the page, the paths are not valid
I've played about with this and cannot get it to load. I also cannot reach the public/pagefind/ file directly (404 error) even though the files exist.
data-pagefind-body
here. You may need to build your site first before you run pagefind?@cjyabraham Do you think adding the search to the site/header should be a theme option?
Yes, good idea.
This addresses #35 by integrating Pagefind search.
Preview: https://deploy-preview-37--dot-org-hugo-theme-demo-jh.netlify.app/
It adds the search icon to the topnav on both mobile and desktop. It also demonstrates language-specific search results in both English and Spanish.
You can set up your own local instance of this following these instructions.