From 09209f9cf5505890fcf3f8249411107963082b8c Mon Sep 17 00:00:00 2001 From: zPlus Date: Sat, 14 Dec 2024 21:41:38 +0100 Subject: [PATCH] Rename template files extension from .tpl to .html - Use .html for all files instead of .tpl - Move SPARQL queries from templates to controllers --- app.py | 117 +++++++++++++++--- pages/1984_ehf..html | 2 +- pages/Bottle_(web_framework).html | 2 +- pages/DOKK.html | 2 +- pages/Dragora_(software).html | 2 +- pages/ForgeFed.html | 2 +- pages/GNU_Hackers_Meeting.html | 2 +- pages/Gitea_(software).html | 2 +- pages/Gogs_(software).html | 2 +- pages/Header_Dictionary_Triples.html | 2 +- pages/Minifree_Ltd.html | 2 +- pages/NotABug.org.html | 2 +- pages/The_Peers_Community.html | 2 +- pages/TuxFamily.html | 2 +- pages/Vervis_(software).html | 2 +- pages/Vikings_GmbH.html | 2 +- pages/archive-webextension.html | 2 +- pages/freepost_(software).html | 2 +- pages/lib.reviews.html | 2 +- pages/radio-browser.info.html | 2 +- .../{article.tpl => articles/article.html} | 2 +- .../{articles.tpl => articles/index.html} | 2 +- pages/templates/{base.tpl => base.html} | 0 pages/{.html => templates/index.html} | 2 +- .../library/index.html} | 2 +- pages/templates/library/item.html | 38 ++++++ pages/templates/library/item.tpl | 79 ------------ .../license/index.html} | 2 +- .../license/{license.tpl => license.html} | 2 +- ...disambiguation.tpl => disambiguation.html} | 2 +- .../{distribution.tpl => distribution.html} | 2 +- .../manpages/index.html} | 15 +-- .../manpages/{manpage.tpl => manpage.html} | 2 +- .../manpages/{package.tpl => package.html} | 2 +- .../mimi_and_eunice/index.html} | 15 +-- .../mimi_and_eunice/{strip.tpl => strip.html} | 2 +- ...al_hosting_platform_for_free_software.html | 2 +- robots.txt | 2 + 38 files changed, 173 insertions(+), 155 deletions(-) rename pages/templates/{article.tpl => articles/article.html} (90%) rename pages/templates/{articles.tpl => articles/index.html} (92%) rename pages/templates/{base.tpl => base.html} (100%) rename pages/{.html => templates/index.html} (95%) rename pages/{library.html => templates/library/index.html} (97%) create mode 100644 pages/templates/library/item.html delete mode 100644 pages/templates/library/item.tpl rename pages/{license.html => templates/license/index.html} (89%) rename pages/templates/license/{license.tpl => license.html} (90%) rename pages/templates/manpages/{disambiguation.tpl => disambiguation.html} (96%) rename pages/templates/manpages/{distribution.tpl => distribution.html} (94%) rename pages/{manpages.html => templates/manpages/index.html} (68%) rename pages/templates/manpages/{manpage.tpl => manpage.html} (95%) rename pages/templates/manpages/{package.tpl => package.html} (94%) rename pages/{mimi_and_eunice.html => templates/mimi_and_eunice/index.html} (55%) rename pages/templates/mimi_and_eunice/{strip.tpl => strip.html} (96%) create mode 100644 robots.txt diff --git a/app.py b/app.py index ed12e32..f339fa2 100755 --- a/app.py +++ b/app.py @@ -84,11 +84,7 @@ def favicon(): @bottle.get('/robots.txt') def robotstxt(): - response.content_type = 'text/plain; charset=UTF8' - - return """User-agent: * -Disallow: -""" + return bottle.static_file('robots.txt', root='./') @bottle.get('/static/', name='static') def static(filename): @@ -98,6 +94,14 @@ def static(filename): return bottle.static_file(filename, root='./static/') +@bottle.get('/', name='homepage') +def homepage(): + """ + Homepage. + """ + + return template('templates/index.html') + @bottle.route('/library', method=['GET', 'POST'], name='library') def library(): """ @@ -184,12 +188,13 @@ def library(): 'library:title': {} }) - return template('library.html', authors=authors, licenses=licenses, items=items, + return template('templates/library/index.html', authors=authors, licenses=licenses, items=items, filters_author=filters_author, filters_license=filters_license) @bottle.get('/library/', name='library_item') def library_item(item_id): """ + Show a single item in the library. """ try: @@ -198,7 +203,47 @@ def library_item(item_id): except: item_plaintext = '' - return template('templates/library/item.tpl', item_id=item_id, plaintext=item_plaintext) + data = query(f""" + PREFIX library: + PREFIX license: + + CONSTRUCT {{ + ?item library:title ?title ; + library:author ?author ; + license:licensed_under ?license . + + ?license license:id ?license_id ; + license:name ?license_name . + }} + WHERE {{ + ?item + library:title ?title ; + library:author ?author ; + license:licensed_under ?license . + + FILTER (?item = ) + + OPTIONAL {{ + ?license license:id ?license_id_optional ; + license:name ?license_name_optional . + }} + + BIND(COALESCE(?license_id_optional, SUBSTR(STR(?license), 14)) AS ?license_id) + BIND(COALESCE(?license_name_optional, SUBSTR(STR(?license), 14)) AS ?license_name) + }} + """, + { + "@context": { + "library": "dokk:vocab:library:", + "license": "dokk:vocab:license:", + "library:author": { "@container": "@set" }, + "license:licensed_under": { "@container": "@set" } + }, + "library:title": {} + } + )["@graph"][0] + + return template('templates/library/item.html', item_id=item_id, plaintext=item_plaintext, data=data) @bottle.get('/license', name='license_list') def license_list(): @@ -218,7 +263,7 @@ def license_list(): ORDER BY ASC(UCASE(?name)) """) - return template('license.html', data=data) + return template('templates/license/index.html', data=data) @bottle.get('/license/', name='license') def license(id): @@ -233,7 +278,27 @@ def license(id): DESCRIBE """) - return template('templates/license/license.tpl', data=data) + return template('templates/license/license.html', data=data) + +@bottle.get('/manpages', name='manpages') +def manpages(): + """ + Manpages index. + """ + + data = query(f""" + PREFIX mp: + + SELECT ?name ?number + WHERE {{ + [] a mp:Distribution ; + mp:name ?name ; + mp:number ?number + }} + ORDER BY ?name ?number + """) + + return template('templates/manpages/index.html', data=data) @bottle.get('/manpages//', name='manpages_distribution') def manpages_distribution(distribution, version): @@ -258,7 +323,7 @@ def manpages_distribution(distribution, version): ORDER BY ?name ''') - return template('templates/manpages/distribution.tpl', data=data, distribution=distribution, version=version) + return template('templates/manpages/distribution.html', data=data, distribution=distribution, version=version) @bottle.get('/manpages///', name='manpages_package') def manpages_package(distribution, version, package): @@ -287,7 +352,7 @@ def manpages_package(distribution, version, package): ORDER BY ?filename ''') - return template('templates/manpages/package.tpl', data=data, distribution=distribution, version=version, package=package) + return template('templates/manpages/package.html', data=data, distribution=distribution, version=version, package=package) @bottle.get('/manpages/.
', name='manpages_disambiguation') def manpages_disambiguation(name, section): @@ -318,7 +383,7 @@ def manpages_disambiguation(name, section): ORDER BY ?distro_name ?distro_number ?package_name ''')['results']['bindings'] - return template('templates/manpages/disambiguation.tpl', name=name, section=section, data=data) + return template('templates/manpages/disambiguation.html', name=name, section=section, data=data) @bottle.get('/manpages////', name='manpages_page') def manpages_page(distro_name, distro_number, package, page): @@ -376,7 +441,7 @@ def manpages_page(distro_name, distro_number, package, page): >{match.group('page')}({match.group('section')})''', html) - return template('templates/manpages/manpage.tpl', + return template('templates/manpages/manpage.html', distro = {'name': distro_name, 'number': distro_number}, package = package, page = { @@ -386,6 +451,26 @@ def manpages_page(distro_name, distro_number, package, page): 'html': html, }) +@bottle.get('/mimi_and_eunice', name='mimi_and_eunice') +def mimi_and_eunice(): + """ + Mimi&Eunice index. + """ + + data = query(f""" + PREFIX comics: + + SELECT ?number ?title + WHERE {{ + [] comics:series ; + comics:number ?number; + comics:title ?title + }} + ORDER BY ?number + """) + + return template('templates/mimi_and_eunice/index.html', data=data) + @bottle.get('/mimi_and_eunice/', name='mimi_and_eunice_strip') def mimi_and_eunice_strip(number): """ @@ -420,7 +505,7 @@ def mimi_and_eunice_strip(number): 'blob:at': {} }) - return template('templates/mimi_and_eunice/strip.tpl', data=data['@graph'][0]) + return template('templates/mimi_and_eunice/strip.html', data=data['@graph'][0]) @bottle.get('/articles', name='articles') def articles(): @@ -428,12 +513,10 @@ def articles(): """ pages = [ page.stem for page in sorted(pathlib.Path('./pages').glob('*.html')) ] - pages.remove('.html') - return template('templates/articles.tpl', pages=pages) + return template('templates/articles/index.html', pages=pages) # TODO Make this obsolete. Replace with controllers -@bottle.get('/', name='homepage') @bottle.get('/', name='page') def article(page=''): """ diff --git a/pages/1984_ehf..html b/pages/1984_ehf..html index 7dbeb5c..5702f6a 100644 --- a/pages/1984_ehf..html +++ b/pages/1984_ehf..html @@ -1,5 +1,5 @@ {% set title = "1984 ehf." %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/Bottle_(web_framework).html b/pages/Bottle_(web_framework).html index b4fd2ae..eb10230 100644 --- a/pages/Bottle_(web_framework).html +++ b/pages/Bottle_(web_framework).html @@ -1,5 +1,5 @@ {% set title = "Bottle" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/DOKK.html b/pages/DOKK.html index 02e250d..90f9826 100644 --- a/pages/DOKK.html +++ b/pages/DOKK.html @@ -1,5 +1,5 @@ {% set title = "DOKK" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/Dragora_(software).html b/pages/Dragora_(software).html index 446f803..d2a9d26 100644 --- a/pages/Dragora_(software).html +++ b/pages/Dragora_(software).html @@ -1,5 +1,5 @@ {% set title = "Dragora" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/ForgeFed.html b/pages/ForgeFed.html index e8240a9..6a46df3 100644 --- a/pages/ForgeFed.html +++ b/pages/ForgeFed.html @@ -1,5 +1,5 @@ {% set title = "ForgeFed" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/GNU_Hackers_Meeting.html b/pages/GNU_Hackers_Meeting.html index e2e3ca7..1eb7009 100644 --- a/pages/GNU_Hackers_Meeting.html +++ b/pages/GNU_Hackers_Meeting.html @@ -1,5 +1,5 @@ {% set title = "GNU Hackers' Meetings" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/Gitea_(software).html b/pages/Gitea_(software).html index 9bc46e7..873fae7 100644 --- a/pages/Gitea_(software).html +++ b/pages/Gitea_(software).html @@ -1,5 +1,5 @@ {% set title = "Gitea" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/Gogs_(software).html b/pages/Gogs_(software).html index fde025d..39f77af 100644 --- a/pages/Gogs_(software).html +++ b/pages/Gogs_(software).html @@ -1,5 +1,5 @@ {% set title = "Gogs" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/Header_Dictionary_Triples.html b/pages/Header_Dictionary_Triples.html index 8ffed5e..8be1604 100644 --- a/pages/Header_Dictionary_Triples.html +++ b/pages/Header_Dictionary_Triples.html @@ -1,5 +1,5 @@ {% set title = "Header Dictionary Triples" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/Minifree_Ltd.html b/pages/Minifree_Ltd.html index f84032d..db0894e 100644 --- a/pages/Minifree_Ltd.html +++ b/pages/Minifree_Ltd.html @@ -1,5 +1,5 @@ {% set title = "Minifree Ltd" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/NotABug.org.html b/pages/NotABug.org.html index 89db878..abcf9af 100644 --- a/pages/NotABug.org.html +++ b/pages/NotABug.org.html @@ -1,5 +1,5 @@ {% set title = "NotABug.org" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/The_Peers_Community.html b/pages/The_Peers_Community.html index 2ee2793..ccd87b3 100644 --- a/pages/The_Peers_Community.html +++ b/pages/The_Peers_Community.html @@ -1,5 +1,5 @@ {% set title = "The Peers Community" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/TuxFamily.html b/pages/TuxFamily.html index 5ea96d0..1c93753 100644 --- a/pages/TuxFamily.html +++ b/pages/TuxFamily.html @@ -1,5 +1,5 @@ {% set title = "TuxFamily" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/Vervis_(software).html b/pages/Vervis_(software).html index 9345f52..b694aee 100644 --- a/pages/Vervis_(software).html +++ b/pages/Vervis_(software).html @@ -1,5 +1,5 @@ {% set title = "Vervis" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/Vikings_GmbH.html b/pages/Vikings_GmbH.html index 0a0b103..3a0de5b 100644 --- a/pages/Vikings_GmbH.html +++ b/pages/Vikings_GmbH.html @@ -1,5 +1,5 @@ {% set title = "Vikings GmbH" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/archive-webextension.html b/pages/archive-webextension.html index 7d5ab76..4f8d8f2 100644 --- a/pages/archive-webextension.html +++ b/pages/archive-webextension.html @@ -1,5 +1,5 @@ {% set title = "archive-webextension" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/freepost_(software).html b/pages/freepost_(software).html index 5d389b5..c11e314 100644 --- a/pages/freepost_(software).html +++ b/pages/freepost_(software).html @@ -1,5 +1,5 @@ {% set title = "freepost" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/lib.reviews.html b/pages/lib.reviews.html index e6f58bd..daad857 100644 --- a/pages/lib.reviews.html +++ b/pages/lib.reviews.html @@ -1,5 +1,5 @@ {% set title = "lib.reviews" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/radio-browser.info.html b/pages/radio-browser.info.html index 9876ecf..d1313f9 100644 --- a/pages/radio-browser.info.html +++ b/pages/radio-browser.info.html @@ -1,5 +1,5 @@ {% set title = "radio-browser.info" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/pages/templates/article.tpl b/pages/templates/articles/article.html similarity index 90% rename from pages/templates/article.tpl rename to pages/templates/articles/article.html index cba9e2a..5fbbfd9 100644 --- a/pages/templates/article.tpl +++ b/pages/templates/articles/article.html @@ -1,4 +1,4 @@ -{% extends "templates/base.tpl" %} +{% extends "templates/base.html" %} {% block title %}{{ title }}{% endblock %} {% block stylesheets %} diff --git a/pages/templates/articles.tpl b/pages/templates/articles/index.html similarity index 92% rename from pages/templates/articles.tpl rename to pages/templates/articles/index.html index 33ef12f..5169f51 100644 --- a/pages/templates/articles.tpl +++ b/pages/templates/articles/index.html @@ -2,7 +2,7 @@ because unused #} -{% extends "templates/base.tpl" %} +{% extends "templates/base.html" %} {% block title %}Articles{% endblock %} diff --git a/pages/templates/base.tpl b/pages/templates/base.html similarity index 100% rename from pages/templates/base.tpl rename to pages/templates/base.html diff --git a/pages/.html b/pages/templates/index.html similarity index 95% rename from pages/.html rename to pages/templates/index.html index 3d7dab2..74d30ef 100644 --- a/pages/.html +++ b/pages/templates/index.html @@ -1,4 +1,4 @@ -{% extends "templates/base.tpl" %} +{% extends "templates/base.html" %} {% block title %}{% endblock %} diff --git a/pages/library.html b/pages/templates/library/index.html similarity index 97% rename from pages/library.html rename to pages/templates/library/index.html index 60ee007..e7fb841 100644 --- a/pages/library.html +++ b/pages/templates/library/index.html @@ -1,4 +1,4 @@ -{% extends "templates/base.tpl" %} +{% extends "templates/base.html" %} {% block title %}Library{% endblock %} diff --git a/pages/templates/library/item.html b/pages/templates/library/item.html new file mode 100644 index 0000000..f24ce52 --- /dev/null +++ b/pages/templates/library/item.html @@ -0,0 +1,38 @@ +{% extends "templates/base.html" %} + +{% block title %}{{ data['library:title'] }}{% endblock %} + +{% block body %} + +
+ + + + +
+

{{ data["library:title"] }}

+ +

+ Authors + {% for author in data["library:author"]|sort() %} + {{ author }} + {% endfor%} +

+ +

+ License + {% for license in data["license:licensed_under"]|sort(attribute="license:id") %} + {{ license['license:id'] }} + {% endfor%} +

+
+ +
+ Plaintext +
{{ plaintext }}
+
+
+ +{% endblock %} diff --git a/pages/templates/library/item.tpl b/pages/templates/library/item.tpl deleted file mode 100644 index 7337c3f..0000000 --- a/pages/templates/library/item.tpl +++ /dev/null @@ -1,79 +0,0 @@ -{% extends "templates/base.tpl" %} - -{% set data = query(""" - PREFIX library: - PREFIX license: - - CONSTRUCT { - ?item library:title ?title ; - library:author ?author ; - license:licensed_under ?license . - - ?license license:id ?license_id ; - license:name ?license_name . - } - WHERE { - ?item - library:title ?title ; - library:author ?author ; - license:licensed_under ?license . - - FILTER (?item = ) - - OPTIONAL { - ?license license:id ?license_id_optional ; - license:name ?license_name_optional . - } - - BIND(COALESCE(?license_id_optional, SUBSTR(STR(?license), 14)) AS ?license_id) - BIND(COALESCE(?license_name_optional, SUBSTR(STR(?license), 14)) AS ?license_name) - } - """, - { - "@context": { - "library": "dokk:vocab:library:", - "license": "dokk:vocab:license:", - "library:author": { "@container": "@set" }, - "license:licensed_under": { "@container": "@set" } - }, - "library:title": {} - } - )["@graph"][0] -%} - -{% block title %}{{ data['library:title'] }}{% endblock %} - -{% block body %} - -
- - - - -
-

{{ data["library:title"] }}

- -

- Authors - {% for author in data["library:author"]|sort() %} - {{ author }} - {% endfor%} -

- -

- License - {% for license in data["license:licensed_under"]|sort(attribute="license:id") %} - {{ license['license:id'] }} - {% endfor%} -

-
- -
- Plaintext -
{{ plaintext }}
-
-
- -{% endblock %} diff --git a/pages/license.html b/pages/templates/license/index.html similarity index 89% rename from pages/license.html rename to pages/templates/license/index.html index c1792cc..bf0208e 100644 --- a/pages/license.html +++ b/pages/templates/license/index.html @@ -1,4 +1,4 @@ -{% extends "templates/base.tpl" %} +{% extends "templates/base.html" %} {% block title %}Licenses{% endblock %} diff --git a/pages/templates/license/license.tpl b/pages/templates/license/license.html similarity index 90% rename from pages/templates/license/license.tpl rename to pages/templates/license/license.html index 0ec6978..4cead96 100644 --- a/pages/templates/license/license.tpl +++ b/pages/templates/license/license.html @@ -1,4 +1,4 @@ -{% extends "templates/base.tpl" %} +{% extends "templates/base.html" %} {% block title %}{{ data['license:name'] }}{% endblock %} diff --git a/pages/templates/manpages/disambiguation.tpl b/pages/templates/manpages/disambiguation.html similarity index 96% rename from pages/templates/manpages/disambiguation.tpl rename to pages/templates/manpages/disambiguation.html index 7b4bd3d..26c3550 100644 --- a/pages/templates/manpages/disambiguation.tpl +++ b/pages/templates/manpages/disambiguation.html @@ -1,4 +1,4 @@ -{% extends "templates/base.tpl" %} +{% extends "templates/base.html" %} {% block title %}Man pages named {{ name }} in section {{ section }}{% endblock %} diff --git a/pages/templates/manpages/distribution.tpl b/pages/templates/manpages/distribution.html similarity index 94% rename from pages/templates/manpages/distribution.tpl rename to pages/templates/manpages/distribution.html index f403bec..23ed03c 100644 --- a/pages/templates/manpages/distribution.tpl +++ b/pages/templates/manpages/distribution.html @@ -1,4 +1,4 @@ -{% extends "templates/base.tpl" %} +{% extends "templates/base.html" %} {% block title %}{{ distribution }} {{ version }} man pages{% endblock %} diff --git a/pages/manpages.html b/pages/templates/manpages/index.html similarity index 68% rename from pages/manpages.html rename to pages/templates/manpages/index.html index 7bb4714..d15ddcb 100644 --- a/pages/manpages.html +++ b/pages/templates/manpages/index.html @@ -1,17 +1,4 @@ -{% extends "templates/base.tpl" %} - -{% set data = query(""" - PREFIX mp: - - SELECT ?name ?number - WHERE { - [] a mp:Distribution ; - mp:name ?name ; - mp:number ?number - } - ORDER BY ?name ?number - """) -%} +{% extends "templates/base.html" %} {% block title %}man pages{% endblock %} diff --git a/pages/templates/manpages/manpage.tpl b/pages/templates/manpages/manpage.html similarity index 95% rename from pages/templates/manpages/manpage.tpl rename to pages/templates/manpages/manpage.html index a0e850d..c8379b4 100644 --- a/pages/templates/manpages/manpage.tpl +++ b/pages/templates/manpages/manpage.html @@ -1,4 +1,4 @@ -{% extends "templates/base.tpl" %} +{% extends "templates/base.html" %} {% block title %}{{ page["name"] }}({{ page["section"] }}){% endblock %} {% block stylesheets %} diff --git a/pages/templates/manpages/package.tpl b/pages/templates/manpages/package.html similarity index 94% rename from pages/templates/manpages/package.tpl rename to pages/templates/manpages/package.html index 1988e36..73a0ebb 100644 --- a/pages/templates/manpages/package.tpl +++ b/pages/templates/manpages/package.html @@ -1,4 +1,4 @@ -{% extends "templates/base.tpl" %} +{% extends "templates/base.html" %} {% block title %}{{ package }} ({{ distribution }} {{ version }}) man pages{% endblock %} diff --git a/pages/mimi_and_eunice.html b/pages/templates/mimi_and_eunice/index.html similarity index 55% rename from pages/mimi_and_eunice.html rename to pages/templates/mimi_and_eunice/index.html index 7d401ed..f3c2b4a 100644 --- a/pages/mimi_and_eunice.html +++ b/pages/templates/mimi_and_eunice/index.html @@ -1,17 +1,4 @@ -{% extends "templates/base.tpl" %} - -{% set data = query(""" - prefix comics: - - SELECT ?number ?title - WHERE { - [] comics:series ; - comics:number ?number; - comics:title ?title - } - ORDER BY ?number - """) -%} +{% extends "templates/base.html" %} {% block title %}Mimi & Eunice{% endblock %} diff --git a/pages/templates/mimi_and_eunice/strip.tpl b/pages/templates/mimi_and_eunice/strip.html similarity index 96% rename from pages/templates/mimi_and_eunice/strip.tpl rename to pages/templates/mimi_and_eunice/strip.html index 02fd374..0d48798 100644 --- a/pages/templates/mimi_and_eunice/strip.tpl +++ b/pages/templates/mimi_and_eunice/strip.html @@ -1,4 +1,4 @@ -{% extends "templates/base.tpl" %} +{% extends "templates/base.html" %} {% block title %}Mimi&Eunice {{ data['comics:number'] }}: {{ data['comics:title'] }}{% endblock %} diff --git a/pages/virtual_hosting_platform_for_free_software.html b/pages/virtual_hosting_platform_for_free_software.html index 4acd30a..4260d53 100644 --- a/pages/virtual_hosting_platform_for_free_software.html +++ b/pages/virtual_hosting_platform_for_free_software.html @@ -1,5 +1,5 @@ {% set title = "Virtual Hosting platform For Free Software" %} -{% extends "templates/article.tpl" %} +{% extends "templates/articles/article.html" %} {% block article %} diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..eb05362 --- /dev/null +++ b/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: