mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Let documents {attach} static files. Fixes #1019.
Until now, making static files end up in the same output directory as an
article that links to them has been difficult, especially when the article's
output path is generated based on metadata. This changeset introduces the
{attach} link syntax, which works like the {filename} syntax, but also
overrides the static file's output path with the directory of the
linking document.
It also clarifies and expands the documentation on linking to internal content.
This commit is contained in:
parent
f706f98ce7
commit
d503ea436c
5 changed files with 372 additions and 41 deletions
|
|
@ -208,7 +208,9 @@ class Pelican(object):
|
|||
logger.debug('Found generator: %s', v)
|
||||
generators.append(v)
|
||||
|
||||
# StaticGenerator runs last so it can see which files the others handle
|
||||
# StaticGenerator must run last, so it can identify files that
|
||||
# were skipped by the other generators, and so static files can
|
||||
# have their output paths overridden by the {attach} link syntax.
|
||||
generators.append(StaticGenerator)
|
||||
return generators
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue