Pollen report: two websites, one source #17

Closed
opened 5 years ago by mbutterick · 1 comments
mbutterick commented 5 years ago (Migrated from github.com)

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 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 recently did something with Pollen I hadn’t tried before: collapsing my websites [Practical Typography](//practicaltypography.com) and [Typography for Lawyers](//typographyforlawyers.com) into one set of source files. 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`)
sorawee commented 5 years ago (Migrated from github.com)

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 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.
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mbutterick/pollen-users#17
Loading…
There is no content yet.