1
0
Fork 0
forked from github/pelican
Commit graph

1,422 commits

Author SHA1 Message Date
Justin Mayer
96b23e03bd Bump version 3.6.2 2015-08-01 13:39:10 -07:00
guanidene
ba9b4a1d9b Watch for changes in mtime of symlinked folders and files too 2015-06-30 20:56:21 +05:30
derwinlu
5389543a39 improve URLWrapper comparison
* speed up via reduced slugify calls (only call when needed)
* fix __repr__ to not contain str, should call repr on name
* add test_urlwrappers and move URLWrappers tests there
  * add new equality test
* cleanup header

additionally:
* Content is now decorated with python_2_unicode_compatible
  instead of treating __str__ differently
* better formatting for test_article_metadata_key_lowercase
  to actually output the conflict instead of a non descriptive
  error
2015-06-27 19:13:50 +02:00
Justin Mayer
3f69a1fb62 Merge pull request #1760 from jml/export-hidden-pages
Export hidden pages in context
2015-06-27 08:58:37 -07:00
Elana Hashman
21544a404c Update simple theme to fix #1068 2015-06-21 13:35:41 -06:00
Elana Hashman
22bc56ddf1 Fixes #1068, #1572: template page navigation bugs
Updates the template logic for when page navigation is included in the
generated HTML in the notmyidea theme, fixing:

* Issue #1068: useless pagination controls should not be displayed when a
  single page is generated (i.e. "Page 1/1"). New logic prevents the
  generation of these superfluous page navigation controls. Tests updated
  accordingly.

* Issue #1572: when multiple pages are generated and the last page contains
  only one item, the closing </ol> and </section> tags are not generated,
  resulting in page breakage. We need to check if
  articles_page.has_other_pages(); if it does, a list has been generated per
  line 19 or 25 and the tags must be closed.
2015-06-21 13:24:49 -06:00
Jonathan Lange
108b67282a Export hidden pages in context
The `PageGenerator` was building hidden pages, but was not making them
available in the context. This makes it difficult for other plugins to
operate on hidden pages.

This patch updates `PageGenerator` to export the hidden pages it finds
in the context as `hidden_pages`.

It also updates the article generator to export `drafts`.
2015-06-20 11:21:39 +01:00
Justin Mayer
780ccfe137 Prepare version 3.6.1.dev for next development cycle 2015-06-15 13:46:17 -07:00
Justin Mayer
fba2826b70 Bump version 3.6.0 2015-06-15 13:45:50 -07:00
Deniz Turgut
da8b469ab8 Fix #1647: Fix ARTICLE_ORDER_BY and add the ability to reverse order
ARTICLE_ORDER_BY wasn't doing anything because the ArticlesGenerator
was sorting articles after ARTICLE_ORDER_BY was applied. This fixes
that by adding the ability to reverse metadata order by adding the
option prefix 'reversed-' to metadata and changing the default value
to 'reversed-date'.

Relevant documentation is also updated and moved into a more appropriate
place ('Ordering Content' instead of 'URL settings').
2015-06-12 18:14:54 -04:00
derwinlu
e3f5e39e17 fix outdated content_object_init refs
* remove content_object_init section from docs
* improve content_object_init test

The content_object_init signal used to set its class as sender and pass
the instance as additional arg in 6100773. Commit ed907b4 removed this
behaviour to bring it inline with other signals, on the basis that
you can test for the class of the object anyway.
We also had a test in place, checking this behaviour, but it was poorly
implemented, not actually checking if the function ever got called.

closes #1711
2015-06-12 19:23:17 +02:00
Justin Mayer
e17c4377da Merge pull request #1740 from ingwinlu/count_hidden_pages
Improve pluralization, fixing display count of hidden pages
2015-06-11 07:27:41 -07:00
Justin Mayer
1da84349c4 Merge pull request #1693 from zackw/static-honor-ignore-files
Honor 'IGNORE_FILES' in StaticGenerator._copy_paths (#1692).
2015-06-10 11:54:29 -07:00
Justin Mayer
b7e8af5977 Merge pull request #1747 from ingwinlu/fix_cache
Fix caching and disable by default
2015-06-09 08:42:51 -07:00
Justin Mayer
1352d2638a Merge pull request #1743 from avaris/1718
Fix exception logging
2015-06-08 06:50:08 -07:00
derwinlu
db59c16f42 set default for caching to false
ref #1689

* set default settigns in settings.py to False for
  - LOAD_CONTENT_CACHE
  - CACHE_CONTENT
* remove AUTORELOAD_IGNORE_CACHE and add deprecation warning
* update settings.rst to reflect the new default values
* update test_cache to enable caching options
2015-06-08 09:35:00 +02:00
derwinlu
b7e6390f04 fix caching
*  break out cache into cache.py
*  break out cache-tests into test_cache.py
*  fix broken cache tests
   *  replace non existing assert calls with self.assertEqual
   *  fix path for page caching test (was invalid)
   *  cleanup test code
*  restructure generate_context in Article and Path Generator
   * destinguish between valid/invalid files correctly and cache accordingly
*  use cPickle if available for increased performance
2015-06-08 09:34:30 +02:00
Zack Weinberg
1aac19caaf Honor 'IGNORE_FILES' in the static generator (issue 1692)
This means, for instance, that editor backups and similar will no
longer be copied out of a theme static directory into the built
website.
2015-06-04 17:58:14 -04:00
Zack Weinberg
c7b9a339eb Apply 'IGNORE_FILES' globs to directories as well (issue 1692)
This adjusts the only piece of code that currently looks at IGNORE_FILES.
A subsequent commit will add a new use, with the same semantics.
2015-06-04 17:57:06 -04:00
Zack Weinberg
0a48371985 Give utils.copy the ability to ignore files (issue 1692)
This requires a significant overhaul because we want to be able to have
IGNORE_FILES apply at every level of a recursively copied directory
(e.g. the theme static directory).  Since I was overhauling it anyway
I changed it to use os.walk, which should be more efficient.
2015-06-04 17:57:06 -04:00
Zack Weinberg
c918380802 Support semicolon-separated author/tag lists.
Idea borrowed from Docutils.  This allows one to write author lists in
lastname,firstname format.  The code change also means that readers with
fancy metadata that can natively represent lists (e.g. Docutils itself,
or MD-Yaml) don't have to merge 'em back together for process_metadata's
sake.
2015-06-04 17:31:20 -04:00
Deniz Turgut
735a4452df Fix exception logging
Adds exception type to the exception logging.
Removes the extra logging for autoreload in debug mode, since `raise`
will make it caught by the global `try/except` below and it'll be
logged there.

This replaces #1723 and also removes extra exception logging caused
in #1718.
2015-06-03 17:07:38 -04:00
derwinlu
39fd4936b5 improve result output of a pelican run
*  display count of hidden pages
*  pluralize only if necessary
*  add maybe_pluralize to utils
*  add tests for maybe_pluralize
2015-06-03 08:58:59 +02:00
Justin Mayer
940eb76b7f Load external resources via HTTPS when available
This replaces all `http://` and `//:` links with `https:`. The protocol-
relative URL scheme is now deemed to be an anti-pattern. There are
security advantages to using HTTPS, and there are no significant
performance concerns.

In short, if the asset we need is available via HTTPS, then that asset
should always be loaded via HTTPS.

Fixes #1736
2015-06-02 08:35:12 -07:00
Justin Mayer
389d0cec52 Merge pull request #1453 from arty-name/period-archives-syntax-errors
Fix #1405: No error message for invalid syntax in period_archives.html
2015-05-30 09:29:53 -07:00
Justin Mayer
3a03aef3e2 Merge pull request #1728 from jonathan-s/stop-server
Fix for stopping devserver
2015-05-27 08:13:21 -07:00
Jonathan Sundqvist
77ebd05fce Actually stopping server
When running `make devserver` and then running `make stopserver` it doesn't stop the server. This patch fixes that.
2015-05-24 16:59:23 +01:00
Alex Chan
641b3ffa71 Fix capitalisation of WordPress 2015-05-24 13:08:30 +01:00
Justin Mayer
72a0e626dd Merge pull request #1530 from Sethathi/settings_unit_tests
Unit tests for settings.py
2015-05-21 10:10:37 +02:00
Justin Mayer
8786732044 Merge pull request #1703 from ingwinlu/remove_tag_cloud
Remove tag_cloud from Pelican core
2015-05-13 23:19:24 +02:00
Ionel Cristian Mărieș
ab2dc71d34 Improve internal error reporting. Fixes #1717. 2015-05-12 02:55:45 +03:00
Justin Mayer
807b3bced3 Merge pull request #1471 from roidelapluie/master
Add a new signal: page_writer_finalized
2015-05-06 13:13:48 +02:00
Justin Mayer
ac844eacf4 Merge pull request #1705 from 11craft/allow-path
Allow `--path` even when using a virtualenv project
2015-05-01 23:59:27 +02:00
Justin Mayer
3f6315fe26 Merge pull request #1683 from alb-i986/fix-meta-tags
Fix the meta tags added in #1057
2015-04-30 23:51:07 +02:00
Justin Mayer
9a38f61e4d Merge pull request #1700 from avaris/1686
Fixes #1686: posixize paths in context['filenames'] to fix windows issues
2015-04-29 16:06:19 +02:00
Justin Mayer
a571ec4cd9 Merge pull request #1708 from iksteen/fix-draft-intra-site-links
Fix intra-site links to drafts
2015-04-29 16:01:38 +02:00
Justin Mayer
222c6e4c03 Merge pull request #1701 from avaris/urlwrapper_slug_property
Change URLWrapper.slug to a property
2015-04-29 15:58:50 +02:00
Ingmar Steen
df54953032 Fix intra-site links to drafts.
Overwrite an article's source path registration when it is
'upgraded' to a draft.

Fixes #865
2015-04-29 15:13:08 +02:00
Justin Mayer
5cf3481483 Merge pull request #1691 from ingwinlu/add_skippable_tests
add skips for tests relying on dev_requirements modules
2015-04-28 07:08:01 +02:00
Matthew Scott
d6ebf772e3 Allow --path even when using a virtualenv project 2015-04-23 13:30:24 -05:00
winlu
9dd4080fe6 remove tag_cloud from core 2015-04-20 12:16:05 +02:00
Justin Mayer
44bd308dd2 Merge pull request #1681 from ingwinlu/fix_test_readers
Maintain test_readers
2015-04-17 14:40:31 +02:00
Deniz Turgut
dceea3aabe Change URLWrapper.slug to a property
Main goal is to delay `slugify` call until `slug` is needed. `slugify`
can be expensive depending on the input string (see #1172). Changing it
to a property gives plugins time to place custom `slug`s before `name`
is unnecessarily slugified.

With this change, default behavior is same except the time slugification
happens. But if you set custom slug, `slugify` won't be used at all.

So, this is a partial solution to #1172. The rest, setting a custom slug,
would best be handled by a plugin.
2015-04-16 19:16:23 -04:00
Deniz Turgut
90a283bc44 Fixes #1686: posixize paths in context['filenames'] to fix windows issues 2015-04-16 19:05:15 -04:00
Deniz Turgut
2e84e30ad3 Fixes #1695: replace with list comprehension for py3 compatibility 2015-04-14 15:19:16 -04:00
winlu
bf7d113caa add skips for tests relying on dev_requirements modules 2015-04-11 22:45:31 +02:00
Alberto Scotto
0f7938ccb7 fix the meta tags added in #1028
The attribute 'contents' should be 'content'.
See http://www.w3schools.com/tags/att_meta_content.asp
2015-04-08 03:32:48 +02:00
winlu
2e590d0e86 maintain test_readers
* move all metadata tests to use a single function call (assertDictHasSubset)
* add tests for assertDictHasSubset
* correct some tests that iterated over metadata instead of expected metadata, resulting in metadata that was expected to be there but was not
* correct resulting broken tests
* add additional tests for EXTRA_PATH_METADATA
* make MdReaderTest fail if Markdown is not available instead of skipping each method individually
2015-04-07 12:06:18 +02:00
Deniz Turgut
7b4ceb2974 Make pelican.server importable and use it in fab serve
`fab serve` and `make devserver` use different HTTP Handlers and as a
result they behave differently. This makes sure `fab serve` also uses
the Handler defined in `pelican.server` in order to get rid of the
inconsistency.
2015-04-03 18:58:52 -04:00
Justin Mayer
8a479733f0 Merge pull request #1515 from foresto/serve-mime-type
Guess mime type with python-magic if available. Fixes #1514.
2015-03-27 17:14:16 +09:00