[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

bits.d.o as an onion service


As listed on onion.debian.org bits.debian.org is available via
4ypuji3wwrg5zoxm.onion [0] as an onion service, which works in so far as
the content can be accessed this way, but the CSS file as well as the
logo are hardcoded to be fetched from https://bits.debian.org which
makes accessing it via an onion service less useful…

Also: all internal links point to the 'normal' domain, too, so it isn't
easy to stick to the onion service address while browsing the postings.

The attached draft patch should resolve this and as a bonus fixes some
other minor problems, too. I have never used pelican through and don't
know if there isn't a deeper reason for the absolute URL hiding
somewhere… (the comment is a tiny bit suspicious).
I just quickly tested it and it doesn't seem to explode directly… so
feel free to ignore/salvage my diff as you see fit. Shout if you want
me to produce a proper patch series instead.

I haven't touched one problem through: The html5shiv URI used for IE is
returning 404 by now so you would need to find a replacement – assuming
support couldn't be just dropped… aside: I don't see html5 elements
being used here in the template at all. Was that intended?

The same absolute URL problem is present with micronews.debian.net btw
as it uses the same technical base.

Best regards

David Kalnischkies

[0] If you don't want to install Tor just to test this feel free to
check via https://4ypuji3wwrg5zoxm.onion.to/ (aka tor2web service).
diff --git a/content/pages/about-es.md b/content/pages/about-es.md
index e309f7c..23ac395 100644
--- a/content/pages/about-es.md
+++ b/content/pages/about-es.md
@@ -23,6 +23,6 @@ distribución de debian-publicity][debian-publicity]. Se trata de un archivo pú
 [pelican]: http://getpelican.com/ "Descubra más sobre Pelican"
 [debian]: https://www.debian.org "Debian - El sistema operativo universal"
-[gitdo]: http://anonscm.debian.org/cgit/publicity/bits.git
+[gitdo]: https://anonscm.debian.org/git/publicity/bits.git
 [wwwlicense]: https://www.debian.org/license
 [debian-publicity]: https://lists.debian.org/debian-publicity/
diff --git a/content/pages/about-vi.md b/content/pages/about-vi.md
index e723085..fe31ebe 100644
--- a/content/pages/about-vi.md
+++ b/content/pages/about-vi.md
@@ -23,6 +23,6 @@ debian-publicity][debian-publicity]. Đây là bó được lưu trữ công kha
 [pelican]: http://getpelican.com/ "Tìm các thông tin giới thiệu về Pelican"
 [debian]: https://www.debian.org "Debian - Hệ điều hành toàn cầu"
-[gitdo]: http://anonscm.debian.org/cgit/publicity/bits.git
+[gitdo]: https://anonscm.debian.org/git/publicity/bits.git
 [wwwlicense]: https://www.debian.org/license
 [debian-publicity]: https://lists.debian.org/debian-publicity/
diff --git a/content/pages/about.md b/content/pages/about.md
index 629e077..d9ff857 100644
--- a/content/pages/about.md
+++ b/content/pages/about.md
@@ -19,9 +19,12 @@ website, see [Debian WWW pages license][wwwlicense].
 If you want to contact us, please send an email to the [debian-publicity
 mailing list][debian-publicity]. This is a publically archived list.
+This blog is also available as an [onion service][onion].
 [pelican]: http://getpelican.com/ "Find out about Pelican"
 [debian]: https://www.debian.org "Debian - The Universal Operating System"
-[gitdo]: http://anonscm.debian.org/cgit/publicity/bits.git
+[gitdo]: https://anonscm.debian.org/git/publicity/bits.git
 [wwwlicense]: https://www.debian.org/license
 [debian-publicity]: https://lists.debian.org/debian-publicity/
+[onion]: http://4ypuji3wwrg5zoxm.onion
diff --git a/output/.gitkeep b/output/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/pelicanconf.py b/pelicanconf.py
index 82c6c98..82a9834 100644
--- a/pelicanconf.py
+++ b/pelicanconf.py
@@ -18,14 +18,13 @@ LOCALE='C'
 # URL settings
 # We might want this for publication
 ARTICLE_URL = '{date:%Y}/{date:%m}/{slug}.html'
 ARTICLE_SAVE_AS = '{date:%Y}/{date:%m}/{slug}.html'
 ARTICLE_LANG_URL = '{date:%Y}/{date:%m}/{slug}-{lang}.html'
 ARTICLE_LANG_SAVE_AS = '{date:%Y}/{date:%m}/{slug}-{lang}.html'
 # Feeds settings
 FEED_ATOM = 'feeds/atom.xml'
 FEED_RSS = 'feeds/feed.rss'
@@ -43,10 +42,10 @@ CATEGORIES_SAVE_AS = None
-MENUITEMS =  (('Home', 'http://bits.debian.org'),)
+MENUITEMS =  (('Home', '/'),)
-SOCIAL = (('identi.ca/debian', 'http://identi.ca/debian'),
-          ('Debian Project News', 'http://www.debian.org/News/'),
+SOCIAL = (('identi.ca/debian', 'https://identi.ca/debian'),
+          ('Debian Project News', 'https://www.debian.org/News/'),
           ('Get Debian', 'http://get.debian.net'),)
diff --git a/theme-bits/templates/base.html b/theme-bits/templates/base.html
index f21eb59..e358760 100644
--- a/theme-bits/templates/base.html
+++ b/theme-bits/templates/base.html
@@ -44,9 +44,9 @@
                 {% endif %}
                 <li><a href="{{ SITEURL }}/archives.html">Archives</a>
-                <li><a href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" rel="alternate">Atom feed</a></li>
+                <li><a href="{{ SITEURL }}/{{ FEED_ATOM }}" rel="alternate">Atom feed</a></li>
                 {% if FEED_RSS %}
-                <li><a href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" rel="alternate">RSS feed</a></li>
+                <li><a href="{{ SITEURL }}/{{ FEED_RSS }}" rel="alternate">RSS feed</a></li>
                 {% endif %}
@@ -94,7 +94,7 @@
     <hr class="nocss" />
     <div id="footer">
-        <p><a href="{{ SITEURL }}">{{ SITENAME }}</a> is the official blog of <a href="http://www.debian.org";>the Debian Project</a></p>
+        <p><a href="{{ SITEURL }}">{{ SITENAME }}</a> is the official blog of <a href="https://www.debian.org";>the Debian Project</a></p>
diff --git a/theme-bits/templates/metadata.html b/theme-bits/templates/metadata.html
index e21aa76..3253ce9 100644
--- a/theme-bits/templates/metadata.html
+++ b/theme-bits/templates/metadata.html
@@ -13,7 +13,5 @@ by <a class="url fn" href="{{ SITEURL }}/{{ article.author.url }}">{{ article.au
 {% if article.tags %}
 with tags {% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> {% endfor %}
 {% endif %}
 {% import 'translations.html' as translations with context %}
 {{ translations.translations_for(article) }}
diff --git a/theme-bits/templates/translations.html b/theme-bits/templates/translations.html
index 425df4a..c375734 100644
--- a/theme-bits/templates/translations.html
+++ b/theme-bits/templates/translations.html
@@ -1,8 +1,9 @@
 {% macro translations_for(article) %}
 {% if article.translations %}
 {% for translation in article.translations|sort(attribute='lang') %}
-<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
+<a href="{{ SITEURL }}/{{ translation.url }}" hreflang="{{ translation.lang }}">{{ translation.lang }}</a>
 {% endfor %}
 {% endif %}
 {% endmacro %}

Attachment: signature.asc
Description: PGP signature

Reply to: