Skip to content

Conversation

@kenodegard
Copy link
Contributor

Description

We currently rely on the npm run update-news script (written in Python) to scrape the 5 most recent blog posts.

We also have a npm run banners script to generate banners for blog posts.

In this PR we seek to combine all of this into one super tool that scrapes the recent blog posts but also checks the frontmatter for correctness (e.g., is slug and image defined).

In order to avoid complexities (impossibilities?) of trying to call Node.js from Python within the pre-commit container I opted to convert update-news into a JS script (now called index-blog).

With this change both of the scripts are still callable via npm run but they are also included as a pre-commit hook.

  • If I have added a new page to learn/ or community/, I have added it to the corresponding _sidebar.json file.

@netlify
Copy link

netlify bot commented Jan 24, 2025

Deploy Preview for conda-dot-org failed.

Built without sensitive environment variables

Name Link
🔨 Latest commit a027cf3
🔍 Latest deploy log https://app.netlify.com/sites/conda-dot-org/deploys/6793470794de8d0008ed6e3d

@kenodegard kenodegard changed the title Rework update-news & banner into pre-commit hook Rework update-news & banner into new pre-commit hook (index-blog) Jan 24, 2025
@kenodegard
Copy link
Contributor Author

pre-commit.ci autofix

@kenodegard
Copy link
Contributor Author

ugh pre-commit seems to timeout, need to rethink how the dependencies get installed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant