Commit graph

2,842 commits

Author SHA1 Message Date
Justin Mayer
948b48bb8c
Merge pull request #2197 from jorgesumle/typofix
Correct typos in documentation
2018-02-08 08:45:33 -08:00
Justin Mayer
14aac3a0f4
Merge pull request #2204 from Lucas-C/logs_deduping_min_level
Add --log-dedup-min-level CLI option
2018-02-08 08:44:24 -08:00
Justin Mayer
3492dfe3c8
Merge pull request #2259 from ix5/docs_themes_fix_save_as
Fix documentation for *_SAVE_AS in themes.rst
2018-02-08 08:36:18 -08:00
Justin Mayer
e7ac0a9272
Merge pull request #2196 from mosra/absolute-url-merging
Make URL part joining aware of absolute URLs
2018-02-08 08:19:26 -08:00
Lucas Cimon
f5cc21df0e
Adding --logs-deduping-min-level CLI option 2017-12-15 14:59:47 +01:00
ix5
69bd9e01b6 Fix documentation for *_SAVE_AS in themes.rst:
Update to current defaults
2017-12-10 07:17:51 +01:00
Justin Mayer
34103cd5dd
Merge pull request #2251 from fgallaire/content
Change imported content directory name to "content". Fixes #2250
2017-11-12 08:10:23 -08:00
Florent Gallaire
a091a4b8b9 Change pelican-import output directory default name to "content" (fix #2250) 2017-11-09 19:23:38 +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
Vladimír Vondruš
0b13aa9b46 Make URL part joining aware of absolute URLs.
Previously, with RELATIVE_URLS disabled, when both SITEURL and
STATIC_URL were absolute, the final generate data URLs looked wrong like
this (two absolute URLs joined by `/`):

    http://your.site/http://static.your.site/image.png

With this patch, the data URLs are correctly:

    http://static.your.site/image.png

This also applies to all *_URL configuration options (for example,
ability to have pages and articles on different domains) and behaves
like one expects even with URLs starting with just `//`, thanks to
making use of urllib.parse.urljoin().

However, when RELATIVE_URLS are enabled, urllib.parse.urljoin() doesn't
handle the relative base correctly. In that case, simple os.path.join()
is used. That, however, breaks the above case, but as RELATIVE_URLS are
meant for local development (thus no data scattered across multiple
domains), I don't see any problem.

Just to clarify, this is a fully backwards-compatible change, it only
enables new use cases that were impossible before.
2017-10-26 23:23:51 +02:00
Vladimír Vondruš
1f30306e23 Make the internal link replacer function public.
So it can be used from outside.
2017-10-26 23:23:51 +02:00
Justin Mayer
56a483475b PyCodeStyle fixes to keep Flake8 happy
Travis appears to be using new versions of underlying code style
analyzers, so these changes were necessary in order to keep tests green.
2017-10-26 13:53:32 -07:00
Justin Mayer
71625af8a4 Merge pull request #2230 from jorgesumle/url-docs
Update virtualenv URL in documentation
2017-10-23 07:27:53 -07:00
Justin Mayer
aac005cd0f Merge pull request #2231 from jorgesumle/comma-missing-docs
Correct typo from documentation
2017-10-23 07:26:41 -07:00
Jorge Maldonado Ventura
fa70988421 Correct typo from documentation
Missing comma before etc.
2017-10-22 18:15:11 +02:00
Jorge Maldonado Ventura
e83c3d9796 Update URL from documentation.
The new URL saves us a redirection and uses HTTPS
2017-10-22 15:51:56 +02:00
Justin Mayer
359ffcabb8 Merge pull request #2218 from stuaxo/patch-1
Check for 0 dates in pelican-import
2017-10-10 07:14:11 -07:00
Justin Mayer
db027929b5 Merge pull request #2217 from hugovk/update-python-version-for-tox
Tell Travis to use Python 3.5 image when running Tox
2017-10-09 09:19:56 -07:00
Justin Mayer
da05657e13 Merge pull request #2216 from hugovk/rm-python3.3
Drop unsupported Python 3.3
2017-10-09 09:17:36 -07:00
Stuart Axon
012d034cba Check for 0 dates in pelican-import
Check for 0 dates.

For my own blog this means it doesn't break during import, but I don't know pelican well enough yet to say if this is correct or not.

Error that I was getting before applying this fix
```
Traceback (most recent call last):
  File "/mnt/data/home/stu/.virtualenvs/blog/bin/pelican-import", line 11, in <module>
    sys.exit(main())
  File "/mnt/data/home/stu/.virtualenvs/blog/local/lib/python2.7/site-packages/pelican/tools/pelican_import.py", line 896, in main
    attachments=attachments or None)
  File "/mnt/data/home/stu/.virtualenvs/blog/local/lib/python2.7/site-packages/pelican/tools/pelican_import.py", line 684, in fields2pelican
    kind, in_markup) in fields:
  File "/mnt/data/home/stu/.virtualenvs/blog/local/lib/python2.7/site-packages/pelican/tools/pelican_import.py", line 163, in wp2fields
    date_object = time.strptime(raw_date, '%Y-%m-%d %H:%M:%S')
  File "/usr/lib/python2.7/_strptime.py", line 478, in _strptime_time
    return _strptime(data_string, format)[0]
  File "/usr/lib/python2.7/_strptime.py", line 332, in _strptime
    (data_string, format))
ValueError: time data u'0000-00-00 00:00:00' does not match format u'%Y-%m-%d %H:%M:%S'

```
2017-10-02 22:05:42 +01:00
Hugo
ebf31e85c4 Update Python version for Tox to create py35 2017-10-02 18:35:11 +03:00
Hugo
ce0787f0d3 Drop unsupported Python 3.3 2017-10-02 18:33:21 +03:00
Justin Mayer
f8da7077d8 Remove outdated Python versions in CONTRIBUTING
Refs #2139
2017-09-21 05:18:27 -07:00
Justin Mayer
0b8e243738 Merge pull request #2203 from jorgesumle/typo-documentation
Fix typo from documentation
2017-08-23 06:06:27 -07:00
Justin Mayer
5efdd1a778 Merge pull request #2190 from jorgesumle/notmyidea
Improve notmyidea theme
2017-08-23 06:02:24 -07:00
Jorge Maldonado Ventura
2013fc0ab2 Fix typo from documentation 2017-08-12 21:40:27 +02:00
Jorge Maldonado Ventura
d6dca3403d pelican/ is not necessary (documentation content.rst) 2017-08-08 23:45:31 +02:00
Jorge Maldonado Ventura
b1bc9a6f5f Typofix:
- paragraph missing stop
- Remove unnecessary colon
2017-08-08 01:16:19 +02:00
Jorge Maldonado Ventura
9d8d555708 Regenerate tests' output 2017-08-06 13:55:34 +02:00
Jorge Maldonado Ventura
a2d0705987 Remove Internet Explorer script, as it wasn't being used: 404 HTTP error 2017-07-30 17:49:43 +02:00
Jorge Maldonado Ventura
9ce09c0715 Store fonts of notmyidea theme locally
Used google-font-download ((commit ecc521e894c55e83773351264fe5bbef99ae70ad))
to download the fonts.
  font-download -f 'woff woff2' -l 'latin' 'Yanone Kaffeesatz:400'
2017-07-30 17:47:47 +02:00
Jorge Maldonado Ventura
9495a6c3df Remove trailing whitespaces from notmyidea 2017-07-30 17:41:32 +02:00
Justin Mayer
68724e9682 Encourage use of https:// in SITEURL
Refs #2183 #2186
2017-07-25 09:00:41 -07:00
winlu
089b46b7eb Consolidate validation of content (#2128)
* Consolidate validation of content

Previously we validated content outside of the content class via
calls to `is_valid_content` and some additional checks in page /
article generators (valid status).
This commit moves those checks all into content.valid() resulting
in a cleaner code structure.
This allows us to restructure how generators interact with content,
removing several old bugs in pelican (#1748, #1356, #2098).

- move verification function into content class
- move generator verifying content to contents class
- remove unused quote class
- remove draft class (no more rereading drafts)
- move auto draft status setter into Article.__init__
- add now parsing draft to basic test output
- remove problematic DEFAULT_STATUS setting
- add setter/getter for content.status
  removes need for lower() calls when verifying status

* expand c4b184fa32

Mostly implement feedback by @iKevinY.

* rename content.valid to content.is_valid
* rename valid_* functions to has_valid_*
* update tests and function calls in code accordingly
2017-07-24 10:01:14 -07:00
Justin Mayer
706c6f6f2f Merge pull request #2184 from jonaslb/fabfilefix
Correct import of socketserver on Python 3
2017-07-24 09:09:01 -07:00
Jonas Lundholm Bertelsen
1c96d8c933 Correct import of socketserver on Python 3 2017-07-24 12:25:21 +02:00
Justin Mayer
42b205d75c Merge pull request #2142 from MinchinWeb/patch-1
Pelican trove classifier now on PyPI
2017-07-21 10:34:18 -07:00
Justin Mayer
fbb1f32a06 Merge pull request #2165 from pananormalny/fix_rsync_makefile
Fix rsync_upload in Makefile template
2017-07-20 14:54:03 -07:00
Justin Mayer
f9a778fcae Merge pull request #2163 from mosra/override-docutils-html-translator
Ability to override docutils HTML translator
2017-07-20 14:14:43 -07:00
Justin Mayer
43ec3c4f7d Fix copyright year to date of first publication 2017-07-19 13:29:04 -07:00
Vladimír Vondruš
7336de45cb Ability to override docutils HTML writer/translator.
The RstReader class can now use user-specified writer/translator classes
instead of the hardcoded ones from docutils. This allows for far easier
overriding of the default HTML output -- in the past one would need to
override the internal _parse_metadata() and _get_publisher() functions.
With hypothetical Html5Writer and Html5FieldBodyTranslator classes,
based for example on docutils.writers.html5_polyglot.Writer and
docutils.writers.html5_polyglot.HTMLTranslator, a plugin that overrides
the default behavior would now look just like this:

    # (definition of Writer / Translator classes omitted)

    class Html5RstReader(RstReader):
        writer_class = Html5Writer
        field_body_translator_class = Html5FieldBodyTranslator

    def add_reader(readers):
        readers.reader_classes['rst'] = Html5RstReader

    def register():
        pelican.signals.readers_init.connect(add_reader)
2017-06-30 22:59:42 +02:00
Justin Mayer
d4435ea874 Merge pull request #1982 from adeverteuil/feature_check_static_modified
Add static file options: hard/symlink & only-when-modified
2017-06-22 12:49:26 -07:00
evilroot
fdf355c377 Fix rsync_upload in Makefile template 2017-06-08 22:59:12 +01:00
Justin Mayer
fa1d4d937c Merge pull request #2130 from ingwinlu/more_py36_regex_warnings
Fix more Python 3.6 regex warnings
2017-05-31 09:10:22 -07:00
Justin Mayer
1d556c78b6 Merge pull request #2149 from ingwinlu/fixup_ec5c77b25145f7c20fee24c6b85b478295dbc956
Fix forgotten PAGES -> pages in default theme
2017-05-23 12:58:59 -07:00
derwinlu
c68958e6b8 Fixup ec5c77b251
fix forgotten PAGES -> pages
2017-05-05 16:02:48 +02:00
MinchinWeb
24c41195a6 Use 4-space indentation 2017-04-26 10:34:47 -06:00
MinchinWeb
651ccbcddf Pelican trove classifier now on PyPI
https://github.com/pypa/warehouse/issues/1650
(now sorted alphabetically)
2017-04-26 10:29:00 -06:00
Justin Mayer
c2b2def1c8 Merge pull request #2115 from jvoisin/_update_content_regexp_simplification
Improve the regexp used in _update_content
2017-04-20 12:18:11 -07:00
Justin Mayer
5f1d5c4b88 Merge pull request #2136 from jorgesumle/setup
Add Python 3.6 classifier to setup.py
2017-04-16 12:38:09 -07:00