mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-12-24 01:42:10 +00:00
Various fixes for hidden service
- Formatting fix for indieweb icon - Support searching directly on hidden service
This commit is contained in:
parent
2bae1cb224
commit
916b089a4f
3 changed files with 7 additions and 7 deletions
|
@ -1,13 +1,13 @@
|
|||
{{- $actionBase := "https:/seirdy.one/" -}}
|
||||
{{- if (in site.BaseURL ".onion") -}}
|
||||
{{- $actionBase = site.BaseURL -}}
|
||||
{{- $action := "https:/seirdy.one/search/" -}}
|
||||
{{- if or (in site.BaseURL ".onion") -}}
|
||||
{{- $action = "http://wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion/search/" -}}
|
||||
{{- end -}}
|
||||
<form
|
||||
itemprop="potentialAction" itemscope="" itemtype="https://schema.org/SearchAction"
|
||||
action="{{ $actionBase }}search/" method="get" role="search">
|
||||
action="{{ $action }}" method="get" role="search">
|
||||
<label for="search" itemscope="" itemprop="target" itemtype="https://schema.org/EntryPoint">
|
||||
Search this site (powered by the <a rel="nofollow" href="https://searchmysite.net/">Search My Site</a> API):
|
||||
<meta itemprop="urlTemplate" content="http://seirdy.one/search?q={q}" />
|
||||
<meta itemprop="urlTemplate" content="{{ $action }}?q={q}" />
|
||||
</label>
|
||||
<div><!--We need the extra divs to serve as pseudo-table-cells.-->
|
||||
<input itemprop="query-input" id="search" type="search" required="" name="q" />
|
||||
|
|
|
@ -11,4 +11,4 @@
|
|||
<img class="u-photo photo" width="16" height="16" alt=""
|
||||
src="{{ $favicon_bigpng.RelPermalink }}" />
|
||||
</picture>
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
|
|
|
@ -34,7 +34,7 @@ sed 7d "$html_file" | xmllint --format --encode UTF-8 --noent - | sd '^\t' '' >"
|
|||
| sd '<pre(?: tabindex="0")?>\n\t*<(code|samp)( |>)' '<pre tabindex="0"><$1$2' \
|
||||
| sd '(?:\n)?</(code|samp)>\n(?:[\t\s]*)?</pre>' '</$1></pre>' \
|
||||
| sd '</span>.span itemprop="familyName"' '</span> <span itemprop="familyName"' \
|
||||
| sd '</picture><span itemprop="name" class="p-name fn n">' '</picture> <span itemprop="name" class="p-name fn n">' \
|
||||
| sd '(</picture>|src="[^"]*" ?/>)<span itemprop="name" class="p-name fn n">' '$1 <span itemprop="name" class="p-name fn n">' \
|
||||
| sd '([a-z])<(data|time)' '$1 <$2'
|
||||
} >>"$xhtml_file"
|
||||
|
||||
|
|
Loading…
Reference in a new issue