zwbetz-gh / hugo-client-side-search-template Goto Github PK
View Code? Open in Web Editor NEWA lightweight, fuzzy, client-side search template for Hugo
Home Page: https://hugo-client-side-search-template.netlify.app/
License: MIT License
A lightweight, fuzzy, client-side search template for Hugo
Home Page: https://hugo-client-side-search-template.netlify.app/
License: MIT License
I wanted to change the URL param from query
to campaign=search&ref
(for goatcounter tracking) but the characters =
and &
are being escaped in the browser. How to prevent this?
I want to do something like {{ with .Params.summary }}{{ "Summary" (.Content | plainify) }}{{ end }}
for one field in the JSON file. But since your code uses 'dict', I am unsure of how to do that. Do you have any idea how to achieve it?
Is it possible to introduce an option to clear the search box of whatever is typed in there?
Tested even with your own site. Shouldn't spaces be %20
? It seems the %
is being encoded also.
Hi there,
to make results easier to scan, search terms could be highlighted, like in these examples:
Thanks for sharing this repo!
Hi there. Do you have an idea how the JS file could be modified to support several index.json
files based on site language? For example, index.json
and /fr/index.json
. So that, when the language is switched, the relevant index file content is pulled?
How about replacing the style="background-color: #fff3cd;"
with a CSS class instead? The code threw errors in my server due to Content Security Policy.
Thank you sir for making this amazingly clean theme opensource.
I've tried to make the content searchable and have put some text in the .md files
I've added to index.json.json:
"content" .Plain
and "content" (.Content | plainify)
But it doesn't seem to work form me.
Is it possible that you help me do it ?
Thank you again for sharing, for your time, and for your support.
`{{- $list := slice -}}
{{- range site.RegularPages.ByPublishDate.Reverse -}}
{{- $item := dict
"title" .Title
"content" .Plain
"country" .Params.country
"crew" .Params.crew
"vehicle" .Params.vehicle
"param_date" .Params.param_date
"duration" .Params.duration
"purpose" .Params.purpose
"url" .RelPermalink -}}
{{- $list = $list | append $item -}}
{{- end -}}
{{- $list | jsonify -}}`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.