Code Monkey home page Code Monkey logo

feed-block's People

Contributors

cr0ybot avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

feed-block's Issues

Transforms

Add transforms for content to summary and vice versa. Are there any other feed item blocks that could be swappable?

  • Content <-> Summary
  • Other?

Make images link to site not image file and optionally truncate the content

Firstly, what a fantastic plugin, thank you. I have been looking for something to replace the limited RSS block as I wanted to pull some content from my sites together into one place. Yours is the best RSS plugin I've found and I've tried almost every plugin in the directory. A couple of minor feature requests if I may:

  1. The ability to have the images link to the site URL, not the url of the image file.

  2. The ability to truncate content to either a set number of words, sentences or the first HTML paragraph.

Thanks again for your efforts.

Text placeholders

Like the image block, text-based blocks should also include a placeholder text option. This will also allow me to add block previews and better handle empty feed content.

Image block needs to handle a variety of sources

Currently, the image block by default pulls the first img tag from the description or the contents of a custom tag, but this assumes the tag contents are HTML. There is a setting to use the content itself as the URL, but in the case of podcast feeds, the image URL is provided by an href attribute on the itunes:image tag. Perhaps part of the standard image detection should include checking for itunes:image.

  • Check for itunes:image tag as default image (handled in #3)
  • Get image URL from custom tag attributes (requires serious rewrite)

No Results blocks always display

The contents of the No Results block are always shown on the front end. Even when empty, <p></p> is rendered.

Silly me, I forgot to hook up the render template.

Reported by @philhoyt

Namespace all contexts

When referencing core blocks, obviously they would use context variables with no namespace, but a plugin should namespace their context vars.

Add feed-block/ to all contexts provided and consumed in the plugin.

Prevent using URL of the same site

The core RSS block prevents pulling in a feed with the same URL as the current site. I think this is probably wise, but I'd like to offer a filter to allow it for some advanced usage that I might not fully grasp at this point.

This should probably be handled by the FeedBlock\Feed\get_feed function so that it can be filtered once in PHP. Will have to consider what kind of return value (WP_Error?) would make the most sense and how that is handled both in editor and front end.

Remove custom feed item block in favor of custom content options per block

One block for custom namespaced tags with every conceivable formatting option is, in hindsight, really dumb.

Instead, each feed item block—title, summary, image, etc—should include an option for getting the content from a custom tag instead of the default. Each block can then be considered a specific "format".

Add custom content options to these existing blocks:

  • Title
  • Summary
  • Content
  • Image

Create new blocks to handle additional functionality:

  • Date / Time
  • Link

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.