mirror of
https://github.com/alvierahman90/gronk.git
synced 2025-10-13 16:04:29 +00:00
Compare commits
4 Commits
41cadb0354
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
fa8840d25e | ||
|
07ece47980 | ||
6638c72230
|
|||
44e5da27cc
|
4
gronk.py
4
gronk.py
@@ -443,7 +443,8 @@ def generate_permalink_page(output_dir):
|
|||||||
dir = output_dir.joinpath('permalink')
|
dir = output_dir.joinpath('permalink')
|
||||||
dir.mkdir(exist_ok=True)
|
dir.mkdir(exist_ok=True)
|
||||||
dir.joinpath('index.html').write_text(
|
dir.joinpath('index.html').write_text(
|
||||||
JINJA_TEMPLATE_PERMALINK.render(gronk_commit=GRONK_COMMIT,
|
JINJA_TEMPLATE_PERMALINK.render(title="redirecting... | gronk",
|
||||||
|
gronk_commit=GRONK_COMMIT,
|
||||||
data=FILEMAP.get_uuid_map()))
|
data=FILEMAP.get_uuid_map()))
|
||||||
|
|
||||||
|
|
||||||
@@ -555,6 +556,7 @@ def main(args):
|
|||||||
posts=posts,
|
posts=posts,
|
||||||
)
|
)
|
||||||
root_properties['dst_path']['raw'].joinpath('feed.xml').write_text(rss)
|
root_properties['dst_path']['raw'].joinpath('feed.xml').write_text(rss)
|
||||||
|
root_properties['dst_path']['raw'].joinpath('rss.xml').write_text(rss)
|
||||||
|
|
||||||
#pprint.pprint(root_properties)
|
#pprint.pprint(root_properties)
|
||||||
# render index
|
# render index
|
||||||
|
@@ -6,7 +6,7 @@ const TITLE = "title"
|
|||||||
const SEARCH_TIMEOUT_MS = 100
|
const SEARCH_TIMEOUT_MS = 100
|
||||||
var SEARCH_TIMEOUT_ID = -1
|
var SEARCH_TIMEOUT_ID = -1
|
||||||
|
|
||||||
const fuse = new Fuse(data, {
|
const fuse = new Fuse(search_data, {
|
||||||
keys: [ 'title' ],
|
keys: [ 'title' ],
|
||||||
ignoreLocation: true,
|
ignoreLocation: true,
|
||||||
threshhold: 0.4,
|
threshhold: 0.4,
|
||||||
@@ -30,7 +30,7 @@ function updateResults() {
|
|||||||
console.log("updating results")
|
console.log("updating results")
|
||||||
resultsDiv.innerHTML = ''
|
resultsDiv.innerHTML = ''
|
||||||
if (searchBar.value) results = fuse.search(searchBar.value, { limit: RESULTS_MAX }).map(r => r.item)
|
if (searchBar.value) results = fuse.search(searchBar.value, { limit: RESULTS_MAX }).map(r => r.item)
|
||||||
else results = data
|
else results = search_data
|
||||||
|
|
||||||
results.forEach(r => {
|
results.forEach(r => {
|
||||||
wrapper = document.createElement('li')
|
wrapper = document.createElement('li')
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<p>
|
<p>
|
||||||
You should be being redirected...
|
You should be being redirected...
|
||||||
|
Reference in New Issue
Block a user