We want to hint at the location of our default set of substitutions.
This should allow easier reuse for plugin authors who need to access
this utility as well.
Closes#2845
Currently the `assertDirsEqual` test utility uses the `env` argument to `subprocess.Popen` to make git run non-interactively, but this overwrites all environment variables causing test failures on Guix. The `--no-pager` option is a more targeted way to achieve the same thing.
Filtration is now being applied before caching the metadata, solving the issue where _DISCARD objects from previous runs were being retrieved from cache.
These configuration files do not need a #! line as they are not intended to be
executed directly and are not marked as executable. (In practise this doesn't
cause any problems - it just came up in a Guix bug report because Guix
transforms the #! lines.)
The "coding: utf-8" lines are also no longer required now that Pelican is Python
3 only.
Folders without index.html has to be redirected (/foo -> /foo/) for
directory listing to work properly. Skip '/' suffix if original path
does not have it so that base class can return a redirect.
Improve _HTMLWordTruncator by using more than one unicode block in
_word_regex, making word count function behave properly with CJK,
Cyrillic, and more Latin characters when generating summary.
The aim here is to make the theme work respectably on mobile devices
with only modest changes. Providing different layouts at multiple
breakpoints is beyond the scope of this change.
The changes here are:
1. `base.html`: Add a `<meta name="viewport"` element
2. `main.css`:
* Use "max-width" instead of "width"
* Set "line-height" on the banner and adjust vertical spacing to match
* Remove fixed height on the nav bar and force it to contain its
child elements
When you write a custom Writer, it gets called with `settings=None`. If you writer is simply a subclass of the built-in Writer, Pelican will through the error `CRITICAL: 'RELATIVE_URLS'`.
The source of the error is from `Pelican._get_writer()` in `__init__.py`.
When the `serve` and `livereload` targets are invoked, a web browser will be
automatically opened, pointing to the locally-served website.
If no web browser can be found by the module, the `open()` call returns
`False`, but no exception is raised. This means that it is still possible
to call livereload on a remote machine and access it without any error
being triggered.
Signed-off-by: Romain Porte <microjoe@microjoe.org>
- use custom build command, with caching turned on - this reduces site
build time by around 40% on my testing machines
- collect all glob patterns in a list and then call `server.watch`
on each item - this allows to have single place where callback
function must be specified
- use '**/*.html' as glob in template, to track changes in
subdirectories