WIP: Add Webmentions support #1

Draft
blacklight wants to merge 18 commits from feature/webmentions into main
Owner
  • Expose Webmentions callback
  • Store Webmentions
  • Send Webmentions
    • Scan for file modifications
    • Parse URLs in posts and scan for Webmention hooks
    • Add Webmention dispatcher thread
  • Fetch title and icon from source page if not provided
  • Render Webmentions as comments
  • Support multiple content formats
  • Add HTML->Markdown parser if needed
  • Add Microformats2 parser if needed
  • Manage updates
  • Manage deletions
  • Approvals
  • Email notifications
  • Throttling

Closes: #2

- [x] Expose Webmentions callback - [x] Store Webmentions - [ ] Send Webmentions - [ ] Scan for file modifications - [ ] Parse URLs in posts and scan for Webmention hooks - [ ] Add Webmention dispatcher thread - [ ] Fetch title and icon from source page if not provided - [ ] Render Webmentions as comments - [ ] Support multiple content formats - [ ] Add HTML->Markdown parser if needed - [ ] Add Microformats2 parser if needed - [ ] Manage updates - [ ] Manage deletions - [ ] Approvals - [ ] Email notifications - [ ] Throttling Closes: #2
blacklight changed title from WIP: feat(webmentions): Added support for receiving and storing Webmentions to WIP: Add Webmentions support 2026-01-15 01:20:11 +01:00
Will implement a more granular moderation system later.
Webmentions should distinguish between incoming and outgoing mentions.

This commit introduces the WebmentionDirection enum to represent the
direction of a Webmention, allowing for clearer handling of inbound and
outbound mentions within the system.
- Removed unnecessary parse_metadata method.
- Adjusted verify_webmention to return the response text directly.
- Moved webmention verification and parsing code from
  `WebmentionsHandler` to `WebmentionsParser`
- Updated `process_webmention_request` to utilize the new parser for
  extracting mention data
- Simplified data handling for webmentions by consolidating data
  extraction in the new parser class
- Ensured rigorous error handling for source and target URLs within the
  parser
- Updated README.md to include webmentions configuration and usage
  instructions.
- Modified config.example.yaml to include options for enabling
  webmentions and hard deletes.
- Enhanced app.py to handle datetime formatting.
- Updated config.py to include webmention configuration fields.
- Introduced WebmentionGone exception for non-existent webmentions.
- Developed storage functionalities in _storage.py to handle incoming
  webmentions with soft and hard deletes.
- Updated _model.py to introduce webmention status and improved data
  handling in webmention parsing.
- Adjusted _parser.py to correctly handle webmention validation and
  status updates.
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/webmentions:feature/webmentions
git switch feature/webmentions

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feature/webmentions
git switch feature/webmentions
git rebase main
git switch main
git merge --ff-only feature/webmentions
git switch feature/webmentions
git rebase main
git switch main
git merge --no-ff feature/webmentions
git switch main
git merge --squash feature/webmentions
git switch main
git merge --ff-only feature/webmentions
git switch main
git merge feature/webmentions
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
blacklight/madblog!1
No description provided.