I use the environment variable pub=tfl or pub=bpt to determine which target to use in a writing or rendering session. Then I have tag functions called tfl and bpt that are shown in one publication and not the other, so I write branching sentences like
This is commonly used by ◊tfl{lawyers}◊bpt{writers}.
I also use the pub environment variable in the setup 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 added pub to the envvar-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.
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
)