Giter Site home page Giter Site logo

Comments (8)

marcaudefroy avatar marcaudefroy commented on July 3, 2024

Peut-être via lunr.js?

from hugo-theme-learn.

matcornic avatar matcornic commented on July 3, 2024

@gwleclerc avait justement commencé avec Lunr. Mais il avait pas terminé. On espérait que Hugo fournisse un truc automatisé d'ici là ^^.
Mais c'est pas encore le cas.

from hugo-theme-learn.

gwleclerc avatar gwleclerc commented on July 3, 2024

Normalement tout est fonctionnel sur la branche search pour prendre un index lunr.js.
Le problème c'est que la génération de l'index ne peut pas se faire dans le thème. On peut juste s'attendre à ce qu'un fichier JSON soit disponible à un endroit et le prendre comme l'index.

from hugo-theme-learn.

yesnault avatar yesnault commented on July 3, 2024

c'est pas dérangeant que lancer un truc au moment de la génération si besoin.

from hugo-theme-learn.

matcornic avatar matcornic commented on July 3, 2024

Oui, ce n'est pas dérangeant, mais ce serait pas mal qu'Hugo le fasse tout seul, au moment du hugo serve

Parce que dans ce contexte, quand tu es en mode watch (Hugo reprend en compte les modifications), la génération de l'index Lunr ne se fera pas en automatique. Tu es obligé de relancer la génération à la main.

Donc tu perds la simplicité de lancement d'Hugo. C'est pour ça qu'on n'avait pas intégré Lunr directement, en attendant qu'Hugo fasse quelque chose. C'est en cours, mais la milestone n'est pas définie : gohugoio/hugo#1853

from hugo-theme-learn.

yesnault avatar yesnault commented on July 3, 2024

La milestone n'est pas définie et pas prête de l'être visiblement :) Y-a moyen de merger la branche quitte à l'enlever quand ce sera dispo sur hugo ?

from hugo-theme-learn.

gwleclerc avatar gwleclerc commented on July 3, 2024

Je ferais ça ce soir après le meetup go ;)

from hugo-theme-learn.

matcornic avatar matcornic commented on July 3, 2024

Done with Lunr ! https://matcornic.github.io/hugo-learn-doc/basics/installation/#enable-search-functionality

Could be re-opened if Hugo makes search native.

from hugo-theme-learn.

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.