Compare commits

..

2 commits
v3 ... master

26 changed files with 294 additions and 117 deletions

View file

@ -1,10 +1,3 @@
## 3.0.0
### Breaking changes
- Removed Tipue Search, use [Pelican Search](https://github.com/pelican-plugins/search) instead.
- Removed StatusCake integration
## 2.5.0
- Support Stork Search plugin [#298](https://github.com/alexandrevicenzi/Flex/pull/298)

View file

@ -63,6 +63,7 @@ Once 2.6 is out, the `v3` branch will be merged into `master`.
- [Representative image](https://github.com/getpelican/pelican-plugins/tree/master/representative_image)
- [Neighbors](https://github.com/getpelican/pelican-plugins/tree/master/neighbors)
- [Pelican Search](https://github.com/pelican-plugins/search)
- [Tipue Search](https://github.com/getpelican/pelican-plugins/blob/master/tipue_search/) (deprecated)
- [SEO](https://github.com/pelican-plugins/seo)
## Install

View file

@ -1,9 +0,0 @@
Title: Series Example - Article 1
Date: 2023-04-01 08:00
Modified: 2023-04-01 08:00
Category: Examples
Series: Series Example
Tags: theme, examples
Slug: series-example-article-1
This is the first article.

View file

@ -1,9 +0,0 @@
Title: Series Example - Article 2
Date: 2023-04-01 09:00
Modified: 2023-04-01 09:00
Category: Examples
Series: Series Example
Tags: theme, examples
Slug: series-example-article-2
This is the second article.

View file

@ -1,9 +0,0 @@
Title: Series Example - Article 3
Date: 2023-04-01 10:00
Modified: 2023-04-01 10:00
Category: Examples
Series: Series Example
Tags: theme, examples
Slug: series-example-article-3
This is the third article.

View file

@ -1,9 +0,0 @@
Title: Series Example - Article 4
Date: 2023-04-01 11:00
Modified: 2023-04-01 11:00
Category: Examples
Series: Series Example
Tags: theme, examples
Slug: series-example-article-4
This is the fourth article.

View file

@ -1,9 +0,0 @@
Title: Series Example - Article 5
Date: 2023-04-01 12:00
Modified: 2023-04-01 12:00
Category: Examples
Series: Series Example
Tags: theme, examples
Slug: series-example-article-5
This is the fifth article.

4
static/tipuesearch/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
#tipue_search_input{font-family:Source Sans Pro,Roboto,Open Sans,Liberation Sans,DejaVu Sans,Verdana,Helvetica,Arial,sans-serif;color:#333;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#f3f3f3;border:none;padding:9px 0 10px 18px;border-radius:3px;-moz-appearance:none;-webkit-appearance:none;box-sizing:border-box;box-shadow:none;outline:0;margin:0}#tipue_search_input:-webkit-autofill,#tipue_search_input:-webkit-autofill:focus,#tipue_search_input:-webkit-autofill:hover{-webkit-box-shadow:0 0 0 1000px #f3f3f3 inset}.tipue_search_button{position:relative;float:left;width:49px;height:56px;margin-left:-3px;background-color:#f3f3f3;border:none;border-top-right-radius:3px;border-bottom-right-radius:3px;box-sizing:border-box;cursor:pointer;outline:0}.tipue_search_icon{float:left;font:24px/1 'Open Sans',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#333;transform:rotate(-45deg);-moz-appearance:none;-webkit-appearance:none;box-sizing:border-box;box-shadow:none;outline:0;margin:-1px 0 0 16px}.tipue_search_group:after{content:"";display:table;clear:both}#tipue_search_content{max-width:100%;margin:0}.tipue_search_content_title{font-family:Source Sans Pro,Roboto,Open Sans,Liberation Sans,DejaVu Sans,Verdana,Helvetica,Arial,sans-serif;font-weight:300;line-height:1.1;font-size:2em}.tipue_search_content_title a{color:#d9411e;text-decoration:none}.tipue_search_content_title a:hover{color:#ff5a09}.tipue_search_result{margin:0 8% 2%;line-height:inherit}#tipue_search_results_count,.tipue_search_content_debug{font-family:Source Sans Pro,Roboto,Open Sans,Liberation Sans,DejaVu Sans,Verdana,Helvetica,Arial,sans-serif;text-transform:uppercase;color:#999;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#tipue_search_results_count{padding-top:9px}#tipue_search_error,#tipue_search_replace,.tipue_search_content_url,.tipue_search_note,.tipue_search_related{font-family:Source Sans Pro,Roboto,Open Sans,Liberation Sans,DejaVu Sans,Verdana,Helvetica,Arial,sans-serif;color:#666;padding-top:7px;word-wrap:break-word;hyphens:auto}#tipue_search_replace a,#tipue_search_replace a:hover,.tipue_search_content_url a,.tipue_search_note a,.tipue_search_related a{color:#339e41;text-decoration:none}.tipue_search_content_url a:hover,.tipue_search_note a:hover,.tipue_search_related a:hover{color:#666}#tipue_search_replace,.tipue_search_related{margin-top:7px}#tipue_search_error{color:#333;margin-top:17px}.tipue_search_content_text{margin:0;padding:0;background-color:#fff;color:#242121;font-family:Source Sans Pro,Roboto,Open Sans,Liberation Sans,DejaVu Sans,Verdana,Helvetica,Arial,sans-serif;font-size:1.02em;line-height:1.2em}.tipue_search_content_bold{font-weight:bold;color:#333}.tipue_search_content_debug{margin:7px 0 2px 0}.tipue_search_image{padding:17px 0 6px 0}.tipue_search_img{width:100%;max-width:330px;height:auto;transition:.5s;border-radius:2px}.tipue_search_img:hover{opacity:.9}#tipue_search_zoom_text{font:12px/1.7 'Source Code Pro',monospace;color:#ccc;text-transform:uppercase;letter-spacing:1px;padding-top:9px}#tipue_search_zoom_text a{color:#ccc;text-decoration:none;border-bottom:2px solid #f7f7f7}#tipue_search_zoom_text a:hover{border:0}.tipue_search_image_zoom{cursor:pointer}#tipue_search_image_modal{display:none;position:fixed;z-index:1000;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgba(0,0,0,.9)}.tipue_search_image_close{position:absolute;top:0;right:0;font:22px/1 'Source Code Pro',monospace;color:#ccc;padding:25px 30px;cursor:pointer}.tipue_search_image_block{margin:0 auto;max-width:900px;padding:73px 30px 30px 30px;box-sizing:border-box;color:#fff}#tipue_search_zoom_img{max-width:100%;height:auto}#tipue_search_zoom_text,.tipue_search_zoom_options{padding-top:9px}#tipue_search_foot{margin:51px 0 21px 0}#tipue_search_foot_boxes{font:14px 'Source Code Pro',sans-serif;text-transform:uppercase;color:#333;padding:0;margin:0;cursor:pointer}#tipue_search_foot_boxes li{display:inline;list-style:none;margin:0;padding:0}#tipue_search_foot_boxes li a{background-color:#f7f7f7;color:#666;padding:10px 17px 11px 17px;border-radius:3px;margin-right:7px;text-decoration:none;text-align:center;transition:.3s}#tipue_search_foot_boxes li.current{background:#252525;color:#ccc;padding:10px 17px 11px 17px;border-radius:3px;margin-right:7px;text-align:center}#tipue_search_foot_boxes li a:hover{background:#252525;color:#ccc}

181
static/tipuesearch/tipuesearch.min.js vendored Normal file
View file

@ -0,0 +1,181 @@
(function($){$.fn.tipuesearch=function(options){var set=$.extend({'contextBuffer':60,'contextLength':60,'contextStart':90,'debug':false,'descriptiveWords':25,'footerPages':3,'highlightTerms':true,'imageZoom':true,'minimumLength':3,'newWindow':false,'show':10,'showContext':true,'showRelated':true,'showTime':true,'showTitleCount':true,'showURL':false,'wholeWords':true},options);return this.each(function(){var tipuesearch_t_c=0;var tipue_search_w='';if(set.newWindow)
{tipue_search_w=' target="_blank"';}
function getURLP(name)
{var locSearch=location.search;var splitted=(new RegExp('[?|&]'+name+'='+'([^&;]+?)(&|#|;|$)').exec(locSearch)||[,""]);var searchString=splitted[1].replace(/\+/g,'%20');try
{searchString=decodeURIComponent(searchString);}
catch(e)
{searchString=unescape(searchString);}
return searchString||null;}
if(getURLP('q'))
{$('#tipue_search_input').val(getURLP('q'));getTipueSearch(0,true);}
$(this).keyup(function(event)
{if(event.keyCode=='13')
{getTipueSearch(0,true);}});function getTipueSearch(start,replace)
{window.scrollTo(0,0);var out='';var show_replace=false;var show_stop=false;var standard=true;var c=0;var found=[];var d_o=$('#tipue_search_input').val();d_o=d_o.replace(/\+/g,' ').replace(/\s\s+/g,' ');d_o=$.trim(d_o);var d=d_o.toLowerCase();if((d.match("^\"")&&d.match("\"$"))||(d.match("^'")&&d.match("'$")))
{standard=false;}
var d_w=d.split(' ');if(standard)
{d='';for(var i=0;i<d_w.length;i++)
{var a_w=true;for(var f=0;f<tipuesearch_stop_words.length;f++)
{if(d_w[i]==tipuesearch_stop_words[f])
{a_w=false;show_stop=true;}}
if(a_w)
{d=d+' '+d_w[i];}}
d=$.trim(d);d_w=d.split(' ');}
else
{d=d.substring(1,d.length-1);}
if(d.length>=set.minimumLength)
{if(standard)
{if(replace)
{var d_r=d;for(var i=0;i<d_w.length;i++)
{for(var f=0;f<tipuesearch_replace.words.length;f++)
{if(d_w[i]==tipuesearch_replace.words[f].word)
{d=d.replace(d_w[i],tipuesearch_replace.words[f].replace_with);show_replace=true;}}}
d_w=d.split(' ');}
var d_t=d;for(var i=0;i<d_w.length;i++)
{for(var f=0;f<tipuesearch_stem.words.length;f++)
{if(d_w[i]==tipuesearch_stem.words[f].word)
{d_t=d_t+' '+tipuesearch_stem.words[f].stem;}}}
d_w=d_t.split(' ');for(var i=0;i<tipuesearch.pages.length;i++)
{var score=0;var s_t=tipuesearch.pages[i].text;for(var f=0;f<d_w.length;f++)
{if(set.wholeWords)
{var pat=new RegExp('\\b'+d_w[f]+'\\b','gi');}
else
{var pat=new RegExp(d_w[f],'gi');}
if(tipuesearch.pages[i].title.search(pat)!=-1)
{var m_c=tipuesearch.pages[i].title.match(pat).length;score+=(20*m_c);}
if(tipuesearch.pages[i].text.search(pat)!=-1)
{var m_c=tipuesearch.pages[i].text.match(pat).length;score+=(20*m_c);}
if(tipuesearch.pages[i].tags)
{if(tipuesearch.pages[i].tags.search(pat)!=-1)
{var m_c=tipuesearch.pages[i].tags.match(pat).length;score+=(10*m_c);}}
if(tipuesearch.pages[i].url.search(pat)!=-1)
{score+=20;}
if(score!=0)
{for(var e=0;e<tipuesearch_weight.weight.length;e++)
{if(tipuesearch.pages[i].url==tipuesearch_weight.weight[e].url)
{score+=tipuesearch_weight.weight[e].score;}}}
if(d_w[f].match('^-'))
{pat=new RegExp(d_w[f].substring(1),'i');if(tipuesearch.pages[i].title.search(pat)!=-1||tipuesearch.pages[i].text.search(pat)!=-1||tipuesearch.pages[i].tags.search(pat)!=-1)
{score=0;}}}
if(score!=0)
{found.push({"score":score,"title":tipuesearch.pages[i].title,"desc":s_t,"img":tipuesearch.pages[i].img,"url":tipuesearch.pages[i].url,"note":tipuesearch.pages[i].note});c++;}}}
else
{for(var i=0;i<tipuesearch.pages.length;i++)
{var score=0;var s_t=tipuesearch.pages[i].text;var pat=new RegExp(d,'gi');if(tipuesearch.pages[i].title.search(pat)!=-1)
{var m_c=tipuesearch.pages[i].title.match(pat).length;score+=(20*m_c);}
if(tipuesearch.pages[i].text.search(pat)!=-1)
{var m_c=tipuesearch.pages[i].text.match(pat).length;score+=(20*m_c);}
if(tipuesearch.pages[i].tags)
{if(tipuesearch.pages[i].tags.search(pat)!=-1)
{var m_c=tipuesearch.pages[i].tags.match(pat).length;score+=(10*m_c);}}
if(tipuesearch.pages[i].url.search(pat)!=-1)
{score+=20;}
if(score!=0)
{for(var e=0;e<tipuesearch_weight.weight.length;e++)
{if(tipuesearch.pages[i].url==tipuesearch_weight.weight[e].url)
{score+=tipuesearch_weight.weight[e].score;}}}
if(score!=0)
{found.push({"score":score,"title":tipuesearch.pages[i].title,"desc":s_t,"img":tipuesearch.pages[i].img,"url":tipuesearch.pages[i].url,"note":tipuesearch.pages[i].note});c++;}}}
if(c!=0)
{if(set.showTitleCount&&tipuesearch_t_c==0)
{var title=document.title;document.title='('+c+') '+title;tipuesearch_t_c++;}
if(c==1)
{out+='<div id="tipue_search_results_count">'+tipuesearch_string_4;}
else
{var c_c=c.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");out+='<div id="tipue_search_results_count">'+c_c+' '+tipuesearch_string_5;}
if(set.showTime)
{var endTimer=new Date().getTime();var time=(endTimer-startTimer)/ 1000;out+=' ('+time.toFixed(2)+' '+tipuesearch_string_14+')';set.showTime=false;}
out+='</div>';if(set.showRelated&&standard)
{var ront='';f=0;for(var i=0;i<tipuesearch_related.Related.length;i++)
{if(d==tipuesearch_related.Related[i].search)
{if(!f)
{out+='<div class="tipue_search_related">'+tipuesearch_string_10+': ';}
if(show_replace)
{d_o=d;}
if(tipuesearch_related.Related[i].include)
{var r_d=d_o+' '+tipuesearch_related.Related[i].related;}
else
{var r_d=tipuesearch_related.Related[i].related;}
ront+='<a class="tipue_search_related_btn" id="'+r_d+'">'+tipuesearch_related.Related[i].related+'</a>, ';f++;}}
if(f)
{ront=ront.slice(0,-2);ront+='.</div>';out+=ront;}}
if(show_replace)
{out+='<div id="tipue_search_replace">'+tipuesearch_string_2+' '+d+'. '+tipuesearch_string_3+' <a id="tipue_search_replaced">'+d_r+'</a></div>';}
found.sort(function(a,b){return b.score-a.score});var l_o=0;if(set.imageZoom)
{out+='<div id="tipue_search_image_modal"><div class="tipue_search_image_close">&#10005;</div><div class="tipue_search_image_block"><a id="tipue_search_zoom_url"><img id="tipue_search_zoom_img"></a><div id="tipue_search_zoom_text"></div></div></div>';}
for(var i=0;i<found.length;i++)
{if(l_o>=start&&l_o<set.show+start)
{out+='<div class="tipue_search_result">';out+='<h2><a href="'+found[i].url+'"'+tipue_search_w+'>'+found[i].title+'</a></h2>';if(set.debug)
{out+='<div class="tipue_search_content_debug">Score: '+found[i].score+'</div>';}
if(set.showURL)
{var s_u=found[i].url.toLowerCase();if(s_u.indexOf('http://')==0)
{s_u=s_u.slice(7);}
out+='<div class="tipue_search_content_url"><a href="'+found[i].url+'"'+tipue_search_w+'>'+s_u+'</a></div>';}
if(found[i].img)
{if(set.imageZoom)
{out+='<div class="tipue_search_image"><img class="tipue_search_img tipue_search_image_zoom" src="'+found[i].img+'" alt="'+found[i].title+'" data-url="'+found[i].url+'"></div>';}
else
{out+='<div class="tipue_search_image"><a href="'+found[i].url+'"'+tipue_search_w+'><img class="tipue_search_img" src="'+found[i].img+'" alt="'+found[i].title+'"></a></div>';}}
if(found[i].desc)
{var t=found[i].desc;if(set.showContext)
{d_w=d.split(' ');var s_1=found[i].desc.toLowerCase().indexOf(d_w[0]);if(s_1>set.contextStart)
{var t_1=t.substr(s_1-set.contextBuffer);var s_2=t_1.indexOf(' ');t_1=t.substr(s_1-set.contextBuffer+s_2);t_1=$.trim(t_1);if(t_1.length>set.contextLength)
{t='... '+t_1;}}}
if(standard)
{d_w=d.split(' ');for(var f=0;f<d_w.length;f++)
{if(set.highlightTerms)
{var patr=new RegExp('('+d_w[f]+')','gi');t=t.replace(patr,"<h0011>$1<h0012>");}}}
else if(set.highlightTerms)
{var patr=new RegExp('('+d+')','gi');t=t.replace(patr,"<span class=\"tipue_search_content_bold\">$1</span>");}
var t_d='';var t_w=t.split(' ');if(t_w.length<set.descriptiveWords)
{t_d=t;}
else
{for(var f=0;f<set.descriptiveWords;f++)
{t_d+=t_w[f]+' ';}}
t_d=$.trim(t_d);if(t_d.charAt(t_d.length-1)!='.')
{t_d+=' ...';}
t_d=t_d.replace(/h0011/g,'span class=\"tipue_search_content_bold\"');t_d=t_d.replace(/h0012/g,'/span');out+='<p>'+t_d+'</p>';}
if(found[i].note)
{out+='<div class="tipue_search_note">'+found[i].note+'</div>';}
out+='</div>';}
l_o++;}
if(c>set.show)
{var pages=Math.ceil(c / set.show);var page=(start / set.show);if(set.footerPages<3)
{set.footerPages=3;}
out+='<div id="tipue_search_foot"><ul id="tipue_search_foot_boxes">';if(start>0)
{out+='<li role="navigation"><a class="tipue_search_foot_box" accesskey="b" id="'+(start-set.show)+'_'+replace+'">'+tipuesearch_string_6+'</a></li>';}
if(page<=2)
{var p_b=pages;if(pages>set.footerPages)
{p_b=set.footerPages;}
for(var f=0;f<p_b;f++)
{if(f==page)
{out+='<li class="current" role="navigation">'+(f+1)+'</li>';}
else
{out+='<li role="navigation"><a class="tipue_search_foot_box" id="'+(f*set.show)+'_'+replace+'">'+(f+1)+'</a></li>';}}}
else
{var p_b=page+set.footerPages-1;if(p_b>pages)
{p_b=pages;}
for(var f=page-1;f<p_b;f++)
{if(f==page)
{out+='<li class="current" role="navigation">'+(f+1)+'</li>';}
else
{out+='<li role="navigation"><a class="tipue_search_foot_box" id="'+(f*set.show)+'_'+replace+'">'+(f+1)+'</a></li>';}}}
if(page+1!=pages)
{out+='<li role="navigation"><a class="tipue_search_foot_box" accesskey="m" id="'+(start+set.show)+'_'+replace+'">'+tipuesearch_string_7+'</a></li>';}
out+='</ul></div>';}}
else
{out+='<div id="tipue_search_error">'+tipuesearch_string_8+'</div>';}}
else
{if(show_stop)
{out+='<div id="tipue_search_error">'+tipuesearch_string_8+' '+tipuesearch_string_9+'</div>';}
else
{if(set.minimumLength==1)
{out+='<div id="tipue_search_error">'+tipuesearch_string_11+'</div>';}
else
{out+='<div id="tipue_search_error">'+tipuesearch_string_12+' '+set.minimumLength+' '+tipuesearch_string_13+'</div>';}}}
$('#tipue_search_content').hide().html(out).slideDown(200);$('#tipue_search_replaced').click(function()
{getTipueSearch(0,false);});$('.tipue_search_related_btn').click(function()
{$('#tipue_search_input').val($(this).attr('id'));getTipueSearch(0,true);});$('.tipue_search_image_zoom').click(function()
{$('#tipue_search_image_modal').fadeIn(300);$('#tipue_search_zoom_img').attr('src',this.src);var z_u=$(this).attr('data-url');$('#tipue_search_zoom_url').attr('href',z_u);var z_o=this.alt+'<div class="tipue_search_zoom_options"><a href="'+this.src+'" target="_blank">'+tipuesearch_string_15+'</a>&nbsp; <a href="'+z_u+'">'+tipuesearch_string_16+'</a></div>';$('#tipue_search_zoom_text').html(z_o);});$('.tipue_search_image_close').click(function()
{$('#tipue_search_image_modal').fadeOut(300);});$('.tipue_search_foot_box').click(function()
{var id_v=$(this).attr('id');var id_a=id_v.split('_');getTipueSearch(parseInt(id_a[0]),id_a[1]);});}});};})(jQuery);

View file

@ -0,0 +1 @@
var tipuesearch_stop_words=["a","above","after","again","against","all","am","an","and","any","are","aren't","as","at","be","because","been","before","being","below","between","both","but","by","can't","cannot","could","couldn't","did","didn't","do","does","doesn't","doing","don't","down","during","each","few","for","from","further","had","hadn't","has","hasn't","have","haven't","having","he","he'd","he'll","he's","her","here","here's","hers","herself","him","himself","his","how","how's","i","i'd","i'll","i'm","i've","if","in","into","is","isn't","it","it's","its","itself","let's","me","more","most","mustn't","my","myself","no","nor","not","of","off","on","once","only","or","other","ought","our","ours","ourselves","out","over","own","same","shan't","she","she'd","she'll","she's","should","shouldn't","so","some","such","than","that","that's","the","their","theirs","them","themselves","then","there","there's","these","they","they'd","they'll","they're","they've","this","those","through","to","too","under","until","up","very","was","wasn't","we","we'd","we'll","we're","we've","were","weren't","what","what's","when","when's","where","where's","which","while","who","who's","whom","why","why's","with","won't","would","wouldn't","you","you'd","you'll","you're","you've","your","yours","yourself","yourselves"],tipuesearch_replace={words:[{word:"tip",replace_with:"tipue"},{word:"javscript",replace_with:"javascript"},{word:"jqeury",replace_with:"jquery"}]},tipuesearch_weight={weight:[{url:"http://www.tipue.com",score:60},{url:"http://www.tipue.com/search",score:60},{url:"http://www.tipue.com/tipr",score:30},{url:"http://www.tipue.com/support",score:20}]},tipuesearch_stem={words:[{word:"e-mail",stem:"email"},{word:"javascript",stem:"jquery"},{word:"javascript",stem:"js"}]},tipuesearch_related={Related:[{search:"tipue",related:"Search",include:1},{search:"tipue",related:"jQuery"},{search:"tipue",related:"Blog"},{search:"tipue",related:"Support"},{search:"tipue search",related:"Demo",include:1},{search:"tipue search",related:"Support"}]},tipuesearch_string_1="No title",tipuesearch_string_2="Showing results for",tipuesearch_string_3="Search instead for",tipuesearch_string_4="1 result",tipuesearch_string_5="results",tipuesearch_string_6="<",tipuesearch_string_7=">",tipuesearch_string_8="Nothing found.",tipuesearch_string_9="Common words are largely ignored.",tipuesearch_string_10="Related",tipuesearch_string_11="Search should be one character or more.",tipuesearch_string_12="Search should be",tipuesearch_string_13="characters or more.",tipuesearch_string_14="seconds",tipuesearch_string_15="Open Image",tipuesearch_string_16="Goto Page",startTimer=(new Date).getTime();

View file

@ -3,7 +3,7 @@
{% block title %} &ndash; {{ _('Archives') }}{% endblock %}
{% block content %}
<article>
<article class="single">
<header>
<h1 id="archives">{{ _('Archives') }}</h1>
</header>

View file

@ -5,6 +5,8 @@
<meta name="description" content="{{ article.summary|striptags|escape }}" />
<meta name="keywords" content="{{ article.tags|join(', ')|escape }}">
{% if PLUGINS and 'pelican.plugins.activitypub' in PLUGINS %}<link rel="alternate" type="application/activity+json" href="{{ SITEURL }}/activitypub/posts/{{ article.slug }}">{% endif %}
{% if article.translations -%}
<link rel="alternate" href="{{ SITEURL }}/{{ article.url }}" hreflang="{{ article.lang }}" />
{% for a in article.translations %}
@ -18,7 +20,7 @@
{% block title %} &ndash; {{ article.title|striptags|escape }}{% endblock %}
{% block content %}
<article>
<article class="single">
<header>
{% if not ARTICLE_HIDE_TRANSLATION %}
{% import 'partial/translations.html' as translations with context %}
@ -68,14 +70,42 @@
</div>
{% endif %}
{% include "partial/series.html" %}
{% include "partial/neighbors.html" %}
{% include "partial/related_posts.html" %}
{% if article.related_posts %}
<div class="related-posts">
<h4>{{ _('You might enjoy') }}</h4>
<ul class="related-posts">
{% for related_post in article.related_posts %}
<li><a href="{{ SITEURL }}/{{ related_post.url }}">{{ related_post.title }}</a></li>
{% endfor %}
</ul>
</div>
{% elif ADD_THIS_ID %}
<div class="addthis_relatedposts_inline"></div>
{% endif %}
{% if ADD_THIS_ID %}
<div class="addthis_relatedposts_inline"></div>
{% if article.series %}
<div class="related-posts">
{% set text = SERIES_TEXT|default('Part %(index)s of the %(name)s series') %}
<h4>{{ text|format(index=article.series.index, name=article.series.name) }}</h4>
{% if article.series.all_previous %}
<h5>Previous articles</h5>
<ul>
{% for article in article.series.all_previous %}
<li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% if article.series.all_next %}
<h5>Next articles</h5>
<ul>
{% for article in article.series.all_next %}
<li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
</div>
{% endif %}
{% if GOOGLE_ADSENSE and GOOGLE_ADSENSE.ads.article_bottom %}
@ -89,7 +119,6 @@
{% endif %}
{% include "partial/disqus.html" %}
{% include "partial/isso.html" %}
</article>
{% endblock %}

View file

@ -1,3 +1,8 @@
{% extends "index.html" %}
{% block meta %}
{% if PLUGINS and 'pelican.plugins.activitypub' in PLUGINS %}<link rel="alternate" type="application/activity+json" href="{{ SITEURL }}/activitypub/users/{{ author }}">{% endif %}
{% endblock %}
{% block title %} &ndash; {{ _('Posts by %(name)s', name=author) }}:{% endblock %}
{% set summarise = True %}

View file

@ -3,7 +3,7 @@
{% block title %} &ndash; {{ _('Authors') }}{% endblock %}
{% block content %}
<article>
<article class="single">
<header>
<h1 id="authors">{{ _('Authors') }}</h1>
</header>

View file

@ -69,6 +69,14 @@
href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/pygments/{{ PYGMENTS_STYLE|default('github') }}.min.css">
{% endif %}
{% if PLUGINS and ('tipue_search' in PLUGINS or 'pelican.plugins.tipue_search' in PLUGINS) %}
{% if USE_GOOGLE_FONTS != False %}
<link href="https://fonts.googleapis.com/css?family=Merriweather:300,400|Open+Sans" rel="stylesheet">
{% endif %}
<link rel="stylesheet"
href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.min.css" />
{% endif %}
{% if 'pelican.plugins.search' in PLUGINS %}
<link rel="stylesheet"
type="text/css"
@ -107,6 +115,10 @@
<link rel="pingback" href="{{ PINGBACK_URL }}" />
{% endif %}
{% for _, link in SOCIAL%}
<link rel="me" href="{{ link }}" />
{% endfor %}
{% if not PLUGINS or 'seo' not in PLUGINS %}
{% if REL_CANONICAL %}
{% if page %}
@ -121,7 +133,7 @@
<link rel="canonical" href="{{ SITEURL }}/{{ output_file }}">
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% block meta %}
<meta name="author" content="{{ AUTHOR }}" />

View file

@ -3,7 +3,7 @@
{% block title %} &ndash; {{ _('Categories') }}{% endblock %}
{% block content %}
<article>
<article class="single">
<header>
<h1 id="categories">{{ _('Categories') }}</h1>
</header>

View file

@ -14,7 +14,7 @@
{% block title %} &ndash; {{ page.title|striptags|escape }}{% endblock %}
{% block content %}
<article>
<article class="single">
<header>
{% import 'partial/translations.html' as translations with context %}
{{ translations.translations_for(page) }}

View file

@ -25,4 +25,7 @@
height="15"/>
</a>
{% endif %}
{% if STATUSCAKE %}
{% include "partial/statuscake.html" %}
{% endif %}
</p>

View file

@ -1,14 +0,0 @@
{% if 'pelican.plugins.related_posts' in PLUGINS %}
{% if article.related_posts %}
<div class="related-posts">
<h5>{{ _('You might enjoy') }}</h5>
<ul>
{% for related_post in article.related_posts %}
<li>
<a href="{{ SITEURL }}/{{ related_post.url }}">{{ related_post.title }}</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endif %}

View file

@ -1,37 +0,0 @@
{% if 'pelican.plugins.series' in PLUGINS %}
{% if article.series %}
<div class="related-posts">
<h4>{{ _('Part %(index)s of the "%(name)s" series', index=article.series.index, name=article.series.name) }}</h4>
{% if article.series.all_previous %}
{% if article.series.all_previous|length > 1 %}
<h5>{{ _('Previous articles') }}</h5>
{% else %}
<h5>{{ _('Previous article') }}</h5>
{% endif %}
<ul>
{% for article in article.series.all_previous %}
<li>
<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% if article.series.all_next %}
{% if article.series.all_next|length > 1 %}
<h5>{{ _('Next articles') }}</h5>
{% else %}
<h5>{{ _('Next article') }}</h5>
{% endif %}
<ul>
{% for article in article.series.all_next %}
<li>
<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
{% endif %}
{% endif %}

View file

@ -0,0 +1,12 @@
<!-- StatusCake -->
{% if STATUSCAKE['trackid'] %}
<a href="https://www.statuscake.com" title="{{ SITENAME }} Uptime">
<img src="https://app.statuscake.com/button/index.php?Track={{ STATUSCAKE['trackid'] }}&amp;Days={{ STATUSCAKE['days'] }}&amp;Design={{ STATUSCAKE['design'] }}" alt="{{ SITENAME }} Uptime"/>
</a>
{% endif %}
{% if STATUSCAKE['rumid'] %}
<script type="text/javascript">var SC_RumID = {{ STATUSCAKE['rumid'] }};</script>
<script type="text/javascript" async src="https://www.statuscake.com/App/RUM/embed.js"></script>
{% endif %}
<!-- End StatusCake -->

View file

@ -2,7 +2,7 @@
{% block title %} &ndash; {{ _('Archives') }}{% endblock %}
{% block content %}
<article>
<article class="single">
<header>
<h1 id="archives">{{ _('Archives') }}</h1>
</header>

26
templates/search.html Normal file
View file

@ -0,0 +1,26 @@
{% if PLUGINS and ('tipue_search' in PLUGINS or 'pelican.plugins.tipue_search' in PLUGINS) %}
{% extends 'base.html' %}
{% block title %}{{ _('Search') }} - {{ SITENAME|striptags }}{% endblock title %}
{% block content %}
<article class="single">
<header>
<h1 id="categories">{{ _('Search Results') }}</h1>
</header>
<div id="tipue_search_content"></div>
</article>
{% endblock content %} {% block additional_js %}
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/jquery.min.js"></script>
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.min.js"></script>
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch_set.min.js"></script>
<script src="{{ SITEURL }}/tipuesearch_content.js"></script>
<script>
$(document).ready(function () {
$("#tipue_search_input").tipuesearch({
show: 10,
mode: "json",
contentLocation: "{{ SITEURL }}/tipuesearch_content.js",
});
});
</script>
{% endblock %} {% endif %}

View file

@ -1,3 +1,8 @@
{% extends "index.html" %}
{% block meta %}
{% if PLUGINS and 'pelican.plugins.activitypub' in PLUGINS %}<link rel="alternate" type="application/activity+json" href="{{ SITEURL }}/activitypub/tags/{{ tag }}">{% endif %}
{% endblock %}
{% block title %} &ndash; {{ _('Tag %(name)s', name=tag) }}{% endblock %}
{% set summarise = True %}

View file

@ -3,7 +3,7 @@
{% block title %} &ndash; {{ _('Tags') }}{% endblock %}
{% block content %}
<article>
<article class="single">
<header>
<h1 id="tags">{{ _('Tags') }}</h1>
</header>