1
0
Fork 0
forked from github/pelican
Commit graph

238 commits

Author SHA1 Message Date
Gio
add3628a64 Add support for hidden articles 2021-05-04 13:54:32 -05: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
Deniz Turgut
aa7c821c70
ignore None return value from get_generators signal 2021-02-12 21:17:42 +03:00
Justin Mayer
f9abcb30e3
Merge pull request #2826 from someone-somenet-org/patch-1
Add "http://" prefix to `pelican --listen` output
2021-01-14 10:54:57 +01:00
Frederik Ring
dc60105926
Stringify plugin definitions so they can be pickled during caching (#2835) 2021-01-04 17:13:32 +01:00
Someone
049bb2e1b3
add "http://" prefix to ip+port 2020-12-09 22:52:42 +01:00
Leonardo Giordani
9435a6c045
Fix code indented incorrectly in generators logging (#2823) 2020-12-01 19:07:51 +01:00
Leonardo Giordani
afdf0fb3cf
Improve logging of generators and writer loaders (#2821) 2020-11-22 17:13:51 +01:00
Justin Mayer
d728cd2696 Rename CLI flag syntax for settings override feature 2020-08-11 12:51:08 +02:00
Peter Sabaini
1c50a18d0a Override settings from the command line
Add a --setting-overrides KEY=VAL command line option to override
default settings or those defined in settings files. This adds
flexibility in running Pelican and helps reduce sprawl of settings
files. Cast int and str setting overrides to their respective types.
Support other setting types by treating them as JSON. Fall back to JSON
when an override typecast errors. This should make it possible to set
int values to None, resp. to JSON 'none'
2020-08-11 12:51:08 +02:00
Deniz Turgut
48d842faa7
Refactor file/folder watchers and autoreload
Combined file and folder watchers under a class and refactored
common watcher related code from __init__.py to the class.
This simplifies the main and autoreload functions in __init__
as well as fix the problem with crashes related to multiprocessing
on systems where default spawn mode is "spawn" instead of "fork".
2020-05-09 16:22:36 +03:00
Justin Mayer
e83a8032e8 Flake8 fix 2020-04-30 21:21:14 +02:00
Justin Mayer
a15f2aba76 Ensure path & output path comparisons are absolute
Otherwise, the following error could be returned:
"ValueError: Can't mix absolute and relative paths"
2020-04-30 21:05:47 +02:00
Justin Mayer
d43b786b30 Modernize code base to Python 3+ syntax
Replaces syntax that was relevant in earlier Python versions but that
now has modernized equivalents.
2020-04-27 09:45:31 +02:00
Justin Mayer
9d10abaed4 Fix output directory deletion logic
The intention was to prevent accidental source content data loss by
skipping output directory deletion if the output directory is a parent
of the source content directory. But the previous implementation did so
by checking path *strings*, resulting in scenarios where the following
settings would erroneously skip deletion of the output directory:

PATH = "/repo/docs-src/content"
OUTPUT_PATH = "/repo/docs"

The output directory should have been deleted but wasn't because the
PATH string contains "/repo/docs". This change eschews string comparison
and instead compares actual paths to ensure that the output path is not
a parent of the source content directory.
2020-04-15 15:19:41 +02:00
Justin Mayer
fa71931503 Exit web server gracefully when user taps CTRL-C
Users were previously met with an ugly traceback. Now `pelican --listen`
invocations, when quit via CTRL-C, are followed instead by a more
user-friendly message.
2020-01-19 09:07:02 +01:00
Justin Mayer
569f8a080e Tell users they can use CTRL-C to stop web server
This knowledge was heretofore assumed but is better made explicit.
2020-01-19 09:07:02 +01:00
Deniz Turgut
58edad6897 remove pelican.signals in favor of pelican.plugins.signals 2019-12-01 18:14:13 +03:00
Deniz Turgut
a2053c34c3 Namespace plugin implementation
* Creates pelican.plugins
* Moves plugin related code under pelican.plugins
  * pelican.plugins.signals is now the location for signals, pelican.signals is kept
    for backwards compatibility
  * pelican.plugins._utils contains necessary bits for plugin discovery and loading.
    Logic from Pelican class is moved here. Pelican class now just asks for plugins
    and registers them
* Contains tests for old and new plugin loading
2019-12-01 17:55:19 +03:00
Deniz Turgut
49bc6ed47f Further remove python2-isms 2019-11-26 06:17:04 +09:00
Kevin Yap
1e0e541b57 Initial pass of removing Python 2 support
This commit removes Six as a dependency for Pelican, replacing the
relevant aliases with the proper Python 3 imports. It also removes
references to Python 2 logic that did not require Six.
2019-11-26 06:16:41 +09:00
Oliver Urs Lenz
2c8e7b3e6b place all deprecated settings handling together 2019-10-04 22:39:57 +02:00
Lucas Cimon
360ff420d3
Allowing to pass argv to pelican main entrypoint 2019-08-01 13:53:56 +02:00
Justin Mayer
54911fff39 Consolidate version strings in pyproject.toml
Storing the current version in a single place greatly simplifies
issuing new package releases.
2019-07-05 08:08:08 +02:00
Justin Mayer
24515c2cf0
Merge pull request #2476 from oulenz/collections
Try importing from collections.abc for compatibility with Python 3.8
2019-04-25 14:05:31 +02:00
John Franey
3395e71570 Fix linting issues
Fixes linting issues that caused the `flake8` CI stage to fail.
2019-02-06 10:22:57 -04:00
Justin Mayer
2f077037ba Prepare for next version 2018-11-30 09:00:11 -08:00
Justin Mayer
24d6efa9fd Prepare to release Pelican 4.0.1 2018-11-30 08:31:43 -08:00
Oliver Urs Lenz
9ae32b8ff9 Try importing from collections.abc for compatibility with Python 3.8 2018-11-24 21:59:40 +01:00
Justin Mayer
940d4534a1 Prepare to release Pelican 4.0 2018-11-13 14:55:25 +01:00
Oliver Urs Lenz
048ea4dc0c automatically copy linked static files 2018-11-01 18:08:11 +01:00
Justin Mayer
ab9b21c03d Move --print-settings logic out of main() 2018-10-26 12:00:40 +02:00
Justin Mayer
f130695bbf Support multiple --print-settings arguments 2018-10-24 11:49:03 +02:00
Justin Mayer
e81a284c39 Add CLI argument to print current settings
Fixes #2275
Refs #1762
2018-10-23 19:57:26 +02:00
Justin Mayer
ec1914d3bd
Merge pull request #2371 from oulenz/draft_pages
Allow pages to have draft status, like articles
2018-07-04 18:20:57 +02:00
Oliver Urs Lenz
576229ad19 allows pages to have draft status, like articles 2018-07-03 12:53:46 +02:00
Johannes 'josch' Schauer
a5edbf8546 Remove develop_server.sh in favour of pelican serving static files itself
Competing static site generators integrate the functionality of regenerating
content and serving it into their main executable. In pelican this
functionality used to be in an external script `develop_server.sh` which
resides in the blog base directory. This has the disadvantage that changes in
pelican can break the `develop_server.sh` scripts which will not automatically
be upgraded together with pelican by package managers. Thus, pelican should
integrate this functionality into its main executable.

To this end, this commit removes `develop_server.sh` and adds three command
line options to the pelican executable:

 * `-l/--listen` starts the HTTP server (`-s/--serve` was already taken)
 * `-p/--port` specifies the port to listen at
 * `-b/--bind` specifies the IP to bind to

`--listen` and `--autoreload` can be used together to achieve the same
effect that other static site generators offer: Serve files via HTTP
while at the same time auto-generating the content.

Since the `develop_server.sh` script was removed, pelican-quickstart looses the
`develop` option.

Since the `develop_server.sh` script was removed, the Makefile looses the
`stopserver` target and the `devserver` target is replaced by running `pelican
-l` in the foreground.

Since pelican now offers the `--listen` option, the fabfile uses that instead
of starting the socketserver itself.
2018-06-22 19:22:38 +02:00
Adrin Jalali
ee24ad1821 Elaborate the warning message when no files are processed by readers. (#2310)
Elaborate warning message when no files are processed by readers
2018-06-22 15:00:21 +02:00
Justin Mayer
2d24d6b997
Merge pull request #2288 from charlesfleche/fix-metadata-intrasite-links-squashed
Fix intrasite links for non-'summary' metadata

Metadata like `MyArticleBanner: ![alt text]({attach}banner.jpg)` would be properly parsed (as defined in `FORMATTED_FIELDS`), but the intrasite links would not be processed.

Only the summary gets its intrasite links processed, has its value is either generated from the content (calling self._update_content at some point) or self._update_content is explicitly called if summary is passed as metadata.

This PR expands the paths as soon as possible in (`Content.__init__`) for metadata defined in `FORMATTED_FIELDS`.
2018-02-09 11:41:30 -08:00
Charles Flèche
31dc9366f0 Initialize metadata with refresh_metadata_intersite_links 2018-02-09 10:41:32 +01:00
Lucas Cimon
f5cc21df0e
Adding --logs-deduping-min-level CLI option 2017-12-15 14:59:47 +01:00
Justin Mayer
8ebc120f36 Align import style with flake8-import-order 0.15
Addresses: https://github.com/PyCQA/flake8-import-order/issues/120

Refs #2246
2017-11-07 04:18:03 -08:00
derwinlu
623eb0a4c0 Fix more python 3.6 regex DeprecationWarning's 2017-03-29 10:19:47 +02:00
derwinlu
89b28fd36b Fix warnings originating from bad regexes
Starting with python 3.6 warnings are issued for invalid escape
sequences in regular expressions. This commit corrects all
DeprecationWarning's via properly declaring the offending
regular expressions as raw strings.

Resolves #2095.
2017-03-27 16:09:08 +02:00
Justin Mayer
25732f7be6 Prepare version 3.7.2.dev0 for next development cycle 2017-01-10 13:51:37 -08:00
Justin Mayer
ce38e318bd Bump version 3.7.1 2017-01-10 13:34:09 -08:00
Justin Mayer
0936d5f6ee Prepare version 3.7.1.dev0 for next development cycle 2016-12-14 13:56:47 -08:00
Justin Mayer
d13d57eaa6 Bump version 3.7.0 2016-12-12 14:05:20 -08:00
Deniz Turgut
9d1a1d428b Fixes #1966: Track default settings file for changes in autoreload mode 2016-09-16 10:56:20 -04:00
Nathan Harrington
76dcd64a82 Fixes #1966 2016-05-30 09:09:53 -04:00