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.5.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.5-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for mkdocs_fedi_comments-0.1.5.tar.gz
Algorithm Hash digest
SHA256 6f707f33ef18d71ce024dc70e6dd83d9991ff47d0b6a8d5a665fae08802046db
MD5 073f844b2d3eb624bcae561c98796664
BLAKE2b-256 3ad5e32f7061d2b8c67e76fd855411668942ded5c9dc11dc652319b623a903ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkdocs_fedi_comments-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5811810c31b8b561b8a16726ba0adebf7ff34f8f3decac14d26ff4dff534eb6a
MD5 f3e3ea985398eb34ed10e413c5c22643
BLAKE2b-256 8d786f416b3a4c6f9b61bafb1f57161fd32bcfd08eac5b9f1e9cb8a92d18b41e

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