Giter Club home page Giter Club logo

hugo-client-side-search-template's People

Contributors

zwbetz-gh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hugo-client-side-search-template's Issues

Prevent characters from being escaped

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?

Show summary conditionally

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?

Clear search option

Is it possible to introduce an option to clear the search box of whatever is typed in there?

Multilingual support

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?

Avoid inline CSS

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.

Searching the post content | Request

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 -}}`

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.