Skip to main content

Plugin enables adding comments to mkdocs sites from the Fediverse through an external service

Project description

mkdocs_fedi_comment

[!NOTE] This plugin requires a comments-server to work.

This plugin is meant to enable commenting from the Fediverse on sites build with mkdocs. This plugin uses the overrides provided by mkdocs-material. This means that a simplest configuration would look like

theme:
  name: material

plugins:
  - fedi-comments:
      base_path: https://comments.bovine.social/
      actor:
        name: mkdocs-fedi-comments
        handle: mkdocs_fedi_comments
  - search

The fedi-comments plugin provided by this package requires some configuration. base_path is where your comments server is located. This is used to determine the location of the ActivityPub objects via {base_path}/pages/{encoded_url} and for the API endpoint to retrieve comments from, i.e. {base_path}/comments/{encoded_url}.

Second the values under actor are used to create the used ActivityPub actor. In addition to name and handle, which are required, one currently can also specify summary and icon.

The sample site

The sample site is deployed to https://bovine.codeberg.page/mkdocs_fedi_comments/ and the corresponding installation of comments is configured with

[[pages]]
url = "https://bovine.codeberg.page/mkdocs_fedi_comments"
name = "mkdocs_fedi_comments"

Development

There are some python tests that can be run via

uv run pytest

Similarly one can check that the sample_site builds via

cd sample_site
uv run mkdocs build

This executes the plugin, which is included in the sample site as an editable dependency.

JavaScript component

The replies are displayed through a JavaScript component. It is automatically build with the python package. One can manually run this step via

uv run hatch build --hooks-only --target wheel

To visually develop the component run

cd js
npm run storybook

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs_fedi_comments-0.1.4.tar.gz (23.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_fedi_comments-0.1.4-py3-none-any.whl (106.4 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_fedi_comments-0.1.4.tar.gz.

File metadata

File hashes

Hashes for mkdocs_fedi_comments-0.1.4.tar.gz
Algorithm Hash digest
SHA256 14464e019bf3943b6e6ba284b3bd916c777801b79ff13aceea0f9f3883f2be9b
MD5 a14aaf8caf4f48a86ab0cce1be423d32
BLAKE2b-256 ad6b6320e496e4d36227eb57ed681a91885e31ec2669b70d9efba0322abedfb4

See more details on using hashes here.

File details

Details for the file mkdocs_fedi_comments-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_fedi_comments-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7fe6050c0e9e6d2f781945e22bb14a976697ec121b26029828bdbd5da2b9589a
MD5 7775d5fda965fc94c1200e3ff6242e9a
BLAKE2b-256 24537066d049fa24ec4b55abaec65b92aaff8cd12902ede87ac5ee5adbf643c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page