Pollen report: two websites, one source
#17
Closed
opened 5 years ago by mbutterick
·
1 comments
Loading…
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
I recently did something with Pollen I hadn’t tried before: collapsing my websites Practical Typography and Typography for Lawyers into one set of source files.
I use the environment variable
pub=tfl
orpub=bpt
to determine which target to use in a writing or rendering session. Then I have tag functions calledtfl
andbpt
that are shown in one publication and not the other, so I write branching sentences likeI also use the
pub
environment variable in thesetup
submodule to set a different default pagetree and publishing directory. Aside from a few other minor housekeeping details, that’s about it.The only shortcoming I’ve found is that having two projects “duplexed” in this way defeats the page-rendering cache (that is, when you switch from one publication to another, you have to reset all the rendered HTML files). However, the compile caches work correctly, since Pollen keeps separate caches for each value of
pub
(once I addedpub
to theenvvar-watchlist
)I did the same with my (kinda defunct) webpage, to support multi-languages. I find it much easier to keep stuff in sync with this way. And common content (equation and code) is also shared.