Generate thumbnails for creations
This commit is contained in:
parent
25c848abfa
commit
d3d8bbf84c
24
content/.obsidian/workspace.json
vendored
24
content/.obsidian/workspace.json
vendored
|
@ -55,12 +55,12 @@
|
||||||
"state": {
|
"state": {
|
||||||
"type": "markdown",
|
"type": "markdown",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Garage Door Opener.md",
|
"file": "QotNews.md",
|
||||||
"mode": "source",
|
"mode": "source",
|
||||||
"source": false
|
"source": false
|
||||||
},
|
},
|
||||||
"icon": "lucide-file",
|
"icon": "lucide-file",
|
||||||
"title": "Garage Door Opener"
|
"title": "QotNews"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
"state": {
|
"state": {
|
||||||
"type": "backlink",
|
"type": "backlink",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Garage Door Opener.md",
|
"file": "QotNews.md",
|
||||||
"collapseAll": false,
|
"collapseAll": false,
|
||||||
"extraContext": false,
|
"extraContext": false,
|
||||||
"sortOrder": "alphabetical",
|
"sortOrder": "alphabetical",
|
||||||
|
@ -175,7 +175,7 @@
|
||||||
"unlinkedCollapsed": true
|
"unlinkedCollapsed": true
|
||||||
},
|
},
|
||||||
"icon": "links-coming-in",
|
"icon": "links-coming-in",
|
||||||
"title": "Backlinks for Garage Door Opener"
|
"title": "Backlinks for QotNews"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -184,13 +184,13 @@
|
||||||
"state": {
|
"state": {
|
||||||
"type": "outline",
|
"type": "outline",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Garage Door Opener.md",
|
"file": "QotNews.md",
|
||||||
"followCursor": false,
|
"followCursor": false,
|
||||||
"showSearch": false,
|
"showSearch": false,
|
||||||
"searchQuery": ""
|
"searchQuery": ""
|
||||||
},
|
},
|
||||||
"icon": "lucide-list",
|
"icon": "lucide-list",
|
||||||
"title": "Outline of Garage Door Opener"
|
"title": "Outline of QotNews"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -213,8 +213,12 @@
|
||||||
},
|
},
|
||||||
"active": "24a62ccdfd18a884",
|
"active": "24a62ccdfd18a884",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
"Protovac Retro Terminal.md",
|
"Notica.md",
|
||||||
"Spaceport.md",
|
"Spaceport.md",
|
||||||
|
"media/spaceport1.png",
|
||||||
|
"Garage Door Opener.md",
|
||||||
|
"media/protovac1.jpg",
|
||||||
|
"Protovac Retro Terminal.md",
|
||||||
"QotNews.md",
|
"QotNews.md",
|
||||||
"Fake Dog.md",
|
"Fake Dog.md",
|
||||||
"Bypassing Ports.md",
|
"Bypassing Ports.md",
|
||||||
|
@ -242,12 +246,8 @@
|
||||||
"pages/creations.md",
|
"pages/creations.md",
|
||||||
"Makerspace Tours.md",
|
"Makerspace Tours.md",
|
||||||
"Secret Garden.md",
|
"Secret Garden.md",
|
||||||
"Hydroponics.md",
|
|
||||||
"Linux Flavour.md",
|
|
||||||
"media/nft2.jpg",
|
"media/nft2.jpg",
|
||||||
"media/nft1.png",
|
"media/nft1.png",
|
||||||
"media/ports1.svg",
|
"media/ports1.svg"
|
||||||
"media/backup1.svg",
|
|
||||||
"media/japan12hi.jpg"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -67,7 +67,7 @@ def generator_finalized(generator):
|
||||||
if original_format:
|
if original_format:
|
||||||
save_kwargs['format'] = original_format
|
save_kwargs['format'] = original_format
|
||||||
if original_format == 'JPEG':
|
if original_format == 'JPEG':
|
||||||
save_kwargs['quality'] = 85 # Adjust quality for JPEGs
|
save_kwargs['quality'] = 95 # Adjust quality for JPEGs
|
||||||
save_kwargs['optimize'] = True
|
save_kwargs['optimize'] = True
|
||||||
elif original_format == 'PNG':
|
elif original_format == 'PNG':
|
||||||
save_kwargs['optimize'] = True
|
save_kwargs['optimize'] = True
|
||||||
|
|
|
@ -2,6 +2,11 @@
|
||||||
# -*- coding: utf-8 -*- #
|
# -*- coding: utf-8 -*- #
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import sys
|
||||||
|
sys.path.append('.')
|
||||||
|
|
||||||
|
import generate_thumbnails
|
||||||
|
|
||||||
PATH = 'content'
|
PATH = 'content'
|
||||||
|
|
||||||
TIMEZONE = 'Canada/Mountain'
|
TIMEZONE = 'Canada/Mountain'
|
||||||
|
@ -33,6 +38,7 @@ MARKDOWN = {
|
||||||
PLUGINS = [
|
PLUGINS = [
|
||||||
'obsidian',
|
'obsidian',
|
||||||
'linkclass',
|
'linkclass',
|
||||||
|
'generate_thumbnails',
|
||||||
]
|
]
|
||||||
|
|
||||||
STATIC_PATHS = ['media', 'extra']
|
STATIC_PATHS = ['media', 'extra']
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
{% for article in articles_page.object_list if article.category.name == 'Creations' %}
|
{% for article in articles_page.object_list if article.category.name == 'Creations' %}
|
||||||
<div class="creation">
|
<div class="creation">
|
||||||
<a href="{{ article.url }}">
|
<a href="{{ article.url }}">
|
||||||
<img src="media/{{ article.image }}" alt="{{ article.summary }}" />
|
<img src="media/thumbnails/{{ article.image }}" alt="{{ article.summary|striptags }}" />
|
||||||
{{ article.title }}
|
{{ article.title }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user