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

weru
04.29.2020 9b7447f9d319a5581468a536489d39c3fc93aa57
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": "{{ .RelPermalink }}",
    "title": "{{ .Title }}",
    "body": "{{ .PlainWords }}",
  });
  {{ end }}
});
 
const simpleIndex = [
  {{ range $index, $page := .Site.Pages }}
   {
     id: {{ $index }},
     link: "{{ .RelPermalink }}",
     title: "{{ .Title }}",
   },
  {{ end }}
];