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

[Feature]: Remove Medium Preview Image from Description #74

Closed
nicko170 opened this issue Jul 12, 2021 · 1 comment
Closed

[Feature]: Remove Medium Preview Image from Description #74

nicko170 opened this issue Jul 12, 2021 · 1 comment
Labels
question Further information is requested

Comments

@nicko170
Copy link

Hey @gautamkrishnar!

Firstly, this is amazing, so thank you.

I'd like to ask about getting an option to strip the images from the description generated by Medium. Just a bit too big to be in here I think :-)

Example: https://github.com/nicko170/nicko170/blob/main/README.md

Thanks again!

@nicko170 nicko170 added the enhancement New feature or request label Jul 12, 2021
@gautamkrishnar gautamkrishnar added question Further information is requested and removed enhancement New feature or request labels Jul 12, 2021
@gautamkrishnar
Copy link
Owner

gautamkrishnar commented Jul 12, 2021

Hi @nicko170 You can do this via item_exec:

name: Latest blog post workflow
on:
  schedule:
    - cron: 0 * * * *
  push:
    branches:
      - main
jobs:
  update-readme-with-blog:
    name: Update this repo's README with latest blog posts
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: gautamkrishnar/blog-post-workflow@master
        with:
          max_post_count: '5'
          feed_list: 'https://medium.com/feed/@nicko170'
          template: '- [$title]($url): $description $newline'
          date_format: 'UTC:ddd yyyy-mm-dd h:MM:ss TT Z'
          filter_comments: medium
          tag_post_pre_newline: 'true'
          item_exec: |
            post.description = post.description.replace(/<\/?[^>]+(>|$)/g, ""); 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants