Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ProductDataEnricher plugin to enrich product pages metadata #2239

Merged
merged 1 commit into from
Jan 12, 2023

Conversation

marcwrobel
Copy link
Member

With this approach, enriched data is only computed once and available both in layouts and in plugins (such as the APIv1 plugin - see #2080). This make things easier in both places.

validate.py now checks if releaseLabel is a string.

This PR relates to (and conflicts with) #2226.

@marcwrobel marcwrobel requested a review from captn3m0 January 3, 2023 22:15
@marcwrobel
Copy link
Member Author

@captn3m0, this PR is similar yours (#2226), but it contains only computations for what I need in the API (#2080). It works without any change to the product frontmatter (except a minor one for raspberrypi).

I moved the following computations in this plugin

  • iconUrl computation (like in your plugin),
  • tags-related computation as a preparation for Support tags in endoflife.date #2225 (not in your plugin),
  • cycles lts / discontinued default value (not in your plugin),
  • cycles link computation with __XXX__ replacements and liquification (not in your plugin),
  • cycles label computation with __XXX__ replacements, liquification and LTSLabel management (not in your plugin).

I have made a few test and it looks good enough to be merged IMHO. A few pages to test :

@marcwrobel marcwrobel force-pushed the product-data-enrichement branch from 60ddbc2 to 4ad92cf Compare January 4, 2023 09:15
@marcwrobel marcwrobel requested a review from captn3m0 January 4, 2023 09:16
@captn3m0
Copy link
Member

captn3m0 commented Jan 4, 2023

The title attribute on release cycle column seems to be rendering incorrectly:

https://deploy-preview-2239--endoflife-date.netlify.app/android has title=Release Notes / Changelog for

Could you also check for upcoming LTS? (No product has it right now, so test manually)

@marcwrobel
Copy link
Member Author

Could you also check for upcoming LTS? (No product has it right now, so test manually)

Actually there is one, Devuan : https://deploy-preview-2239--endoflife-date.netlify.app/devuan.

@marcwrobel marcwrobel force-pushed the product-data-enrichement branch from 4ad92cf to bfb74a4 Compare January 4, 2023 11:32
@marcwrobel
Copy link
Member Author

The title attribute on release cycle column seems to be rendering incorrectly:

I forgot to replace one releaseCycleText, this is fixed.

With this approach, enriched data is only computed once and available both in layouts and in plugins (such as the APIv1 plugin - see #2080).
This make things easier in both places.

validate.py now checks if releaseLabel is a string.

This PR relates to (and conflicts with) #2226.
@marcwrobel marcwrobel force-pushed the product-data-enrichement branch from bfb74a4 to 2ecddb8 Compare January 4, 2023 19:47
@marcwrobel
Copy link
Member Author

Conflicts with the just-merged PR #2157 resolved.

@marcwrobel marcwrobel mentioned this pull request Jan 4, 2023
@marcwrobel
Copy link
Member Author

@captn3m0 is it good enough to be merged ?

Copy link
Member

@captn3m0 captn3m0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@marcwrobel marcwrobel merged commit 5f6f2dd into master Jan 12, 2023
@marcwrobel marcwrobel deleted the product-data-enrichement branch January 12, 2023 16:38
marcwrobel added a commit that referenced this pull request Jan 13, 2023
This was the case before for the latest column, but was broken by #2239.

I also did the same for links in the 'Release' column (it was not done before).
captn3m0 pushed a commit that referenced this pull request Jan 14, 2023
This was the case before for the latest column, but was broken by #2239.

I also did the same for links in the 'Release' column (it was not done before).
@marcwrobel marcwrobel added the enhancement New feature or request label Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants