Browse Source

Add search and links to it.

donations
Danila Fedorin 10 months ago
parent
commit
77ae0be899
  1. 14
      content/search.md
  2. BIN
      static/index.st
  3. 2
      themes/vanilla/layouts/partials/header.html
  4. 17
      themes/vanilla/layouts/search/single.html

14
content/search.md

@ -0,0 +1,14 @@
---
title: Search
type: "search"
description: Interactive search for posts on Daniel's personal site.
---
Here's a [Stork](https://github.com/jameslittle230/stork)-powered search for all articles on
this site. Stork takes some time to load on slower devices, which is why this isn't on
every page (or even on the index page). Because the LaTeX rendering occurs _after_
the search indexing, you may see raw LaTeX code in the content of the presented
articles, like `\beta`. This does, however, also mean that you can search for mathematical
symbols using only the English alphabet!
If you're just browsing, you could alternatively check out [all posts](/blog), or perhaps my [favorite articles](/favorites) from this blog.

BIN
static/index.st

Binary file not shown.

2
themes/vanilla/layouts/partials/header.html

@ -8,6 +8,8 @@
<a href="https://github.com/DanilaFe">GitHub</a>
<a href="/Resume-Danila-Fedorin.pdf">Resume</a>
<a href="/tags">Tags</a>
<a href="/favorites">Favorites</a>
<a href="/search">Search</a>
<a href="/blog">All Posts</a>
</div>
</nav>

17
themes/vanilla/layouts/search/single.html

@ -0,0 +1,17 @@
{{ define "main" }}
<h2>{{ .Title }} </h2>
{{ .Content }}
{{ $search := resources.Get "scss/search.scss" | resources.ToCSS | resources.Minify }}
<link rel="stylesheet" href="{{ $search.Permalink }}" media="screen">
<div class="stork-wrapper">
<div class="stork-input-wrapper">
<input class="stork-input" data-stork="blog" placeholder="Search (requires JavaScript)"/>
</div>
<div class="stork-output" data-stork="blog-output"></div>
</div>
<script src="https://files.stork-search.net/stork.js"></script>
<script>stork.register("blog", "/index.st", {"showProgress" : false});</script>
{{ end }}
Loading…
Cancel
Save