diff --git a/README.md b/README.md index c6af196..f105a65 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,6 @@ -[![Netlify Status](https://api.netlify.com/api/v1/badges/8cfa8785-8df8-4aad-ad35-8f1c790b8baf/deploy-status)](https://app.netlify.com/sites/digital-garden-jekyll-template/deploys) +# Digital garden Jekyll template + Searching -# Digital garden Jekyll template - -Use this template repository to get started with your own digital garden. - -**I wrote a tutorial explaining how to set it up: [Setting up your own digital garden with Jekyll](https://maximevaillancourt.com/blog/setting-up-your-own-digital-garden-with-jekyll)** - -Preview the template here: https://digital-garden-jekyll-template.netlify.app/ +A template based off of [this template](https://github.com/maximevaillancourt/digital-garden-jekyll-template), incorporating a Jekyll search plugin from [here](https://github.com/christian-fei/Simple-Jekyll-Search). - Based on Jekyll, a static website generator - Supports Roam-style double bracket link syntax to other notes @@ -15,21 +9,7 @@ Preview the template here: https://digital-garden-jekyll-template.netlify.app/ - Includes graph visualization of the notes and their links - Features a simple and responsive design - Supports Markdown or HTML notes +- *NEW:* Supports searching of existing posts. -Screen Shot 2020-05-19 at 23 05 46 - -## A note about GitHub Pages - -**Update (January 2023)**: it seems that GitHub Pages supports custom plugins now, thanks to GitHub Actions ([view relevant discussion](https://github.com/maximevaillancourt/digital-garden-jekyll-template/discussions/144)). - -GitHub Pages only partially supports this template: to power the interactive notes graph, this template uses a custom Jekyll plugin to generate the graph data in [`notes_graph.json`](https://github.com/maximevaillancourt/digital-garden-jekyll-template/blob/7ac331a4113bac77c993856562acc2bfbde9f2f7/_plugins/bidirectional_links_generator.rb#L102), and [GitHub Pages doesn't support custom Jekyll plugins](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll#plugins). - -If you want to use the graph with GitHub Pages, you may try building your garden locally using Jekyll then pushing the result to GitHub Pages. - -Alternatively, you may deploy your garden to Netlify and it'll work out of the box. [I wrote a guide explaining how to set this up](https://maximevaillancourt.com/blog/setting-up-your-own-digital-garden-with-jekyll). - -If you don't care about the graph, you can simply remove it from this layout, [as explained here](https://github.com/maximevaillancourt/digital-garden-jekyll-template/discussions/132#discussioncomment-3625772). - -## License Source code is available under the [MIT license](LICENSE.md). diff --git a/_pages/search.md b/_pages/search.md new file mode 100644 index 0000000..2830d6f --- /dev/null +++ b/_pages/search.md @@ -0,0 +1,22 @@ +--- +layout: page +title: Search +permalink: /search +--- + + + + + + + + \ No newline at end of file diff --git a/search.json b/search.json new file mode 100644 index 0000000..9cec5b0 --- /dev/null +++ b/search.json @@ -0,0 +1,15 @@ +--- +layout: none +--- +[ + {% for post in site.notes %} + { + "title" : "{{ post.title | escape }}", + "category" : "{{ post.category }}", + "tags" : "{{ post.tags | join: ', ' }}", + "url" : "{{ site.baseurl }}{{ post.url }}", + "date" : "{{ post.date }}", + "content" : "{{ post.content | strip_html | strip_newlines | smartify }}" + } {% unless forloop.last %},{% endunless %} + {% endfor %} +] \ No newline at end of file