other update
This commit is contained in:
parent
812b5ac597
commit
3f1348c6eb
@ -1,3 +1,5 @@
|
||||
import re
|
||||
|
||||
AUTHOR = 'Les lexicos'
|
||||
SITENAME = 'Lexicographe Déconstruit'
|
||||
SITEURL = ''
|
||||
@ -15,6 +17,10 @@ TRANSLATION_FEED_ATOM = None
|
||||
AUTHOR_FEED_ATOM = None
|
||||
AUTHOR_FEED_RSS = None
|
||||
|
||||
THEME = './themes/default/'
|
||||
|
||||
DEFAULT_DATE = 'fs'
|
||||
|
||||
# Blogroll
|
||||
LINKS = (('Pelican', 'https://getpelican.com/'),
|
||||
('Python.org', 'https://www.python.org/'),
|
||||
@ -27,5 +33,36 @@ SOCIAL = (('You can add links in your config file', '#'),
|
||||
|
||||
DEFAULT_PAGINATION = False
|
||||
|
||||
# custom Jinja2 filter for indexing articles
|
||||
def sort_by_letter(articles):
|
||||
organized_articles = {}
|
||||
for article in sorted(articles, key=lambda a:a.title):
|
||||
if article.category != 'definitions':
|
||||
continue
|
||||
letter = article.title[0].upper()
|
||||
if letter not in organized_articles:
|
||||
organized_articles[letter] = []
|
||||
organized_articles[letter].append(article)
|
||||
return organized_articles.items()
|
||||
|
||||
def titleless (html):
|
||||
"""Filter out titles in html"""
|
||||
return re.sub('<h[0-9]>[^<]*</h[0-9]>', ' ', html)
|
||||
|
||||
def styleless (html):
|
||||
"""Filter out html tags"""
|
||||
return re.sub('<[^<]*>', ' ', html)
|
||||
|
||||
def begin (text):
|
||||
"""Only let the begining of the text"""
|
||||
return text if len(text) < 200 else text[0:200] + '…'
|
||||
|
||||
JINJA_FILTERS = {
|
||||
"sortbyletter": sort_by_letter,
|
||||
"titleless": titleless,
|
||||
"styleless": styleless,
|
||||
"begin": begin,
|
||||
}
|
||||
|
||||
# Uncomment following line if you want document-relative URLs when developing
|
||||
#RELATIVE_URLS = True
|
||||
#RELATIVE_URLS = True
|
||||
|
@ -18,9 +18,9 @@ if [ -z "$action" ] ; then
|
||||
fi
|
||||
|
||||
if [ "$action" = 'pull' ] ; then
|
||||
rclone copy --webdav-url="$server/remote.php/webdav/" --webdav-vendor=nextcloud --webdav-user="$user" --webdav-pass=$(rclone obscure $password) :webdav:"$ncpath" content
|
||||
rclone sync --webdav-url="$server/remote.php/webdav/" --webdav-vendor=nextcloud --webdav-user="$user" --webdav-pass=$(rclone obscure $password) :webdav:"$ncpath" content
|
||||
elif [ "$action" = 'push' ] ; then
|
||||
rclone copy --webdav-url="$server/remote.php/webdav/" --webdav-vendor=nextcloud --webdav-user="$user" --webdav-pass=$(rclone obscure $password) content :webdav:"$ncpath"
|
||||
rclone sync --webdav-url="$server/remote.php/webdav/" --webdav-vendor=nextcloud --webdav-user="$user" --webdav-pass=$(rclone obscure $password) content :webdav:"$ncpath"
|
||||
else
|
||||
echo "unknown action: $action"
|
||||
exit 1
|
||||
|
BIN
themes/default/static/images/logos abc - export.png
Normal file
BIN
themes/default/static/images/logos abc - export.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
82
themes/default/static/images/logos abc - export.svg
Normal file
82
themes/default/static/images/logos abc - export.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 24 KiB |
@ -67,6 +67,7 @@ format(slug=tag.slug) }}{% endif %}" type="application/rss+xml" rel="alternate"
|
||||
<!-- Main content -->
|
||||
<main>
|
||||
{% block content %}
|
||||
{{ page.content }}
|
||||
{% endblock %}
|
||||
</main>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user