Select one or more tags, then press “Search Plugins”

Find Plugin with any / all of the selected criteria
Search Plugin

Blogroll & Podroll Block Wordpress Plugin - Rating, Reviews, Demo & Download

Blogroll & Podroll Block Wordpress Plugin - Rating, Reviews, Demo & Download
No ratings yet
Free
Follow for free plugins, new theme releases and theme news

Plugin Description

A blogroll is a list of the sites you read, put on your own site so other people can
find them. This plugin adds one block for that. You collect the links, the block renders
them on your page, and visitors can take the whole list with them into their feed reader.

It works for anything you want to recommend: blogs, podcasts, the people you know, the
sites of your local club.

Adding a link is one field. Paste the address and the plugin looks up the site’s
name, description, icon and feed for you. You can correct all of it afterwards, and you
can fill in everything by hand if you prefer.

Nothing to configure. There is no settings page and no extra database table. The
list is part of the page it sits on, so it is backed up, revisioned and exported
together with that page.

Other people can subscribe. Your list is published as an OPML file, the format feed
readers use for subscription lists. Someone can hand that address to their reader and
follow everything you recommend, and readers can find it on your site by themselves. If
you change your list, their copy stays up to date.

Bring your list along. Import the OPML export from your feed reader and the block is
filled in one go, instead of pasting a hundred links by hand.

Say how you know someone. You can mark an entry as a friend, a colleague, or someone
you have met. It shows up as a small note under the entry, and it is readable for tools
that map who knows whom.

Sorting and paging for visitors. Long lists get pages, and visitors can sort by name
or by what you added last. There is no JavaScript in the list at all, every click is a
normal page load, and you can switch the sorting off per block.

For developers

The links live in the block attributes, so the whole blogroll travels with the post
content. Each link holds url, name, description, feedUrl, photo, an xfn
array, and the date it was added.

Every entry is marked up as an h-card with
XFN relationships on the link, in an
XOXO list:

<ul class="blockroll-list xoxo blogroll">
  <li class="h-card">
    <img class="u-photo" src="…" alt="" loading="lazy">
    <a class="u-url p-name" rel="friend met noopener" href="https://example.com/">Example</a>
    <p class="p-note">A blog about examples</p>
    <a class="u-feed" rel="alternate noopener" type="application/rss+xml" href="…/feed/">feed</a>
  </li>
</ul>

OPML is a plain query var rather than a rewrite rule, so nothing has to be flushed, and
when the plugin is disabled the URL falls back to the page instead of leaving subscribed
readers with a 404:

  • {page}/?opml is the OPML of one blogroll page.
  • /?opml is a directory that lists those per-page OPMLs as <outline type="include">,
    so a reader references them instead of keeping a copy.
  • /.well-known/recommendations.opml is the same directory under a well-known address.
    That path has no page behind it, so it does get a rewrite rule, flushed on activation.

Pages with a blogroll advertise their own OPML with <link rel="blogroll">, following
Dave Winer’s proposal, and the front page repeats
those links. Feeds carry the same information as <source:blogroll>. The directory
address is never advertised, since it is a list of OPMLs rather than a blogroll.

Two REST routes back the editor, because a browser cannot fetch other people’s sites
itself:

  • POST blockroll/v1/discover takes a URL and returns feed, name, description and photo.
  • POST blockroll/v1/import takes an OPML file, paste, or URL and returns links.

Which pages have a blogroll is kept in a private taxonomy, updated on save. The link
data still lives in the block, the taxonomy is only an index.

Development

`bash

composer install
npm install

npm run build # compile the block assets (build/ is committed)
npm run dev # watch mode
npm run env-start # wp-env on ports 8833/8834
composer test:wp-env # PHPUnit inside wp-env
npm run test:unit # Jest
npm run lint:js
npm run lint:css
composer lint # PHP CodeSniffer (WPCS)
`

File layout

`

wordpress-blockroll/
├── blockroll.php # plugin bootstrap
├── includes/
│ ├── class-discovery.php # extracts feed, name, description, photo from HTML
│ ├── class-import.php # OPML parsing
│ ├── class-links.php # link normalizing and sorting
│ ├── class-opml.php # opml output + head discovery links
│ ├── class-index.php # private taxonomy, kept in sync on save
│ ├── class-xfn.php # XFN vocabulary and rel helper
│ └── rest/
│ ├── class-discovery-controller.php # POST blockroll/v1/discover
│ └── class-import-controller.php # POST blockroll/v1/import
├── templates/
│ ├── opml.php # OPML of one blogroll page
│ └── opml-directory.php # directory of all blogroll pages
├── src/blogroll/
│ ├── block.json # block metadata and attributes
│ ├── render.php # PHP frontend rendering
│ ├── index.js # registerBlockType
│ ├── edit.js # editor UI
│ ├── components/ # link form, import modal, XFN control
│ ├── editor.scss
│ └── style.scss
├── build/ # compiled assets (committed)
├── tests/ # PHPUnit and Jest tests
├── package.json
├── composer.json
└── readme.md
`

Screenshots

No screenshots provided


Reviews & Comments