Coeur - static site management
Coeur is just another Python tool to generate static sites with thousands of pages, with a bit of extra power.
Name explanation
"cœur" is a French word for "core" or "heart".
This tool is called Coeur for two personal reasons: 1. it will be the core of my blog-farm; 2. one of my favorite places is the Sacre Cœur in Paris.
How to install
Coeur is a common python package, you can install from pypi:
pip install --user blog-coeur
The command to be used is blog-coeur and get help to start to use:
blog-coeur --help
Module SSG - Static Site Generator
The ssg module in Coeur allows you to create a static website from a sqlite database and import content from markdown files.
How to Use
Create Your Coeur App
To start a new project, run the create command:
blog-coeur ssg create my-blog
Development Server
Run a simple local server to build your blog:
blog-coeur ssg server --max-posts=1000 --port=8081
Admin Web Panel
Manage your blog’s posts through a web dashboard (static HTML + REST API):
blog-coeur ssg admin
Go to: http://localhost:8000/
Admin module — The admin is a single-page app served by the same process. It lets you:
- Search / list posts: Choose a database (or "All"), then search by title or leave the search empty and click Search to list posts paginated. Results open in the left panel.
- Edit a post: Click a result to load it. The main area shows two columns: editable fields (title, content, path, date, image) on the left and a live preview on the right. Content supports HTML or Markdown; Markdown is rendered in the preview.
- Rich editor: Toolbar (bold, italic, headings, lists, link) for the content. Use "View source" to switch between WYSIWYG and raw HTML/Markdown; for Markdown posts, the source view shows Markdown.
- Update: Click "Update post" to save changes. The API is REST (GET/PUT); the navbar link "API (Swagger)" opens the interactive docs at
/docs.
Build Static Site
Build your blog with the build command:
blog-coeur ssg build
The blog will be generated in the public folder.
Markdown Import
To import your markdown files from Zola Framework to Coeur:
blog-coeur ssg markdown-to-db "./content"
SSG Features
- Import markdown files from Zola Framework
- Basic blog template based on Zolarwind
- HTML Minification
- Sitemap generation with pagination
- Hot reload
- Admin dashboard: search/list posts, rich editor, view source (HTML/Markdown), update via REST API with Swagger at
/docs
TODO List
- Custom templates (themes)
- Documentation about templates
- Support to use post Tags
- Hot reload v2 - add websocket to auto-refresh the html in the browser
Module CMP - Content Machine Processor
The CMP module was designed to simplify content creation powered by the OpenAI API.
How to Use
The content will be created as posts inside the blog's SQLite database, which is generated by the ssg module. It's important to start your project using the ssg command.
Assuming you already have the blog created with Coeur, you need to set up your OpenAI key in the .env file and then you can use the cmp module as follows:
blog-coeur cmp title-to-post "Aguas de Lindóia" --custom-prompt="Create a full article about the city, need to be funny and talking in a positive way about the place"
The first parameter is required and will be the title of the post.
It is highly recommended to use a custom-prompt to enhance your experience and get better results. This prompt can be in any language.
You can also set the img-url parameter to include an image in the post. This needs to be a valid image URL, such as one hosted on S3.
Module PDS – Post Distribution Service
This module will help us to automatically publish the blog posts on social media.
blog-coeur pds publish [OPTIONS] CHANNELS:{instagram}...
Do you want to help?
This is an open-source project, and I need help to make it better.
If you are a developer, feel free to contact me to work on items from my personal roadmap, or you can suggest something new. Be free, let's do it together.
If you are a company, contact me to support the growth of my project. I'm open to improve it for specifics new use-cases.
Metadata
Release files for blog-coeur 0.0.19
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| blog_coeur-0.0.19.tar.gz | 127.8 kB | Without provenance | Details for blog_coeur-0.0.19.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| blog_coeur-0.0.19-py3-none-any.whl | Python 3 | none | any | Details for blog_coeur-0.0.19-py3-none-any.whl |
Total release size: 260.9 kB
Release files / blog_coeur-0.0.19.tar.gz
| Download URL | blog_coeur-0.0.19.tar.gz |
|---|---|
| Size | 127.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77fe9f77bc17f24b7bd8ea69848c16fa81f93747631501d95a5c77849313fe86
|
|
BLAKE2b-256 checksum How to use checksums |
11d3b803bd8a582fa8fadf94538e01d798cc836cb37e3699ac6958edebe32144
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.10.12 Linux/6.14.0-1017-azure
|
Release files / blog_coeur-0.0.19-py3-none-any.whl
| Download URL | blog_coeur-0.0.19-py3-none-any.whl |
|---|---|
| Size | 133.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7cbe280c652275435e4ca6ebd1c04cc5e5f1e689c69f8a9faff2226306a89d54
|
|
BLAKE2b-256 checksum How to use checksums |
f015ef6f0c3e7fe088f2950ef4c87d77b678f3ee52be507ae537f27b3b83c76d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.10.12 Linux/6.14.0-1017-azure
|
Security for blog-coeur 0.0.19
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.