news-catalyst / google-app-scripts

a collection of scripts for tinynews google docs add-ons
https://script.google.com/a/newscatalyst.org/d/1ILURq69o3cYUy6k1n1X6HwxdMfl9xWNhILYuZxgLfeblb3IR15WCMZSj/edit
1 stars 1 forks source link

Stores the category slug along with article slug after preview or publish #358

Closed jacqui closed 2 years ago

jacqui commented 2 years ago

357

Satisfies the update required in the publishing tools sidebar to store the slug of the category AND the article for retrieval by the front-end.

Saving this document:

Screen Shot 2021-10-21 at 2 08 02 pm

Results in this record in article_slug_versions:

Screen Shot 2021-10-21 at 2 05 38 pm

Meaning if the category slug is changed in the future, like in this example 'business' is changed to 'industry', and an existing link of /articles/business/simple-article-body is clicked, there will be a record of the cat slug business with the article slug simple-article-body that points to the right article ID in the database.