Skip to content

528-article-default-image#529

Merged
rrrutledge merged 2 commits intomainfrom
528-article-default-image
Feb 1, 2023
Merged

528-article-default-image#529
rrrutledge merged 2 commits intomainfrom
528-article-default-image

Conversation

@marshmallowrobot
Copy link
Copy Markdown
Collaborator

@marshmallowrobot marshmallowrobot commented Jan 29, 2023

This PR does two things:

  1. Fixes a bug where the new VTT caption files were being considered articles, causing the site generation script to x_x.
  2. Any articles without YouTube videos will now reference a default image.

Related to Issue #528

The actual image is included in a sister PR in the innersourcecommons.org repository: InnerSourceCommons/innersourcecommons.org#468

@yuhattor
Copy link
Copy Markdown
Member

@marshmallowrobot I merged the PR:)
InnerSourceCommons/innersourcecommons.org#468

return fs.readdirSync(path).reduce((articles, filename) => {
const filePath = join(path, filename)
if (filePath.match(/\d\d/) && !filePath.includes('-script.asciidoc')) {
if (filePath.match(/\d\d[-\w]+(?<!script)\.asciidoc/)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Clever!

Copy link
Copy Markdown
Contributor

@rrrutledge rrrutledge left a comment

Choose a reason for hiding this comment

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

Thank you ‼️

@rrrutledge rrrutledge merged commit 18ab5ba into main Feb 1, 2023
@rrrutledge rrrutledge deleted the 528-article-default-image branch February 1, 2023 16:59
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.

3 participants