You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we are using different kinds of items, we could create a helper for each kind of item and put each kind in a separate path. Pros of this option would include taking advantage of automatic Nanoc::Core::IdentifiableCollection memoization (see d142929). Cons would include having to write a new helper for each kind of item.
Another approach would be to write one helper (e.g. Weblog) that could be used to fetch all syndicated items, and use a parameter to delimit kinds. The pro of this is that new kinds could be added easily , the con is that the initial fetching code will be a little more complex.Actually, since we will be moving all static posts to a separate repo (#114) that is mounted at one directory (/static/posts), this fetching code will be more simple than I originally thought. Actually, we may be having more than one root for syndicated items, if we will eventually be syndicating benefit reports, events, and press releases. This would also open up the door to PESOS third-party content (such as tweets) to the site.
I prefer the second option. It is one thing to add a kind-specific layout or styling, since Nanoc dependencies are fine-grained regarding items and layouts. But changing the lib code requires a complete rebuild no matter what. It seems like we should avoid changing the site code solely for content reasons.
Implementation:
Add tests.
Add documentation for how syndicated items work.
Create a Weblog helper module to deal with all syndicated items in an efficient way. Should be able to request one or more kinds of items.
Create a syndicated_roots config value that the Weblog helper uses to pull in all syndicated items.
(issue #44)
- Created weblog helper that pulls from one item root (/static/blog).
- Worked on cohering site metadata
- Renamed 'name' metadata on some kinds of items to 'title' for
consistency
- Removed Blogging helper
- Added rules for syndicated .html and .erb files
- Added some tests
If we are using different kinds of items, we could create a helper for each kind of item and put each kind in a separate path. Pros of this option would include taking advantage of automatic
Nanoc::Core::IdentifiableCollection
memoization (see d142929). Cons would include having to write a new helper for each kind of item.Another approach would be to write one helper (e.g.
Weblog
) that could be used to fetch all syndicated items, and use a parameter to delimit kinds. The pro of this is that new kinds could be added easily, the con is that the initial fetching code will be a little more complex.Actually, since we will be moving all static posts to a separate repo (#114) that is mounted at one directory (Actually, we may be having more than one root for syndicated items, if we will eventually be syndicating benefit reports, events, and press releases. This would also open up the door to PESOS third-party content (such as tweets) to the site./static/posts
), this fetching code will be more simple than I originally thought.I prefer the second option. It is one thing to add a kind-specific layout or styling, since Nanoc dependencies are fine-grained regarding items and layouts. But changing the
lib
code requires a complete rebuild no matter what. It seems like we should avoid changing the site code solely for content reasons.Implementation:
Weblog
helper module to deal with all syndicated items in an efficient way. Should be able to request one or more kinds of items.syndicated_roots
config value that theWeblog
helper uses to pull in all syndicated items.Blogging
helper.kind
, like layouts.The text was updated successfully, but these errors were encountered: