Skip to content

✨ feat: add new medium posts parser #134

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

Merged
merged 1 commit into from
Jul 10, 2025

Conversation

alettsy
Copy link
Contributor

@alettsy alettsy commented Jul 8, 2025

Hello, again! πŸ‘‹

I hope the following contribution is all okay, and if it is not, please don't hesitate to let me know what I need to change! 😊

This fixes #133.

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Enhancement
  • Documentation Update

What I did

The current Medium posts activity does not work. The URL provided for the images comes back with two different errors depending on if the username is valid or not, which I commented about in #133.

I have replaced it with a different way to show the Medium posts, and updated the appropriate unit tests.

In addition to this, I have done some slight refactoring of the activities parser so that for future activities it should be easier to add new parsers for different types of posts from different sources without modifying the existing parser logic.

I wasn't sure how you would like the images to be styled, so I just assumed they would take up 100% of the width.

As the code for the activities ends up generating HTML, I added the package html-react-parser so that HTML can be safely injected into the activity container.

If any changes need to be made, please let me know! 😊

Screenshots

Initial add:
image

After setting username:
image

The current medium posts link does not work and always
returns an error. This new method generates a similar
result to what was desired before.

Fixes #133
Copy link

vercel bot commented Jul 8, 2025

@alettsy is attempting to deploy a commit to the Mauro de Souza's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Owner

@maurodesouza maurodesouza 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 again @alettsy ❀

@maurodesouza maurodesouza merged commit 45a7e9f into maurodesouza:main Jul 10, 2025
1 of 2 checks passed
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.

[BUG]: Layout with last Medium posts
2 participants