Skip to main content

Django static Markdown blog

The purpose of this application is to provide an Internet blog based on local files. Those files can be Markdown formatted to add some style to your notes. This app has to be integrated into an existing django website.

Quick start

  1. Add "django_static_markdown_blog" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [  
    ...  
    'django_static_markdown_blog',
]
  1. In the settings file, add two variables
BLOG_FOLDER = '/tmp/markdown-files/'
BLOG_INDEX_FILE = 'main.md'
  1. Include the django_static_markdown_blog URLconf in your project urls.py like this:
path('blog/', include(('django_static_markdown_blog.urls', 'blog'))),
  1. It is useless to migrate database because it is based on local files

  2. Start the development server and visit http://127.0.0.1:8000/blog to check if everything is ok.

How to use

To use the software, you must have defined the variable BLOG_FOLDER which indicates the name of the directory where the Markdown files are located, as well as the variable BLOG_INDEX_FILE which corresponds to the main file of each directory (it is possible to create an unlimited tree structure).

Write your first page

Your first file is the one at the root of the BLOG_FOLDER directory and must be named as the BLOG_INDEX_FILE variable. This is the entry point of your blog, the page seen by your visitors when they arrive on your blog.

To write a Markdown file, the principle is very simple. It is divided into two parts separated by at least one empty line. The first part contains the metadata of the file which are filled a little lower. The second part is the content of your page, formattable with Markdown.

There is an exemple of a home page:

title: Welcome on my blog

Hello everyone, and welcome to my **blog**. 
Feel free to visit my project page on [PyPI](https://pypi.org/project/django-static-markdown-blog/) or directly on [GitLab](https://gitlab.com/aloha68/django-static-markdown-blog/).

Enjoy your visit!

Supported metadata

There is the full list of the supported metadata:

  • title: set the title of your page
  • date: set a custom date for your page, else we will use the datetime of the file
  • groups: define a group list that can access the page. It means that unauthorized people will not see the page
  • icons: define an icon that will be display in the article list for a page

TODO

  • Remove all BeautifulSoup4 components
  • Remove all libaloha components

Metadata

Release files for django-static-markdown-blog 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-static-markdown-blog 0.1.2
File Size Uploaded Provenance
django-static-markdown-blog-0.1.2.tar.gz 102.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-static-markdown-blog 0.1.2
File Interpreter ABI Platform
django_static_markdown_blog-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 256.0 kB

Release files / django-static-markdown-blog-0.1.2.tar.gz

Download URL django-static-markdown-blog-0.1.2.tar.gz
Size 102.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d9683921b697fa51a0a7a11c3b5ce961901c1b06c1ee3f556cf877610747571e
BLAKE2b-256 checksum
How to use checksums
dde4eca0f71fb76e214d0228eb1e0d42f2b4b71e6004d301a913704613e3f885
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.17 CPython/3.7.3 Linux/4.19.66-v7l+

Release files / django_static_markdown_blog-0.1.2-py3-none-any.whl

Download URL django_static_markdown_blog-0.1.2-py3-none-any.whl
Size 153.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
116be5b12ba22caa66a1081efc1db2fc45c8feb444ea7eb01b68a3039cab0687
BLAKE2b-256 checksum
How to use checksums
e4d6cffd525e7d1e8c253ee0c6a9fdbd570c401e0136831c889e93c5c5646f1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.17 CPython/3.7.3 Linux/4.19.66-v7l+

Security for django-static-markdown-blog 0.1.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page