Skip to main content

Markdown to blog generator

Project description

Genopen

Genopen Logo

Genopen is a Python application that allows you to create blogs easily and quickly from content written in Markdown. Whether you are a writer, a developer, or just someone who wants to share their thoughts online, Genopen provides an intuitive command-line interface to easily generate blogs ready to be published.

Table of Contents

Features

  • Project Creation: Generate a new empty project.
  • Markdown Writing: Add posts using Markdown syntax, which will be automatically converted to HTML.
  • Customizable Themes: Use the default theme or create your own to customize the appearance of your blog.
  • Automatic Generation: Convert all your posts into a complete static website.
  • Sitemap and RSS: Automatically generate a sitemap and an RSS feed for your blog.

Installation

Make sure you have Python installed on your machine. Then, clone the repository and install the dependencies:

# Clone the repository
$ git clone https://github.com/your-username/genopen.git

# Navigate to the project directory
$ cd genopen

# Install the dependencies
$ pip install -r requirements.txt

# Install the application locally
$ pip install .

Usage

Genopen is used via a command-line interface (CLI). Here are the main commands:

Creating a Project

To create a new blog project:

$ genopen create <project_name>

This command creates a new directory containing the necessary structure to start working on your blog.

Adding Posts

Once the project is created, you can add new posts:

$ cd <project_name>
$ genopen add "Title of Your Post"

This command creates a pre-filled Markdown file with the title and necessary metadata.

Generating the Blog

To generate the HTML pages for your blog:

$ genopen build

The generated blog will be placed in a directory named web/. This directory will contain all the pages and resources ready to be deployed on a server.

Project Structure

Here is an overview of the project structure:

<project_name>/
  |-- content/
  |    |-- posts/               # Contains the blog posts in Markdown
  |    |-- assets/              # Contains images and other resources for the posts
  |
  |-- themes/                   # Contains themes to customize your blog
  |    |-- default/             # Default theme
  |
  |-- genopen.config            # Project configuration file
  |-- web/                      # Generated folder containing the final blog

Themes

The themes/ folder contains HTML, CSS, and other resources needed to customize the appearance of your blog. By default, Genopen includes a simple theme, but you can create and use your own themes.

Creating a New Theme

To create a new theme, add a folder under themes/ and include the HTML files (e.g., index.html, post.html) as well as the CSS and other necessary resources. Update the configuration (genopen.config) to point to the new theme.

Configuration

The genopen.config file allows you to configure your blog.

  • Mandatory Variables: The following three variables are required for the genopen build command:

    • theme: Specifies the theme to be used.
    • date_format: Defines the date format.
    • locale: Sets the language and local format.
  • Theme-Specific Variables: Other variables (e.g., blog_name, domain) are optional and depend on the theme being used. You can define them in the configuration file if your theme requires them.

  • Environment Variables: Sensitive data (e.g., API keys) can be configured using environment variables with a defined prefix (environment_prefix). This allows secrets to be securely managed.

License

This project is licensed under the MIT License. You are free to use, modify, and distribute it as you wish.

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

genopen-1.1.0.tar.gz (337.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

genopen-1.1.0-py3-none-any.whl (336.6 kB view details)

Uploaded Python 3

File details

Details for the file genopen-1.1.0.tar.gz.

File metadata

  • Download URL: genopen-1.1.0.tar.gz
  • Upload date:
  • Size: 337.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for genopen-1.1.0.tar.gz
Algorithm Hash digest
SHA256 fa7e9faf49b6def709d5f9403817af37d3c481d548fd9bacfcebe22c5179f603
MD5 866080b3966171a8fa4f30eb28220949
BLAKE2b-256 d73034ad2e17b61204d2fb0763d5d5097dd96776ea4c9813ba8e23cc6217fe50

See more details on using hashes here.

Provenance

The following attestation bundles were made for genopen-1.1.0.tar.gz:

Publisher: python-publish.yml on MathieuBourgois/genopen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genopen-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: genopen-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 336.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for genopen-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8628afc071faf758e24d4c5dbf7260284d3a161c33bc315b0c52113270bc295
MD5 76f6701cce2c1c48b62b33136c6cc6fa
BLAKE2b-256 4c6cf8df76e55e08c1305bf7a05a68097c58b9ff279be5070e84b7fc1374e42a

See more details on using hashes here.

Provenance

The following attestation bundles were made for genopen-1.1.0-py3-none-any.whl:

Publisher: python-publish.yml on MathieuBourgois/genopen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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