Code Monkey home page Code Monkey logo

Comments (5)

bglw avatar bglw commented on September 25, 2024 2

Hello @psaikido πŸ‘‹

With the standard steps and Hugo, Pagefind will only be seen on Pagefind's dev server, as Hugo serves from its own memory and not from the public directory. When running Pagefind with --serve you'll get a Pagefind dev server to test the search with.

There is a way locally to get Pagefind visible through your Hugo dev server, but it requires a couple of extra steps. There's a good guide here from Bryce & RΓ©gis: https://www.brycewray.com/posts/2022/07/pagefind-quite-find-site-search/#update-2021-07-31

from pagefind.

bglw avatar bglw commented on September 25, 2024

Partially implemented β€” Pagefind now supports --serve but does not yet implement --watch

from pagefind.

psaikido avatar psaikido commented on September 25, 2024

For me, running pagefind against my hugo site on my dev server should result in me being able to use it on that server. The ui js and css lives at _pagefind/pagefind/ which is in the public dir. Fine for live but not when running 'hugo server'. This cannot then be tested and makes the project fall at the starting line.

from pagefind.

psaikido avatar psaikido commented on September 25, 2024

If it's super simple to set up on a development machine and I'm just too tired to figure it out, maybe there should be instructions on the 'getting started' pages.

from pagefind.

psaikido avatar psaikido commented on September 25, 2024

Champion! Those extra steps have helped and it's working now. The standard steps with pagefinder and hugo are for a live server since it outputs the index to 'public'. Hugo running locally gets its sources from 'static'. The help pages seem to assume that folks will go directly to live with no intermediate steps whatsoever. This seems unlikely and I'd suggest modifying the instructions at https://pagefind.app/docs/ especially where it says "bask in how easy that was to integrate" ;)

from pagefind.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.