1
0
Fork 0
forked from github/pelican
Commit graph

1,478 commits

Author SHA1 Message Date
Jangsea Park
3857145754 Import env.github_pages_branch from quickstart question 2016-03-02 20:48:11 +09:00
Daniel Himmelstein
f864dd832c Change ... (periods) to … (ellipsis) in summary
Also update HTML output by running (after making sure to have the fr_FR.utf8
locale installed):

```sh
LC_ALL=en_US.utf8 pelican -o pelican/tests/output/custom/ -s samples/pelican.conf.py samples/content/
LC_ALL=fr_FR.utf8 pelican -o pelican/tests/output/custom_locale/ -s samples/pelican.conf_FR.py samples/content/
LC_ALL=en_US.utf8 pelican -o pelican/tests/output/basic/ samples/content/
```
as described at
http://docs.getpelican.com/en/3.6.3/contribute.html#running-the-test-suite
2016-02-22 13:03:47 -08:00
Justin Mayer
14694c8357 Make Flake8 happy
Note to self: pre-commit hooks really are helpful
2016-02-19 13:29:41 -08:00
Justin Mayer
123fd0b65a Fix Typogrify test issue caused by Pygments update 2016-02-19 13:21:26 -08:00
Justin Mayer
e4532eb8e0 Update test output for French locale 2016-02-19 12:48:30 -08:00
Justin Mayer
2dcc4ccf80 Update functional test output for Pygments 2.1.1 2016-02-19 12:03:48 -08:00
Justin Mayer
985840178a Merge pull request #1893 from kernc/fix-1891
Don't fail if --fatal not provided
2016-02-19 11:32:19 -08:00
Tobias Geerinckx-Rice
6c5183486f tests: fix failures with Pygments 2.1 2016-02-08 17:48:33 +01:00
Kernc
d7407eabab Don't fail if --fatal not provided
Fixes https://github.com/getpelican/pelican/issues/1891
2016-01-18 13:04:52 +01:00
Kernc
ac48dc22c6 Wrap code that can cause a fatal warning in try-except 2016-01-09 02:42:02 +01:00
Kernc
9a04ce660c Add --fatal=errors|warnings program option 2016-01-09 02:42:02 +01:00
Andreas Olsson
23a84e9b82 Adding missing Makefile PHONY target stopserver 2016-01-03 11:03:10 +01:00
Kernc
510961bbb9 Avoid Markdown 2.6 deprecations; make MD_EXTENSIONS a dict
* Make MD_EXTENSIONS setting a dict and add tests for this change;
* Short extension names ('extra', 'meta') are deprecated
  https://pythonhosted.org/Markdown/release-2.6.html#shortened-extension-names-deprecated
* Extension config as part of extension name is deprecated
  https://pythonhosted.org/Markdown/release-2.6.html#extension-configuration-as-part-of-extension-name-deprecated
2015-11-30 18:12:28 +01:00
HiPhish
1fe40db3cb Generate output directory before 'CD'ing into it.
If the output directory does not exist the 'cd' will fail, but the
script will resume, starting the server in the base directory. Therefore
we first make sure the output directory actually exists.
2015-11-14 00:17:09 +01:00
Justin Mayer
2b51c0e499 Merge pull request #1852 from xenithorb/master
Add '--no-mime-magic --no-preserve' to s3_upload
2015-11-09 12:38:21 -05:00
Lukas Prokop
2170ca4cd5 Use <time> instead of <abbr>.
The pubdate given is in no way an abbreviation. Hence the semantics of
<abbr> do not justify its usage in this context.

<time> was introduced in HTML5. It's datetime attribute can override the
textContent. Anyway it specifies a date+time of a given event.

http://www.w3.org/TR/html5/text-level-semantics.html#the-time-element

Originally the pubdate attribute was meant to annotate that the
publication date of the closest section unit is specified, but this was
dropped and is not part of the official specification.

https://www.w3.org/wiki/HTML/Elements/time
2015-11-05 22:28:46 +01:00
Justin Mayer
d3f306505e Merge pull request #1854 from ingwinlu/summary_replacer
Test if summary is parsed by replacer
2015-11-03 08:09:51 -08:00
derwinlu
9255ab22f9 Fix DeprecationWarning in _get_summary
logging.warn is deprecated, should be replaced with .warning.
2015-11-03 16:56:54 +01:00
Justin Mayer
880ba20a98 Merge pull request #1850 from ingwinlu/deprecation_warnings
Make Pelican Python 3.5 compatible
2015-11-03 07:22:12 -08:00
Ondrej Grover
6bb743cb22 Test if summary is parsed by replacer 2015-11-03 10:23:10 +01:00
Justin Mayer
1bbffad7b9 Merge pull request #1837 from SimonStJG/fix-quote-escaping-in-html-attributes
Fix quote escaping in HTML attributes. Fixes issue #1260.
2015-11-02 13:44:56 -08:00
Michael Goodwin
5e7eb91808 add '--no-mime-magic --no-preserve' to s3_upload 2015-10-29 11:36:41 -04:00
Justin Mayer
ef2c62ab82 Merge pull request #1842 from ingwinlu/md_metadata_formatted
Rename summary references to formatted_fields
2015-10-24 09:30:12 -07:00
derwinlu
ab2eec854d Redo ANSI support detection
When using nose to directly run the test suite it 'steals' stdout per
default. This causes the old implementation of ANSI detection to error
as stdout does not have a fileno function anymore.
2015-10-22 09:45:54 +02:00
derwinlu
2d84c04add Make ReaderTest py2 and py3 compatible 2015-10-22 09:45:17 +02:00
derwinlu
8b299098c9 Make HTMLParser Python 3.5 ready 2015-10-22 09:45:10 +02:00
derwinlu
e50abb20b3 Add logging for warnings during test suite run
The default configuration for the warnings module changed some time ago
so we lost the ability to detect deprecation warnings and such early.

