adobe / theblog

Apache License 2.0
7 stars 14 forks source link

Publish taxonomy.json whenever a topic page gets publish #704

Closed rofe closed 3 years ago

rofe commented 3 years ago

Authors need to remember to publish the taxonomy whenever they change an existing topic or add a new one. It would feel more intuitive if we just took care of this automatically whenever the author publishes a topic page, taking the language branch into account.

rofe commented 3 years ago

Implementation: add <lang>/topics/_taxonomy.json to the window.hlx.dependencies array (and create the array if it doesn't exist yet)

himanshu007-creator commented 3 years ago

Hi , I would like to work on this issue, there are 6 occurances of window.hlx.dependencies in codebase. So i have to add /topics/_taxonomy.json to these 6 arrays only?

rofe commented 3 years ago

Hi , I would like to work on this issue

@himanshu007-creator Cool, looking forward to your PR!

So i have to add /topics/_taxonomy.json to these 6 arrays only?

Actually, no, this URL would only be added to said array on topic pages, see here.

And you can take a look at getLink() for how to construct the URL.