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

Development

First enter the js directory.

To visually develop the component run, you have to first generate the MSW service worker and the MSW Docs.

npx msw init public/ --save

then you can run storybook via

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for mkdocs_fedi_comments-0.1.7.tar.gz
Algorithm Hash digest
SHA256 9987cc59c9878516a67774f78f63bf792fee44a705301220f97d3ab225456cd3
MD5 739362000ece8c8040e2164a44d5d5cb
BLAKE2b-256 b1da6073bc2c017c3de231c6eeb1eec0bcb95e250b7f7541473b251c062d86ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkdocs_fedi_comments-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b43f2fbff212d68c1ddafc089d6c1f84288cedae8d898f3dc6d736856ddd8010
MD5 f0e85a1994e914a945c3709eed29d715
BLAKE2b-256 8d43b5b88ea82da663c07427e6ead2f69e10bd0f9cf9765eafad5fa6685c8242

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