mirror of
https://github.com/tcsenpai/obsidiangarden_netlify.git
synced 2025-06-07 13:15:20 +00:00
Use dghomelink as toggle for navbar
This commit is contained in:
parent
eee9e9aa5f
commit
9f477fb3ab
@ -1,3 +1,4 @@
|
|||||||
|
{%if settings.dgHomeLink === true%}
|
||||||
<nav class="navbar">
|
<nav class="navbar">
|
||||||
<div class="navbar-inner">
|
<div class="navbar-inner">
|
||||||
<a href="/" style="text-decoration: none;">
|
<a href="/" style="text-decoration: none;">
|
||||||
@ -8,3 +9,10 @@
|
|||||||
{% include "components/searchButton.njk" %}
|
{% include "components/searchButton.njk" %}
|
||||||
{%endif%}
|
{%endif%}
|
||||||
</nav>
|
</nav>
|
||||||
|
{%else%}
|
||||||
|
<div class="empty-navbar" >
|
||||||
|
{% if settings.dgEnableSearch === true%}
|
||||||
|
{% include "components/searchButton.njk" %}
|
||||||
|
{%endif%}
|
||||||
|
</div>
|
||||||
|
{%endif%}
|
@ -1,3 +1,4 @@
|
|||||||
|
require("dotenv").config()
|
||||||
const lunrjs = require('lunr');
|
const lunrjs = require('lunr');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
@ -15,6 +16,8 @@ function createIndex(posts) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (process.env.dgEnableSearch) {
|
||||||
const data = require('../../netlify/functions/search/data.json');
|
const data = require('../../netlify/functions/search/data.json');
|
||||||
const index = createIndex(data);
|
const index = createIndex(data);
|
||||||
require('fs').writeFileSync(path.join(__dirname, '../../netlify/functions/search/index.json'), JSON.stringify(index));
|
require('fs').writeFileSync(path.join(__dirname, '../../netlify/functions/search/index.json'), JSON.stringify(index));
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user