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.6.tar.gz (23.3 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.6-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for mkdocs_fedi_comments-0.1.6.tar.gz
Algorithm Hash digest
SHA256 3ddc2ac26ae946475f259a79a005a1055cc793b65b620af9f58d337fdf9bb5ae
MD5 19401b4fa33da3e52d56ad76d0307d8a
BLAKE2b-256 89d2f9015e57d116615075e74de03888cb95cc8db9414e418281a97bc947b4ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkdocs_fedi_comments-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 fcd6cc8d6d259e29bdc9f9522dd7689f4adf64b164a07b5ebcd9acdae6e0839f
MD5 41498a9b16dc2e759469e98c72ac5876
BLAKE2b-256 077f45257d9ac37a1c7ef3a52cd09df499b4a3c873c0a0888c4b096cf799e4cc

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