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

weru
29.16.2020 4ffb9ad9e94d3a44fec3cb55c6e4865ee9cbb527
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 }}
];