feat: read changelog from public/changelog.json, drop Webflow/Algolia dep#302
Open
markshenouda wants to merge 3 commits into
Open
feat: read changelog from public/changelog.json, drop Webflow/Algolia dep#302markshenouda wants to merge 3 commits into
markshenouda wants to merge 3 commits into
Conversation
Replaces the runtime Algolia 'Changelog' index lookup in changelog.astro, changelog/[...id].astro, and ChangelogSnippet.astro with a build-time read of public/changelog.json. Adds src/utils/changelog.ts which ports the slug, description, related-tokens, and related-networks HTML generation from chainlink-webflow-cms-api's chainlog-handler.js, plus a category-to-label map (integration/release/deprecation/feature/update/ cre/dta/ace, with title-case fallback). Uses marked (already a dep) instead of showdown. Closes #290.
Previously the search input took priority and silently ignored active type/product/network filter chips. Now a row must match both the search term and the filters when both are present.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
public/changelog.jsonat build time, removing the runtime AlgoliaChangelogindex lookup fromchangelog.astro,changelog/[...id].astro, andChangelogSnippet.astro.src/utils/changelog.ts, which ports slug / description / related-tokens / related-networks HTML generation fromchainlink-webflow-cms-api/chainlog-handler.js, plus a category→label map (integration,release,deprecation,feature,update,cre,dta,ace, with title-cased fallback for anything else). Usesmarked(already a dep) instead of pulling inshowdown.Closes #290.
Why
The changelog data is already authored in
public/changelog.json(mirrored fromsmartcontractkit/documentation). Round-tripping it through Webflow → Algolia → the docs site was the reason new categories likedeprecation,cre,dta,acewere silently dropped:chainlog-handler.jsskipped any entry whose category didn't match a slug in the WebflowChainlog typescollection. Reading the JSON directly removes that bottleneck and makes the data the single source of truth.Follow-up
Once this is verified in prod, a separate cleanup PR in
chainlink-webflow-cms-apican deletechainlog-handler.js, thenpm run chainlogworkflow step, theChangelogs-v2sAlgolia generator entry, and thechainlogschema validator. The@algolia/client-searchpackage is also no longer used insrc/and can be dropped frompackage.json(left for the follow-up since this PR is already across multiple files).Test plan