Customizing the news feeds¶
news step, all documents in a docrepo are published in
one or more feeds. Each feed is made available in both Atom and HTML
formats. You can control which feeds are created, and which documents
are included in each feed, by the facets defined for your repo. The
process is similar to defining criteria for the TOC pages.
The main differences are:
- Most properties/RDF predicates of a document are not suitable as
facets for news feed (it makes little sense to have a feed for
dcterms:issued). By default, only
dcterms:publisherbased facets are used for news feed generation. You can control this by specifying the
- The dict that is passed to the selector and identificator functions
contains extra fields from the corresponding
DocumentEntryobject. Particularly, the
updatedvalue might be used by your key func in order to sort all entries by last-updated-date. The
summaryvalue might be used to contain a human-readable summary/representation of the entire document.
- Each row is passed through the
news_item()method. You may override this in order to change the
summaryof each feed entry for the particular feed being constructed (as determined by the
- A special feed, containing all entries within the docrepo, is always created.