Skip to content

Commit ff3f684

Browse files
author
fabianmoronzirfas
committed
feat(add description to search index):
1 parent 0c19942 commit ff3f684

File tree

7 files changed

+5144
-10
lines changed

7 files changed

+5144
-10
lines changed

_layouts/entry.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
{% include entry-card.html entry=page ispage=true %}
1515
{{content}}
1616

17-
<script type="text/javascript">
18-
$(document).ready(function(){
19-
$('.yesscript').show();
20-
});
21-
</script>
2217
<div class="yesscript">
2318
<a href="#" onClick="history.go(-1);return true;">☚ back to reference</a>
2419
</div>
2520
<noscript>
2621
<a href="/reference/">☚ back to reference</a>
2722
</noscript>
23+
<script type="text/javascript">
24+
document.addEventListener('DOMContentLoaded',function() {
25+
document.querySelector('.yesscript').style.display = '';
26+
});
27+
</script>
2828
<!-- end layout entry -->

assets/js/main.bundle.js

Lines changed: 522 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/main.bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/reference.bundle.js

Lines changed: 4612 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/reference.bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/src/reference.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ document.addEventListener('DOMContentLoaded',function() {
6060
this.ref('id');
6161
this.field('summary');
6262
this.field('codetitle');
63+
this.field('name');
64+
this.field('description');
6365
json.forEach(function(doc){
6466
this.add(doc);
6567
}, this);

reference/lunrjs.data.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
---
3-
[{%- for element in site.data.cats-and-subcats -%}{%- for ele in element -%}{%- for entry in ele.entries -%}{%- assign eid = entry.name | downcase -%} { "id":"{{eid}}","name":"{{entry.name }}","codetitle":"{{ entry.codetitle }}","href":"/reference/{{ele.cat}}/{{entry.name}}.html","summary":"{%- if entry.summary != null -%}{{ entry.summary | strip_newlines | escape }}{%- else -%}{{ entry.description | truncate: 150, '...' | markdownify | strip_html | strip_newlines | escape }}
3+
[{%- for element in site.data.cats-and-subcats -%}{%- for ele in element -%}{%- for entry in ele.entries -%}{%- assign eid = entry.name | downcase -%} { "id":"{{eid}}","name":"{{entry.name }}","codetitle":"{{ entry.codetitle }}","description":"{{entry.description | markdownify | strip_html | strip_newlines | escape}}","href":"/reference/{{ele.cat}}/{{entry.name}}.html","summary":"{%- if entry.summary != null -%}{{ entry.summary | strip_newlines | escape }}{%- else -%}{{ entry.description | truncate: 150, '...' | markdownify | strip_html | strip_newlines | escape }}
44
{%- endif -%}" } {%- if forloop.last != true -%},{%-endif-%}{%- endfor -%}{%- if forloop.last != true -%},{%-endif-%}{%- endfor -%}{%- if forloop.last != true -%},{%-endif-%}{%- endfor -%}]

0 commit comments

Comments
 (0)