-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide example usage for other static site generatos #10
Comments
Jekyll example: https://learn.cloudcannon.com/jekyll/output-json/ |
Pelican has a plugin called Tipue Search (https://github.com/getpelican/pelican-plugins/tree/master/tipue_search) which uses a javascript variable json similar to the tinysearch - it would be interesting to see if tinysearch is scalable for a medium sized blog |
Hugo - Seems they usually build external tools to generate search indexes, see https://gohugo.io/tools/search/ To do it natively you build a template and adding it as "export" format
File will be in |
Thanks @Lusitaniae, |
Anyone wants to tackle Jekyll or Pelican? |
To implement it in Hugo, you can have a simpler setup : layout/_default/list.json.json
and config.toml
( if you only put json, you won't build your site and your rss anymore). It's a bit simpler and doesn't break the site. |
Hello! Figured this out for Pelican to add to our website. You need a [
{%- for article in articles -%}
{% if article.status != "draft" %}
{
"title": {{ article.title | striptags | tojson | safe }},
"url": {{ article.url | tojson | safe }},
"body": {{ article.content | striptags | tojson | safe }}
}{% if not loop.last %},{% endif %}
{% endif %}
{%- endfor -%}
] and a Title: JSON
Template: json
Slug: json Then, after running Shall I make a PR? |
Nice! PR would be very welcome. 😊 |
Doing that generates a |
Sorry for the late response. I don't know what might cause this. |
We need to add some usage examples for
For the most part, this means showing how to create an
index.json
as shown in/fixtures/index.json
from this repo.For example, I'm using the following template file for zola:
If someone wants to tackle this, feel free to add a comment here so that others know you're working on this. You can also create a pull request straight away.
The text was updated successfully, but these errors were encountered: