1
0
Fork 0
forked from github/pelican
Commit graph

2,458 commits

Author SHA1 Message Date
Justin Mayer
d0e2e3e63f Merge pull request #1680 from ingwinlu/fix_internal_metadata_link
[DOCS] fix broken internal metadata link
2015-04-09 10:01:56 +09:00
winlu
5ca808ed59 fix broken internal metadata link 2015-04-06 09:52:16 +02:00
Justin Mayer
b295163142 Merge pull request #1679 from avaris/fix_fab_serve
Make `pelican.server` importable and use it in `fab serve`
2015-04-05 10:32:05 +09:00
Deniz Turgut
946e95172f Use pelican.server in Quickstart docs 2015-04-04 15:17:59 -04: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
cc8f835f07 Merge pull request #1602 from ltiao/patch-1
Removed `PDF_GENERATOR=False`
2015-04-01 08:05:40 +09: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
Justin Mayer
9acaa25164 Merge pull request #1491 from foresto/ignore-empty-metadata
Ignore empty metadata. Fixes #1469. Fixes #1398.
2015-03-25 08:38:05 -07:00
Forest
7ad649e3b7 Guess mime type with python-magic if available. Fixes #1514. 2015-03-24 11:38:38 -07:00
Forest
db2e517450 Ignore empty metadata. Fixes #1469. Fixes #1398.
Some metadata values cause problems when empty.  For example, a markdown file
containing a Slug: line with no additional text causing Pelican to produce a
file named ".html" instead of generating a proper file name.  Others, like
those created by a PATH_METADATA regex, must be preserved even if empty,
so things like PAGE_URL="filename{customvalue}.html" will always work.
Essentially, we want to discard empty metadata that we know will be useless
or problematic.  This is better than raising an exception because (a) it
allows users to deliberately keep empty metadata in their source files for
filling in later, and (b) users shouldn't be forced to fix empty metadata
created by blog migration tools (see #1398).

The metadata processors are the ideal place to do this, because they know
the type of data they are handling and whether an empty value is wanted.
Unfortunately, they can't discard items, and neither can process_metadata(),
because their return values are always saved by calling code.  We can't
safely change the calling code, because some of it lives in custom reader
classes out in the field, and we don't want to break those working systems.
Discarding empty values at the time of use isn't good enough, because that
still allows useless empty values in a source file to override configured
defaults.

My solution:
- When processing a list of values, a metadata processor will omit any
  unwanted empty ones from the list it returns.
- When processing an entirely unwanted value, it will return something easily
  identifiable that will pass through the reader code.
- When collecting the processed metadata, read_file() will filter out items
  identified as unwanted.

These metadata are affected by this change:
author, authors, category, slug, status, tags.

I also removed a bit of now-superfluous code from generators.py that was
discarding empty authors at the time of use.
2015-03-24 11:37:07 -07:00
Justin Mayer
ebf5fca520 Merge pull request #1481 from hrbonz/template_context_docs
Add object details to theme docs
2015-03-24 09:57:32 -07:00
Justin Mayer
5bf21abc66 Merge pull request #1664 from syndbg/patch-1
Nitpick Content decorators
2015-03-23 10:31:03 -07:00
Anton Antonov
875c4a5e05 Nitpick Content decorators
A bit more readable this way.
2015-03-22 12:21:58 +02:00
Justin Mayer
aa9ff632ca Merge pull request #1635 from SkyLothar/master
Remove redundant if-condition in index template
2015-03-21 19:13:16 -07:00
Justin Mayer
df70fa8596 Merge pull request #1663 from avaris/fix_relative_urls
Use `--relative-urls` only if it is specified
2015-03-15 09:44:55 -07:00
Deniz Turgut
ef737c2239 Use --relative-urls only if it is specified
Otherwise, `RELATIVE_URLS` in the config file is ignored and
`RELATIVE_URLS` is set to `False` if `--relative-urls` is not
specified.

Fixes an issue introduced in #1592
2015-03-14 13:36:51 -04:00
Justin Mayer
e0d40c17a0 Merge pull request #1662 from iKevinY/unused-imports
Remove a couple of unused imports
2015-03-14 09:19:20 -07:00
Kevin Yap
0f7f328206 Remove a couple of unused imports
As reported by Pyflakes.
2015-03-13 23:01:31 -07:00
Ondrej Grover
3d5f01ba3f Merge pull request #1661 from robertlagrant/master
Change docs wording on cache regeneration on pickle errors.
Fixes #1630
2015-03-13 15:23:07 +01:00
robertlagrant
ffe71d324d Change docs wording on cache regen for #1630 2015-03-13 13:42:56 +02:00
Justin Mayer
822fb134e0 Merge pull request #1653 from avaris/check_urlwrappers
Make sure Content uses URLWrappers
2015-03-11 11:56:32 -07:00
Justin Mayer
ddd637b870 Merge pull request #1658 from iKevinY/travis-formatting
Standardize formatting of .travis.yml
2015-03-10 07:04:31 -07:00
Kevin Yap
4e896c427d Standardize formatting of .travis.yml
Use 2 spaces for indentation.
2015-03-07 01:03:25 -08:00
Deniz Turgut
3ea4542015 Make sure Content uses URLWrappers 2015-03-06 16:06:20 -05:00
Justin Mayer
e35ca1d6ff Minor improvements to README 2015-03-05 12:04:39 -08:00
Kevin Yap
87d86d724c Change phrasing and formatting of README
Made a few changes to the README to emphasize Pelican's position as a
general-purpose static site generator, and not just a blogging tool.

See #1645 for more details.
2015-03-05 11:58:14 -08:00
Justin Mayer
63602c4a9e Merge pull request #1632 from foresto/consistent-blog-var
ArticlesGenerator: Set blog=True consistently. Fixes #1631.
2015-02-27 05:33:58 -08:00
Justin Mayer
62e7a41797 Merge pull request #1642 from iKevinY/remove-pdf-links
Remove PDF-related elements from notmyidea
2015-02-26 17:20:11 -08:00
Kevin Yap
555c553992 Remove PDF-related elements from notmyidea
PDF generation was removed from Pelican's core in #1010.
2015-02-25 21:42:25 -08:00
Justin Mayer
d53c166f95 Clarify docs for FORMATTED_FIELDS setting 2015-02-25 09:42:33 -08:00
Justin Mayer
2bcabb5497 Merge pull request #1622 from whiskyechobravo/formatted_fields
Support reStructuredText or Markdown content in metadata fields other than "summary"
2015-02-25 09:35:06 -08:00
Patrick Fournier
d0afaa5fbe Format custom metadata fields listed in the FORMATTED_FIELDS setting.
Adding FORMATTED_FIELDS to the default settings with ['summary'] as the default value.
2015-02-24 16:57:05 -05:00
Justin Mayer
39f5762ae4 Merge pull request #1637 from pkirk/patch-1
Doc fix: rsync -avc, not --avc
2015-02-24 07:45:04 -08:00
pkirk
79aaedc681 rsync -avc, not --avc 2015-02-23 20:13:33 +01:00
SkyLothar
bc3a0e8c59 remove useless if condition in index template 2015-02-22 16:27:18 +08:00
Forest
784d07e940 ArticlesGenerator: set blog=True consistently.
Fixes #1631.
2015-02-19 12:25:48 -08:00
Justin Mayer
d4ba7b7291 Correct Dotclear sample file link in importer docs
Fixes #1570
2015-02-18 09:41:27 -08:00
Justin Mayer
88ec7026ea Merge pull request #1533 from kernc/underscore_dates
Replace underscores in dates with spaces before parsing
2015-02-18 09:14:37 -08:00
Justin Mayer
053d198f22 Merge pull request #1521 from iKevinY/update-tests
Added tests for generators, settings, and pelican_import
2015-02-17 18:59:04 -08:00
Kevin Yap
6549f51591 Add tests for Pelican and pelican_import tool
Added tests to ensure that:
- THEME and deprecated *_DIR settings result in the expected configurations
- Post headers are formatted correctly in both Markdown and reStructuredText
- Files specified in IGNORE_FILES setting are properly ignored
- Generator.get_files()'s `paths` argument is backwards-compatible with strings
2015-02-17 18:26:41 -08:00
Kevin Yap
95860c6b1b Remove unused modules/variables from tests 2015-02-17 18:25:44 -08:00
Justin Mayer
838478d65d Merge pull request #1629 from avaris/fix_windows_tests
Fix tests that were skipped in #1581
2015-02-17 18:03:57 -08:00
Deniz Turgut
fa269d7c6f Fix tests that were skipped in #1581 2015-02-17 20:50:27 -05:00
Justin Mayer
bfbb7d4bb5 Merge pull request #1581 from georgevreilly/win-fixes
Fix Pelican rendering and unit tests on Windows.
2015-02-17 17:06:19 -08:00
Justin Mayer
6a69a2c943 Merge pull request #1608 from abackstrom/patch-1
Docs: Note how posts are published when 'draft' is default
2015-02-17 11:21:51 -08:00
Justin Mayer
1301343d1d Merge pull request #1582 from ingwinlu/quickstart_python_python2
DOCS: http server module for python3 is different then python2
2015-02-17 11:11:14 -08:00
Justin Mayer
5912608b04 Merge pull request #1592 from ingwinlu/add_argparse_relative
Add argparse argument for relative URLs
2015-02-17 10:49:57 -08:00
Justin Mayer
ca0477c62f Merge pull request #1593 from iKevinY/clarify-setting-types
Change the documented type of various settings
2015-02-17 10:41:07 -08:00
Justin Mayer
6c4f0d7894 Merge pull request #1621 from iKevinY/pages-status-fix
Make page status check case-insensitive. Fixes #1620
2015-02-16 09:11:11 -08:00
Justin Mayer
c139221dbc Merge pull request #1627 from johnmastro/smartypants-html-entities
Tell smartypants to also process " entities
2015-02-13 07:31:48 -08:00