Commit graph

3,496 commits

Author SHA1 Message Date
MinchinWeb
2b631ab4d3 Listen: set minimum logging level to INFO
This way we can see the server requests.
2021-10-04 22:40:31 -06:00
MinchinWeb
0b9a488c26 Use rich logging for Pelican server 2021-10-04 22:40:31 -06:00
Justin Mayer
e2c73a0a16
Merge pull request #2932 from BenSturmfels/master
Remove shebang lines from generated pelicanconf.py and publishconf.py
2021-10-05 06:17:48 +02:00
Justin Mayer
324fcefae7
Merge pull request #2931 from avaris/server-list-files
Adjust suffix in server to allow redirection when needed
2021-10-05 06:12:04 +02:00
Ben Sturmfels
c5c7483268
Remove shebang lines from generated pelicanconf.py and publishconf.py.
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.
2021-10-05 10:00:48 +11:00
Deniz Turgut
2d97a45902
Adjust suffix in server to allow redirection when needed
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.
2021-10-05 01:44:12 +03:00
botpub
f862d64b7a Release Pelican 4.7.0 4.7.0 2021-10-01 14:10:26 +00:00
Justin Mayer
7dec2660fb Prepare release 2021-10-01 16:04:47 +02:00
Justin Mayer
f9238269d7 Tweak changelog 2021-10-01 15:35:41 +02:00
Justin Mayer
492ed61c9f Update changelog 2021-10-01 15:30:03 +02:00
Justin Mayer
eacd6435ef Minor README tweaks 2021-10-01 15:04:58 +02:00
Justin Mayer
24aefd3b1b
Merge pull request #2904 from GiovanH/pickle-typeerror
Pickle.dump can raise TypeError (e.g. generators)
2021-09-29 12:58:46 +02:00
Justin Mayer
7ccaa9a6b6
Merge pull request #2897 from MinchinWeb/rich-logging
Rich logging
2021-09-29 12:56:48 +02:00
ImBearChild
22192c148a Improve word count behavior when generating summary
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.
2021-09-29 12:41:00 +02:00
Ben Sturmfels
a088f8bb9e Update tests for other locales 2021-09-28 14:05:32 +02:00
Ben Sturmfels
62a878ded3 Update tests to match theme changes 2021-09-28 14:05:08 +02:00
Ben Sturmfels
991cebf95d Update notmyidea theme to scale down to smaller screens
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
2021-09-28 14:03:05 +02:00
Gio
438938819e Pickle.dump can raise TypeError (e.g. generators) 2021-08-01 17:06:34 -05:00
MinchinWeb
332be6e5c8
Support date format codes G, V, and u (used by ISO dates) (#2902) 2021-07-13 09:35:22 +02:00
Justin Mayer
0919507ae7
Merge pull request #2901 from MinchinWeb/writer-docs
Document how to add a new writer
2021-07-13 09:33:34 +02:00
MinchinWeb
a168470f29 Use rich.console with printing settings 2021-07-09 09:56:11 -06:00
MinchinWeb
1cd7dd6a28 Print to the (rich) console, rather than directly 2021-07-09 09:55:48 -06:00
MinchinWeb
bc21922cf2 Don't preformat log messages
as per review notes
2021-07-09 09:51:06 -06:00
MinchinWeb
58e3770b80 Document how to add a new writer
c.f. #2899
2021-07-09 08:28:15 -06:00
MinchinWeb
7eb730af78 Nicer logging of found writer
matches generator format
2021-07-08 23:26:33 -06:00
MinchinWeb
a52922bfb5 Move rich's console to log.py 2021-07-08 21:33:22 -06:00
Tristan Miller
82098a634f
Fix formatting of Jinja example code. Fixes #2884 (#2886) 2021-07-07 08:48:10 +02:00
MinchinWeb
7d492bad67 Remove log format test
as *rich* is now doing this
2021-06-30 23:29:20 -06:00
MinchinWeb
4bfcedb8a5 Share rich handler between spinner and logging 2021-06-30 23:03:22 -06:00
MinchinWeb
80f44c494a Switch to rich logging 2021-06-30 22:47:32 -06:00
Justin Mayer
ee8fb6998c
Merge pull request #2892 from MinchinWeb/typo-fix
Fix typo in docstring
2021-06-30 08:56:28 +02:00
Justin Mayer
7dfac1c0c0
Merge pull request #2882 from MinchinWeb/patch-1
Allow easy subclassing of Writer
2021-06-30 08:54:04 +02:00
MinchinWeb
2cafe926fa typo fix
"current" only has two "r"s
2021-06-15 22:41:38 -06:00
Tristan Miller
e800b23b4d
Update links to Jinja docs. Fixes #2883 (#2885) 2021-06-12 08:48:32 -05:00
Justin Mayer
c10792c679
Merge pull request #2878 from jzc/filename-metadata-typo
Fix FILENAME_METADATA doc to render correctly
2021-06-12 08:45:58 -05:00
MinchinWeb
845acfe1ac Allow easy subclassing of Writer
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`.
2021-06-08 14:01:32 -06:00
Justin Mayer
c041bf2192 Fix failing tests on Jinja 3+ 2021-06-08 11:40:27 -05:00
jzc
c41b8abb13 Fix FILENAME_METADATA doc to render correctly 2021-05-20 00:11:58 -06:00
Gio
add3628a64 Add support for hidden articles 2021-05-04 13:54:32 -05:00
Petr Viktorin
487da3550b Add period_num var for period_archives template
This makes it easier to create templates that are language-agnostic
or need extra processing for the date period.
2021-05-04 12:41:17 -05:00
Justin Mayer
7893455b43
Merge pull request #2838 from namn/patch-2
Use a top (instead of bottom) border in hentry
2021-04-27 20:14:10 +02:00
Justin Mayer
fb9df68477
Merge pull request #2869 from getpelican/rich
Add progress spinner animation during generation
2021-04-27 14:42:22 +02:00
Justin Mayer
40f3d2df91 Add progress spinner animation during generation
This is a first step at enriching console output via the `rich` project.
2021-04-21 10:16:59 +02:00
Justin Mayer
14afc6c54a Update Pelican feature documentation 2021-04-21 10:16:28 +02:00
Justin Mayer
fd3ad0c16e Update contributing docs and Poetry repository URL 2021-04-21 10:05:28 +02:00
Justin Mayer
c461def10a Update to v2 of cache GitHub Action 2021-04-21 09:57:08 +02:00
Justin Mayer
dac01831f2
Merge pull request #2868 from MinchinWeb/patch-1
Fix `invoke tests` task problem on Windows
2021-04-19 16:44:29 +02:00
Romain Porte
a00284f744
Automatically open browser when Invoke task starts web server (#2764)
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>
2021-04-19 15:59:41 +02:00
Justin Mayer
88953d45d5 Strip HTML tags from notmyidea page template's title
Fixes #2843
2021-04-19 10:25:59 +02:00
MinchinWeb
cf4e8d527d
Update tasks.py
PTY is not supported on Windows.
2021-04-18 22:20:54 -06:00