diff --git a/THANKS b/THANKS
index e4eed231..1d867471 100644
--- a/THANKS
+++ b/THANKS
@@ -88,6 +88,7 @@ Joseph Reagle
Joshua Adelman
Julian Berman
Justin Mayer
+Kevin Deldycke
Kyle Fuller
Laureline Guerin
Leonard Huang
diff --git a/docs/faq.rst b/docs/faq.rst
index da37af04..80e14d21 100644
--- a/docs/faq.rst
+++ b/docs/faq.rst
@@ -65,12 +65,13 @@ How do I create my own theme?
Please refer to :ref:`theming-pelican`.
-I want to use Markdown, but I got an error.
-===========================================
+I'm using Markdown and getting ``No valid files found in content`` errors.
+==========================================================================
-Markdown is not a hard dependency for Pelican, so you will need to explicitly
-install it. You can do so by typing the following command, prepending ``sudo``
-if permissions require it::
+Markdown is not a hard dependency for Pelican, so if you have content in
+Markdown format, you will need to explicitly install the Markdown library.
+You can do so by typing the following command, prepending ``sudo`` if
+permissions require it::
pip install markdown
diff --git a/docs/plugins.rst b/docs/plugins.rst
index 6de01d05..5e311fb6 100644
--- a/docs/plugins.rst
+++ b/docs/plugins.rst
@@ -80,7 +80,7 @@ article_generator_finalized article_generator invoked at the e
get_generators generators invoked in Pelican.get_generator_classes,
can return a Generator, or several
generator in a tuple or in a list.
-page_generate_context page_generator, metadata
+page_generator_context page_generator, metadata
page_generator_init page_generator invoked in the PagesGenerator.__init__
page_generator_finalized page_generator invoked at the end of PagesGenerator.generate_context
content_object_init content_object invoked at the end of Content.__init__ (see note below)
diff --git a/docs/tips.rst b/docs/tips.rst
index 7629481f..b140ea3c 100644
--- a/docs/tips.rst
+++ b/docs/tips.rst
@@ -94,3 +94,8 @@ directly into your source content.
Alternatively, you can also use Pelican plugins like ``liquid_tags``,
``pelican_youtube``, or ``pelican_vimeo`` to embed videos in your content.
+
+Moreover, markup languages like reST and Markdown have plugins that let you
+embed videos in the markup. You can use `reST video directive
+`_ for reST or `mdx_video plugin
+`_ for Markdown.
diff --git a/pelican/contents.py b/pelican/contents.py
index dbc33716..059c54a7 100644
--- a/pelican/contents.py
+++ b/pelican/contents.py
@@ -189,8 +189,8 @@ class Content(object):
instrasite_link_regex = self.settings['INTRASITE_LINK_REGEX']
regex = r"""
- (?P<\s*[^\>]* # match tag with src and href attr
- (?:href|src)\s*=)
+ (?P<\s*[^\>]* # match tag with all url-value attributes
+ (?:href|src|poster|data|cite|formaction|action)\s*=)
(?P["\']) # require value to be quoted
(?P{0}(?P.*?)) # the url value
diff --git a/pelican/tests/output/custom/a-markdown-powered-article.html b/pelican/tests/output/custom/a-markdown-powered-article.html
index 4d1fe16f..a5c1bb35 100644
--- a/pelican/tests/output/custom/a-markdown-powered-article.html
+++ b/pelican/tests/output/custom/a-markdown-powered-article.html
@@ -55,14 +55,16 @@
Comments !
+ Please enable JavaScript to view the comments.
@@ -105,7 +107,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/archives.html b/pelican/tests/output/custom/archives.html
index a2ab7430..13c3d980 100644
--- a/pelican/tests/output/custom/archives.html
+++ b/pelican/tests/output/custom/archives.html
@@ -92,7 +92,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/article-1.html b/pelican/tests/output/custom/article-1.html
index 89e12914..629ba81d 100644
--- a/pelican/tests/output/custom/article-1.html
+++ b/pelican/tests/output/custom/article-1.html
@@ -54,14 +54,16 @@
Comments !
+ Please enable JavaScript to view the comments.
@@ -104,7 +106,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/article-2.html b/pelican/tests/output/custom/article-2.html
index 1113e5e8..56d6360a 100644
--- a/pelican/tests/output/custom/article-2.html
+++ b/pelican/tests/output/custom/article-2.html
@@ -54,14 +54,16 @@
Comments !
+ Please enable JavaScript to view the comments.
@@ -104,7 +106,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/article-3.html b/pelican/tests/output/custom/article-3.html
index c7306605..fac56b98 100644
--- a/pelican/tests/output/custom/article-3.html
+++ b/pelican/tests/output/custom/article-3.html
@@ -54,14 +54,16 @@
Comments !
+ Please enable JavaScript to view the comments.
@@ -104,7 +106,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/author/alexis-metaireau.html b/pelican/tests/output/custom/author/alexis-metaireau.html
index d2350bd5..19c254a0 100644
--- a/pelican/tests/output/custom/author/alexis-metaireau.html
+++ b/pelican/tests/output/custom/author/alexis-metaireau.html
@@ -165,7 +165,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/author/alexis-metaireau2.html b/pelican/tests/output/custom/author/alexis-metaireau2.html
index 91ef0696..772d2939 100644
--- a/pelican/tests/output/custom/author/alexis-metaireau2.html
+++ b/pelican/tests/output/custom/author/alexis-metaireau2.html
@@ -175,7 +175,7 @@ YEAH !
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/author/alexis-metaireau3.html b/pelican/tests/output/custom/author/alexis-metaireau3.html
index 77c9cdfe..f3d985c3 100644
--- a/pelican/tests/output/custom/author/alexis-metaireau3.html
+++ b/pelican/tests/output/custom/author/alexis-metaireau3.html
@@ -130,7 +130,7 @@ pelican.conf, it ...
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/authors.html b/pelican/tests/output/custom/authors.html
index adb3d992..eb2becfd 100644
--- a/pelican/tests/output/custom/authors.html
+++ b/pelican/tests/output/custom/authors.html
@@ -71,7 +71,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/categories.html b/pelican/tests/output/custom/categories.html
index 5d839648..17d9de76 100644
--- a/pelican/tests/output/custom/categories.html
+++ b/pelican/tests/output/custom/categories.html
@@ -72,7 +72,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/category/bar.html b/pelican/tests/output/custom/category/bar.html
index 3f1bbc4a..30545518 100644
--- a/pelican/tests/output/custom/category/bar.html
+++ b/pelican/tests/output/custom/category/bar.html
@@ -95,7 +95,7 @@ YEAH !
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/category/cat1.html b/pelican/tests/output/custom/category/cat1.html
index 81718322..9a737b76 100644
--- a/pelican/tests/output/custom/category/cat1.html
+++ b/pelican/tests/output/custom/category/cat1.html
@@ -162,7 +162,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/category/misc.html b/pelican/tests/output/custom/category/misc.html
index 36479803..b70afcdf 100644
--- a/pelican/tests/output/custom/category/misc.html
+++ b/pelican/tests/output/custom/category/misc.html
@@ -173,7 +173,7 @@ pelican.conf, it ...
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/category/yeah.html b/pelican/tests/output/custom/category/yeah.html
index 53666b0b..02d07413 100644
--- a/pelican/tests/output/custom/category/yeah.html
+++ b/pelican/tests/output/custom/category/yeah.html
@@ -99,7 +99,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/drafts/a-draft-article.html b/pelican/tests/output/custom/drafts/a-draft-article.html
index b8306208..440780a3 100644
--- a/pelican/tests/output/custom/drafts/a-draft-article.html
+++ b/pelican/tests/output/custom/drafts/a-draft-article.html
@@ -92,7 +92,7 @@ listed anywhere else.
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/filename_metadata-example.html b/pelican/tests/output/custom/filename_metadata-example.html
index fcbda9c2..9967b4ce 100644
--- a/pelican/tests/output/custom/filename_metadata-example.html
+++ b/pelican/tests/output/custom/filename_metadata-example.html
@@ -54,14 +54,16 @@
Comments !
+ Please enable JavaScript to view the comments.
@@ -104,7 +106,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/index.html b/pelican/tests/output/custom/index.html
index 3fa1d5c3..c7174715 100644
--- a/pelican/tests/output/custom/index.html
+++ b/pelican/tests/output/custom/index.html
@@ -165,7 +165,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/index2.html b/pelican/tests/output/custom/index2.html
index 8769d098..b349b3ca 100644
--- a/pelican/tests/output/custom/index2.html
+++ b/pelican/tests/output/custom/index2.html
@@ -175,7 +175,7 @@ YEAH !
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/index3.html b/pelican/tests/output/custom/index3.html
index b4d9ffc6..c668dba6 100644
--- a/pelican/tests/output/custom/index3.html
+++ b/pelican/tests/output/custom/index3.html
@@ -130,7 +130,7 @@ pelican.conf, it ...
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/jinja2_template.html b/pelican/tests/output/custom/jinja2_template.html
index 31beac32..0eafa913 100644
--- a/pelican/tests/output/custom/jinja2_template.html
+++ b/pelican/tests/output/custom/jinja2_template.html
@@ -69,7 +69,7 @@ Some text
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/oh-yeah-fr.html b/pelican/tests/output/custom/oh-yeah-fr.html
index 410c721f..bdafb45f 100644
--- a/pelican/tests/output/custom/oh-yeah-fr.html
+++ b/pelican/tests/output/custom/oh-yeah-fr.html
@@ -56,14 +56,16 @@ Translations:
Comments !
+ Please enable JavaScript to view the comments.
@@ -106,7 +108,7 @@ Translations:
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/oh-yeah.html b/pelican/tests/output/custom/oh-yeah.html
index dab28171..8068a224 100644
--- a/pelican/tests/output/custom/oh-yeah.html
+++ b/pelican/tests/output/custom/oh-yeah.html
@@ -61,14 +61,16 @@ YEAH !
Comments !
+ Please enable JavaScript to view the comments.
@@ -111,7 +113,7 @@ YEAH !
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/override/index.html b/pelican/tests/output/custom/override/index.html
index 9c48d76f..e84d79fe 100644
--- a/pelican/tests/output/custom/override/index.html
+++ b/pelican/tests/output/custom/override/index.html
@@ -73,7 +73,7 @@ at a custom location.
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/pages/this-is-a-test-hidden-page.html b/pelican/tests/output/custom/pages/this-is-a-test-hidden-page.html
index a061b7ee..dced8107 100644
--- a/pelican/tests/output/custom/pages/this-is-a-test-hidden-page.html
+++ b/pelican/tests/output/custom/pages/this-is-a-test-hidden-page.html
@@ -73,7 +73,7 @@ Anyone can see this page but it's not linked to anywhere!
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/pages/this-is-a-test-page.html b/pelican/tests/output/custom/pages/this-is-a-test-page.html
index af50adf8..46ea4fef 100644
--- a/pelican/tests/output/custom/pages/this-is-a-test-page.html
+++ b/pelican/tests/output/custom/pages/this-is-a-test-page.html
@@ -73,7 +73,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/second-article-fr.html b/pelican/tests/output/custom/second-article-fr.html
index cbeef437..c1400c7c 100644
--- a/pelican/tests/output/custom/second-article-fr.html
+++ b/pelican/tests/output/custom/second-article-fr.html
@@ -56,14 +56,16 @@
Comments !
+ Please enable JavaScript to view the comments.
@@ -106,7 +108,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/second-article.html b/pelican/tests/output/custom/second-article.html
index 57009066..e37e90f3 100644
--- a/pelican/tests/output/custom/second-article.html
+++ b/pelican/tests/output/custom/second-article.html
@@ -56,14 +56,16 @@
Comments !
+ Please enable JavaScript to view the comments.
@@ -106,7 +108,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/tag/bar.html b/pelican/tests/output/custom/tag/bar.html
index 9560b712..7a90eff2 100644
--- a/pelican/tests/output/custom/tag/bar.html
+++ b/pelican/tests/output/custom/tag/bar.html
@@ -148,7 +148,7 @@ YEAH !
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/tag/baz.html b/pelican/tests/output/custom/tag/baz.html
index c6ebe542..81f419be 100644
--- a/pelican/tests/output/custom/tag/baz.html
+++ b/pelican/tests/output/custom/tag/baz.html
@@ -54,14 +54,16 @@
Comments !
+ Please enable JavaScript to view the comments.
@@ -104,7 +106,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/tag/foo.html b/pelican/tests/output/custom/tag/foo.html
index d5b0d413..d99df63b 100644
--- a/pelican/tests/output/custom/tag/foo.html
+++ b/pelican/tests/output/custom/tag/foo.html
@@ -118,7 +118,7 @@ as well as inline markup .
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/tag/foobar.html b/pelican/tests/output/custom/tag/foobar.html
index 0b4d2471..ded91f12 100644
--- a/pelican/tests/output/custom/tag/foobar.html
+++ b/pelican/tests/output/custom/tag/foobar.html
@@ -99,7 +99,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/tag/oh.html b/pelican/tests/output/custom/tag/oh.html
index 3b30a39c..21c8e352 100644
--- a/pelican/tests/output/custom/tag/oh.html
+++ b/pelican/tests/output/custom/tag/oh.html
@@ -72,7 +72,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/tag/yeah.html b/pelican/tests/output/custom/tag/yeah.html
index a6764575..523358b5 100644
--- a/pelican/tests/output/custom/tag/yeah.html
+++ b/pelican/tests/output/custom/tag/yeah.html
@@ -95,7 +95,7 @@ YEAH !
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/tags.html b/pelican/tests/output/custom/tags.html
index bc9b9d20..2e70c9e8 100644
--- a/pelican/tests/output/custom/tags.html
+++ b/pelican/tests/output/custom/tags.html
@@ -76,7 +76,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/this-is-a-super-article.html b/pelican/tests/output/custom/this-is-a-super-article.html
index 0a580e25..d3a3c038 100644
--- a/pelican/tests/output/custom/this-is-a-super-article.html
+++ b/pelican/tests/output/custom/this-is-a-super-article.html
@@ -65,14 +65,16 @@
Comments !
+ Please enable JavaScript to view the comments.
@@ -115,7 +117,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/output/custom/unbelievable.html b/pelican/tests/output/custom/unbelievable.html
index 03b533bb..8b2d26ce 100644
--- a/pelican/tests/output/custom/unbelievable.html
+++ b/pelican/tests/output/custom/unbelievable.html
@@ -86,14 +86,16 @@ pelican.conf, it will have nothing in default.
Comments !
+ Please enable JavaScript to view the comments.
@@ -136,7 +138,7 @@ pelican.conf, it will have nothing in default.
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/tests/test_contents.py b/pelican/tests/test_contents.py
index 9c894ffc..92e61355 100644
--- a/pelican/tests/test_contents.py
+++ b/pelican/tests/test_contents.py
@@ -268,6 +268,61 @@ class TestPage(unittest.TestCase):
'?utm_whatever=234&highlight=word#section-2">link'
)
+ def test_intrasite_link_more(self):
+ # type does not take unicode in PY2 and bytes in PY3, which in
+ # combination with unicode literals leads to following insane line:
+ cls_name = '_DummyAsset' if six.PY3 else b'_DummyAsset'
+
+ args = self.page_kwargs.copy()
+ args['settings'] = get_settings()
+ args['source_path'] = 'content'
+ args['context']['filenames'] = {
+ 'images/poster.jpg': type(cls_name, (object,), {'url': 'images/poster.jpg'}),
+ 'assets/video.mp4': type(cls_name, (object,), {'url': 'assets/video.mp4'}),
+ 'images/graph.svg': type(cls_name, (object,), {'url': 'images/graph.svg'}),
+ 'reference.rst': type(cls_name, (object,), {'url': 'reference.html'}),
+ }
+
+ # video.poster
+ args['content'] = (
+ 'There is a video with poster '
+ ''
+ ''
+ ' '
+ )
+ content = Page(**args).get_content('http://notmyidea.org')
+ self.assertEqual(
+ content,
+ 'There is a video with poster '
+ ''
+ ''
+ ' '
+ )
+
+ # object.data
+ args['content'] = (
+ 'There is a svg object '
+ ' '
+ )
+ content = Page(**args).get_content('http://notmyidea.org')
+ self.assertEqual(
+ content,
+ 'There is a svg object '
+ ' '
+ )
+
+ # blockquote.cite
+ args['content'] = (
+ 'There is a blockquote with cite attribute '
+ 'blah blah '
+ )
+ content = Page(**args).get_content('http://notmyidea.org')
+ self.assertEqual(
+ content,
+ 'There is a blockquote with cite attribute '
+ 'blah blah '
+ )
+
class TestArticle(TestPage):
def test_template(self):
diff --git a/pelican/themes/notmyidea/templates/article.html b/pelican/themes/notmyidea/templates/article.html
index 516fd3b5..06110b43 100644
--- a/pelican/themes/notmyidea/templates/article.html
+++ b/pelican/themes/notmyidea/templates/article.html
@@ -6,7 +6,7 @@
+ title="Permalink to {{ article.title|striptags }}">{{ article.title }}
{% include 'twitter.html' %}
@@ -19,14 +19,16 @@
Comments !
+ Please enable JavaScript to view the comments.
{% endif %}
diff --git a/pelican/themes/notmyidea/templates/disqus_script.html b/pelican/themes/notmyidea/templates/disqus_script.html
index c4f442c8..4ee419bb 100644
--- a/pelican/themes/notmyidea/templates/disqus_script.html
+++ b/pelican/themes/notmyidea/templates/disqus_script.html
@@ -4,7 +4,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
diff --git a/pelican/themes/notmyidea/templates/twitter.html b/pelican/themes/notmyidea/templates/twitter.html
index c6b159f4..7247a0c6 100644
--- a/pelican/themes/notmyidea/templates/twitter.html
+++ b/pelican/themes/notmyidea/templates/twitter.html
@@ -1,3 +1,3 @@
{% if TWITTER_USERNAME %}
-
-{% endif %}
\ No newline at end of file
+
+{% endif %}
diff --git a/pelican/writers.py b/pelican/writers.py
index da105929..6cf5232d 100644
--- a/pelican/writers.py
+++ b/pelican/writers.py
@@ -60,7 +60,7 @@ class Writer(object):
"""
if filename in self._overridden_files:
if override:
- raise StandardError('File %s is set to be overridden twice'
+ raise RuntimeError('File %s is set to be overridden twice'
% filename)
else:
logger.info('skipping %s' % filename)
@@ -69,7 +69,7 @@ class Writer(object):
if override:
logger.info('overwriting %s' % filename)
else:
- raise StandardError('File %s is to be overwritten' % filename)
+ raise RuntimeError('File %s is to be overwritten' % filename)
if override:
self._overridden_files.add(filename)
self._written_files.add(filename)