A plugin for DJ Press that publishes new posts to Bluesky.
Project description
DJ Press Bluesky Publisher
A plugin for DJ Press that automatically publishes your blog posts to your Bluesky account. When you publish a new post on your DJ Press site, this plugin will create a corresponding post on your Bluesky account with a customisable message.
Features
- 🚀 Automatic posting to Bluesky when blog posts are published
- 📝 Customisable post message
- ✅ Keeps track of posts that have already been posted to Bluesky, so you don't get multiple posts for the same blog post.
Requirements
- Python >= 3.10
- Django >= 4.2
- DJ Press >= 0.12.1
- httpx>=0.28.0
Installation
-
Install the package using pip:
pip install djpress-publish-bluesky
-
Add the plugin to your
DJPRESS_SETTINGSinsettings.py:DJPRESS_SETTINGS = { # ... existing settings "PLUGINS": [ # ... existing plugins "djpress_publish_bluesky", ] }
-
Add the plugin settings to your
DJPRESS_SETTINGSinsettings.py:DJPRESS_SETTINGS = { # ... existing settings "PLUGIN_SETTINGS": { # ... existing plugins "djpress_publish_Bluesky": { "handle": "username.bksy.social", # check your Bluesky account profile for the full handle "app_password": "...", # create an app password and preferably load from an environment variable or secrets manager "site_url": "https://example.com", # the URL to your site so we can create the links properly "post_message": "🚀 I created a new blog post!", # this can be ommitted if you're happy with the default message shown here "pds_url": "https://bsky.social", # this can be ommitted if using the default bsky.social app } } }
Configuration
Getting Your Bluesky Password
- Log into your Bluesky account
- Go to Settings > Privacy and Security > App passwords
- Click "Add App Password"
- Give it a name (e.g., "My DJ Press Blog")
- Don't give it any additional permissions
- Copy and save the password into your
DJPRESS_SETTINGSas described above.
Usage
Once configured, the plugin works automatically. When you publish a new blog post, it will be posted to your Bluesky account using the configured message.
Note that a published post will only be published to Bluesky once - the first time it is saved and with
is_published = True. This plugin keeps track of which posts have been published to Bluesky and won't publish them
again. The list of published posts is stored in the plugin storage model.
Troubleshooting
If posts aren't appearing on Bluesky:
- Check the Django logs for warning messages
- Verify your handle and app password is correct
- Ensure the plugin is enabled in settings
- Confirm your Bluesky pds_url is correct
- Check that your posts are marked as published
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
Distributed under the MIT License. See LICENSE for more information.
Credits
Created by Stuart Maxwell Powered by DJ Press
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file djpress_publish_bluesky-1.0.0.tar.gz.
File metadata
- Download URL: djpress_publish_bluesky-1.0.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
807e9f694fd7f09165c804d9f095e866eb4058e34f264b0e5cc6edef1491e3c2
|
|
| MD5 |
154cabcf097de3f62374fb756bb08a7f
|
|
| BLAKE2b-256 |
8dec82b72e1b24794df19f4b1a9c3ebac1159607d7c3a02415a0ab9cca748321
|
File details
Details for the file djpress_publish_bluesky-1.0.0-py3-none-any.whl.
File metadata
- Download URL: djpress_publish_bluesky-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71932038428259b966cd48c09eb0e92a88ffae60f3be5dcf74f586b7fbd3f78f
|
|
| MD5 |
0ab01903dccb8af85106309c141f02df
|
|
| BLAKE2b-256 |
7adba17bc2b44d20b0f975ff476fb98e02403ce9e8ccef47a94665b3b89312a8
|