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

Use publish frontmatter instead of ready folder to convert markdown syntax #261

Closed
wants to merge 21 commits into from

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Oct 1, 2023

PR Feedback: 👎

Description

This PR modifies the code to use the 'publish: true' front matter instead of the 'ready' folder to select files for conversion. This aligns with the requested feature to designate files for conversion based on front matter.

Summary of Changes

  • Renamed the 'getFilesInReady' function to 'getFilesToPublish' in 'chirpy.ts'.
  • Modified the 'getFilesToPublish' function to select files based on the 'publish: true' front matter.
  • Updated the 'convertToChirpy' function to use the new 'getFilesToPublish' function.
  • Updated the 'backupOriginalNotes' function to use the new 'getFilesToPublish' function.
  • Updated the 'renameMarkdownFile' function to use the new 'getFilesToPublish' function.

Fixes #260.


🎉 Latest improvements to Sweep:


💡 To get Sweep to edit this pull request, you can:

  • Leave a comment below to get Sweep to edit the entire PR
  • Leave a comment in the code will only modify the file
  • Edit the original issue to get Sweep to recreate the PR from scratch

@sweep-ai sweep-ai bot added the sweep Assigns Sweep to an issue or pull request. label Oct 1, 2023
@codecov
Copy link

codecov bot commented Oct 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (36b43d8) 95.34% compared to head (4ae1af4) 95.34%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #261   +/-   ##
=======================================
  Coverage   95.34%   95.34%           
=======================================
  Files          11       11           
  Lines         172      172           
  Branches       24       24           
=======================================
  Hits          164      164           
  Misses          8        8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@songkg7
Copy link
Owner

songkg7 commented Oct 1, 2023

related #255

@sweep-ai
Copy link
Contributor Author

sweep-ai bot commented Oct 1, 2023

🚀 Wrote Changes

related #255

Hi @songkg7,

I decided to make the following changes:

File Path Proposed Changes
src/jekyll/chirpy.ts Modify src/jekyll/chirpy.ts with contents:
• Rename the 'getFilesInReady' function to 'getFilesToPublish'.
• Modify the 'getFilesToPublish' function to select files based on the 'publish: true' front matter. Use the 'FrontMatterConverter' to get the front matter of each file and check if 'publish' is true.
• Update the 'backupOriginalNotes' function to use the 'getFilesToPublish' function instead of 'getFilesInReady'.
• Update the 'renameMarkdownFile' function to use the 'getFilesToPublish' function instead of 'getFilesInReady'.

@songkg7 songkg7 closed this Jan 16, 2024
@songkg7 songkg7 deleted the sweep/use-publish-frontmatter branch January 16, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use publish frontmatter instead of ready folder to convert markdwon syntax
1 participant