1
0
Fork 0
forked from github/pelican
Commit graph

2,472 commits

Author SHA1 Message Date
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
Justin Mayer
d0c15d5a0c Merge pull request #1696 from dmd/patch-1
Clarify phrasing in quickstart documentation
2015-04-18 10:12:46 +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
Justin Mayer
f19ea17d0a Merge pull request #1698 from avaris/1695
Fixes #1695: replace `map` with list comprehension for py3 compatibility
2015-04-15 09:07:33 +01:00
Deniz Turgut
2e84e30ad3 Fixes #1695: replace with list comprehension for py3 compatibility 2015-04-14 15:19:16 -04:00
Daniel M. Drucker
f864418b9e make the quickstart work
The quickstart was worded confusingly - it said "from your project directory", which implied doing a `cd ..` down to the `projects` dir, which would cause `pelican content` to fail. In fact, you need to be in the `yoursite` directory, which is the directory that has the `content` directory in it.
2015-04-13 11:12:52 -04:00
winlu
bf7d113caa add skips for tests relying on dev_requirements modules 2015-04-11 22:45:31 +02:00
Justin Mayer
249a919c59 Merge pull request #1687 from ingwinlu/fix_refs_themes
[DOCS] fix broken refs
2015-04-11 09:28:55 +01:00
winlu
adc5c4b572 fix broken refs 2015-04-10 09:02:12 +02:00
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
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
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