Before this change it was possible for a file and a directory have the
same path. This change resolves that. Conflicts between files and
directories are now correctly discovered.
The following changes have been made all with template cleanup in mind:
- Make Output.url relative to the origin root
- Keep weakref to Site in all Output objects.
- Add several helpers to get urls from Site: home_url(), tag_url(tag),
section_url(section) and tags_url().
- Add helpers to Index to get pagination urls: pagination_url(n)
- Clean up templates by making use of these new facilities
In order to handle static files in the content generation pipeline while
still being able to easily validate that no output overwrites any other
output without adding special cases we introduce a level above Content
that contains all Output.
The idea is that all output files derive from Output so that they can be
checked against the by_uri map. All files will then follow the discover
-> write loop.
Allow the user to set a summary and make Article extract its own summary
when the Article.render is called and the summary is still missing.
Extracted summaries only work when the first item of a markdown file is
a paragraph.