pelican-plugins / search

Pelican plugin that adds site search capability
49 stars 9 forks source link

`search.toml` doesn't add `SITEURL` before `url` #26

Closed baseplate-admin closed 1 year ago

baseplate-admin commented 1 year ago

Issue

So when indexing with stork i have this file as search.toml

[input]
base_directory = "output"
html_selector = "main"

[[input.files]]
path = "how-i-added-daphne-server-dectection-to-wappalyzer.html"
url = "/how-i-added-daphne-server-dectection-to-wappalyzer.html"
title = "How I added daphne server dectection to wappalyzer"

[[input.files]]
path = "how-i-lost-my-first-pc.html"
url = "/how-i-lost-my-first-pc.html"
title = "How I lost my first PC"

[[input.files]]
path = "how-i-fell-in-love-with-honeyworks.html"
url = "/how-i-fell-in-love-with-honeyworks.html"
title = "How I fell in love with Honeyworks"

[[input.files]]
path = "how-i-fixed-htmx-redeclaration-of-let-element-with-hx-boosttrue.html"
url = "/how-i-fixed-htmx-redeclaration-of-let-element-with-hx-boosttrue.html"
title = "How I fixed htmx redeclaration of let element with hx-boost=true"

But if you see my site it is hosted on https://baseplate-admin.github.io/blog/

So whenever i search within my site the links all point to https://baseplate-admin.github.io/ + filename

The solution i would like :

Add SITEURL before url so that the search.toml becomes like this :

[input]
base_directory = "output"
html_selector = "main"

[[input.files]]
path = "how-i-added-daphne-server-dectection-to-wappalyzer.html"
url = "https://baseplate-admin.github.io/blog//how-i-added-daphne-server-dectection-to-wappalyzer.html"
title = "How I added daphne server dectection to wappalyzer"

[[input.files]]
path = "how-i-lost-my-first-pc.html"
url = "https://baseplate-admin.github.io/blog//how-i-lost-my-first-pc.html"
title = "How I lost my first PC"

[[input.files]]
path = "how-i-fell-in-love-with-honeyworks.html"
url = "https://baseplate-admin.github.io/blog//how-i-fell-in-love-with-honeyworks.html"
title = "How I fell in love with Honeyworks"

[[input.files]]
path = "how-i-fixed-htmx-redeclaration-of-let-element-with-hx-boosttrue.html"
url = "https://baseplate-admin.github.io/blog//how-i-fixed-htmx-redeclaration-of-let-element-with-hx-boosttrue.html"
title = "How I fixed htmx redeclaration of let element with hx-boost=true"
justinmayer commented 1 year ago

Duplicate of existing issue.

baseplate-admin commented 1 year ago

Yep i just saw this :)

Sorry for the noise