This commit sets up the test suite to redirect all warnings through our
logging system. Additionally we enable DeprecationWarnings as a default
and throw exceptions on all warnings related to pelican modules.

This enables output of warnings related to dependencies, while letting
tests only fail if the warnings are originating from pelican's source.

Also adding a test to detect if warnings cause an Exception as expected.
2015-10-22 09:45:04 +02:00
derwinlu
2cb2bf05df replace get_summary with _get_summary
When memoizing summary a dummy get_summary function was introduced to
properly work. This has multiple problems:
* The siteurl argument is actually not used in the function, it is only
  used so it properly memoizes.
* It differs from how content is accessed and memoized.

This commit brings summary inline with how content is accessed and
processed. It also removes the old get_summary function with the unused
siteurl argument.

Additionally _get_summary is marked as deprecated and calls .summary
instead while also issueing a warning.
2015-10-19 16:38:07 +02:00
derwinlu
a69f4294bc Add ability to toggle log filter
To test the output of warning functions it can be useful to disable the
log filter, producing the expected output instead of the limited output
that is used during normal operation.
2015-10-19 16:28:47 +02:00
Simon StJG
d333ed12c6 Fix quote escaping in read html attributes.
* Wrap HTML attributes in quotes according to their content.  If it contains a double quote use single quotes, otherwise escape with double quotes.
* Add escape_html utility to ensure quote entities are converted identically across Python versions.

Fixes #1260
2015-10-14 21:03:01 +01:00
derwinlu
554cde1a22 rename summary references to formatted_fields
Since FORMATTED_FIELDS was introduced the variables are not specific to
summary and contain other data as well.
2015-10-13 10:26:52 +02:00
Justin Mayer
661ee49eda Merge pull request #1827 from TC01/blogroll_override
Make name of blogroll/social widgets configurable
2015-10-12 08:32:20 +09:00
Ben Rosser
a670a3e040 Made name of blogroll/social widgets configurable.
The BLOGROLL_WIDGET_NAME and SOCIAL_WIDGET_NAME settings are now
respected by notmyidea if they are specified in your config file.
They override the default names of "blogroll" and "links" in the
notmyidea theme.

Used default() in template to simplify template code.

Renaming BLOGROLL setting to LINKS, changed default also.

Updated tests to check 'links' instead of 'blogroll'.

Whoops; links, not link.
2015-10-11 14:14:14 -04:00
Justin Mayer
72ee73f886 Merge pull request #1828 from andreacorbellini/chr-to-unichr
Use unichr() instead of chr() with Python 2.
2015-09-23 09:00:09 -07:00
Andrea Corbellini
c255a35800 Use unichr() instead of chr() with Python 2. 2015-09-22 23:25:24 +02:00
Andrea Corbellini
d583efb861 When truncating, stop parsing the document immediately after finding the last word. 2015-09-20 11:19:41 +02:00
Onur Aslan
a6c258eb7f Add index and author replacement indicators 2015-09-19 13:49:19 +03:00
derwinlu
6afa7704b1 Add versioning information to debug output 2015-09-11 22:06:58 +02:00
derwinlu
b0d41f081b remove article.keywords from simple theme
We don't process 'keywords' metadata specially, so it never gets
processed into a list.

This prevents issues like #1733.
2015-09-05 10:53:44 +02:00
Justin Mayer
f16ae07d78 Merge pull request #1797 from TC01/feeds_override
Add optional override_output to write_feed
2015-08-31 20:17:59 -07:00
Andrea Corbellini
9d0804de7a When truncating, consider hypens, apostrophes and HTML entities. 2015-08-28 13:22:54 +02:00
Jesús Fernández
7f795ed558 Remove duplicate tags and authors in metadata 2015-08-26 12:07:38 +02:00
Justin Mayer
ca389e70e1 Merge pull request #1753 from ingwinlu/flake8
Make Pelican codebase compliant with PEP8
2015-08-24 19:27:25 -07:00
Julien Vehent
9d57dcf020 Fix calculation of tag count in dotclear import
Upon import of a dotclear backup, `pelican-import` returned this stacktrace:

```
  File "/usr/bin/pelican-import", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python3.4/site-packages/pelican/tools/pelican_import.py", line 809, in main
    attachments = attachments or None)
  File "/usr/lib/python3.4/site-packages/pelican/tools/pelican_import.py", line 621, in fields2pelican
    kind, in_markup) in fields:
  File "/usr/lib/python3.4/site-packages/pelican/tools/pelican_import.py", line 262, in dc2fields
    if int(tag[:1]) == 1:
ValueError: invalid literal for int() with base 10: 'a'
```
2015-08-19 12:28:14 -04:00
derwinlu
8993c55e6e fulfil pep8 standard 2015-08-17 13:34:32 +02:00
Justin Mayer
3580478dc9 Merge pull request #1788 from andreacorbellini/truncate-with-html-parser
Truncate words using a HTML instead of regular expressions
2015-08-15 08:21:28 -07:00
Justin Mayer
e06d0046b1 Prepare version 3.6.4.dev0 for next development cycle 2015-08-14 17:24:29 -07:00
Justin Mayer
f0a6725a74 Merge branch 'v3.6.3'
Conflicts:
	docs/changelog.rst
	pelican/__init__.py
	setup.py
2015-08-14 17:16:38 -07:00
Justin Mayer
ed83ad75a9 Bump version 3.6.3 2015-08-14 16:34:25 -07:00
jah
ed34ee1808 Correct render of article description meta
in the simple theme: the template incorrectly assumed that the source
metadata is made available as a list of strings. Fixes #1792.
2015-08-11 20:03:43 +01:00