mirror of https://github.com/onweru/compose.git

weru
24.30.2020 e543492939413e09a8a872f7345a6006376b6619
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const idx = lunr(function () {
  this.field('id')
  this.field('link')
  this.field('title')
  this.field('body')
 
  {{ range $index, $page := .Site.Pages }}
  this.add({
    "id": "{{ $index }}",
    "link": "{{ .Permalink }}",
    "title": "{{ .Title }}",
    "body": "{{ .PlainWords }}",
  });
  {{ end }}
});
 
const simpleIndex = [
  {{ range $index, $page := .Site.Pages }}
   {
     id: {{ $index }},
     link: "{{ .Permalink }}",
     title: "{{ .Title }}",
   },
  {{ end }}
];