small fixes

This commit is contained in:
teldra 2022-06-24 19:00:02 +02:00
parent 036b44f698
commit d0f9624ab0
20 changed files with 34 additions and 26 deletions

View File

@ -8,7 +8,7 @@ contact = true
archive = true
#do you want an searchpage link?
search = true
search = false
#do you want a newsletter link?
newsletter = true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 69 KiB

42
new.sh
View File

@ -1,24 +1,28 @@
#!/bin/bash
echo funzte nicht
exit 1
if [ ${#@} -eq 0 ]; then
echo "Titel des Artikels"
read -p ": " title
else
title="$@"
fi
echo "Titel des Artikels"
read -p ": " title
title=${title//[^[:print:]]/}
title=${title//#/}
newfoldername="${title//[^[:alnum:][:blank:]-]/}"
newfoldername=${newfoldername// /-}
newfoldername=${newfoldername/%-/}
newfoldername=${newfoldername/-/}
title="${title//\//\\\/}" # / -> \/
title="${title//\"/\\\"}" # " -> \"
date_long=$(date +%Y-%m-%dT%H:%M:00+0200)
date=$(date +%Y-%m-%d)
title_=${title// /-}
mkdir -p "content/news/${date}-${title_}"
echo "---" > "content/news/${date}-${title_}/index.de.md"
echo "title: \"${title}\"" >> "content/news/${date}-${title_}/index.de.md"
echo "date: ${date_long}" >> "content/news/${date}-${title_}/index.de.md"
echo "---" >> "content/news/${date}-${title_}/index.de.md"
mkdir -p "content/posts/${date}-${newfoldername}"
touch "content/posts/${date}-${newfoldername}/index.de.md"
# echo "---" > "content/posts/${date}-${newfoldername}/index.de.md"
# echo "title: \"${title}\"" >> "content/posts/${date}-${newfoldername}/index.de.md"
# echo "date: ${date_long}" >> "content/posts/${date}-${newfoldername}/index.de.md"
# echo "---" >> "content/posts/${date}-${newfoldername}/index.de.md"
git add "content/news/${date}-${title_}/"
git commit -m "New Post: ${date}-${title}"
git add "content/posts/${date}-${newfoldername}/"
git commit -m "New Post: ${date}-${newfoldername}"
for i in vim nano gedit kate; do
if command -v $i > /dev/null; then
@ -30,10 +34,10 @@ echo ""
echo ""
echo "Schreibe nun mit einem einfachen Editor deinen Artikel."
echo ""
echo "'${editor} content/news/${date}-${title_}/index.de.md'"
echo "'${editor} content/posts/${date}-${newfoldername}/index.de.md'"
echo ""
echo "'https://buha.rotce.de/misc/generator/' hilft dir!"
echo "'https://buha.rotce.de/de/tools/generator/' hilft dir!"
echo ""
echo "Lege vielleicht noch Bilder in den Ordner 'content/news/${date}-${title_}'"
echo "Lege vielleicht noch Bilder in den Ordner 'content/posts/${date}-${newfoldername}'"
echo ""
echo "Wenn du fertig bist, nutze './push.sh' um das hochzuladen."

View File

@ -49,7 +49,9 @@ article {
}
}
.blue {
background: blue;
}
.article_footer {
font-size: 60%;

View File

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View File

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View File

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 111 KiB

View File

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 145 KiB

View File

@ -27,8 +27,10 @@
<meta property="og:title" content="{{ site.Title }}" />
<link rel="canonical" href="{{ .Permalink }}">
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{- if or .IsHome (in .Site.Params.mainMenu .Section) (eq .Kind "term") (eq .Section "recurrent") -}}
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end }}
{{ end -}}
{{ if .Site.Params.keywords -}}

View File

@ -40,9 +40,9 @@ let params = {
err_filefailed : '<p style="text-align: center;color: red;">Eine Datei konnte nicht abgerufen werden.</p>',
res_one_item : '<p><em>[CNT] SUCHERGEBNIS</em></p>',
res_more_items : '<p><em>[CNT] SUCHERGEBNISSE</em></p>',
res_out_top : '<ul>',
res_out_bottom : '</ul>',
res_item_tpl : '<li>[DATE]: <a href="[URL]">[TITLE]</a><br>[SUMMARY]<br><em>Tags: [TAGS]</em></li>',
res_out_top : '<div>',
res_out_bottom : '</div>',
res_item_tpl : '<div>[DATE]: <a href="[URL]" class="underline">[TITLE]</a></div><div style="margin-left: 1em;">[SUMMARY]<a href="[URL]">weiterlesen</a></div><div style="margin-left: 1em;"><em>Tags: [TAGS]</em></div><hr>',
// add_searchlink : '<p><a href="https://duckduckgo.com/?q=site:yourdomain.com [QUERY]" target="_blank"><i>Nicht zufrieden mit den Suchergebnissen? Externe Suche via DuckDuckGo ...</i></a></p>'
};