A real-time Markdown blog editor built with Streamlit, featuring frontmatter generation and image management.
- Real-time Markdown Editor: Split-view interface with live preview
- YAML Frontmatter Management: Easy configuration of blog post metadata
- Image Management: Quick insertion of cover and article images with proper HTML structure
- Export Functionality: Download posts as Markdown files with automatically generated filenames
- Responsive Interface: Built with Streamlit for a smooth user experience
https://markdown-blog-editor.streamlit.app
- Clone the repository:
git clone https://github.com/yourusername/markdown-blog-editor.git
cd markdown-blog-editor
- Create a virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Start the application:
streamlit run app.py
-
Open your browser and navigate to
http://localhost:8501
-
Use the editor:
- Configure frontmatter in the sidebar
- Write your content in the Markdown editor
- See real-time preview on the right
- Use quick formatting buttons for common elements
- Export your post when ready
The editor generates frontmatter in the following format:
---
title: "Your Post Title"
excerpt: "A brief description of your post"
publishDate: '2025-01-09'
tags:
- Tag1
- Tag2
seo:
image:
src: '/your-image.webp'
alt: "Image description"
---
<figure>
<img id="cover-img" src="/path-to-image.jpg" alt="Image description">
<figcaption>Photo by <a href="#">Author</a> on <a href="#">Source</a></figcaption>
</figure>
<figure>
<img id="article-img" src="/path-to-image.jpg" alt="Image description">
<figcaption>"Image caption" \ Source: <a href="#" target="_blank">Source Name</a></figcaption>
</figure>
The application is structured as follows:
app.py
: Main application file containing the Streamlit interfacerequirements.txt
: Python dependenciesREADME.md
: Documentation
- Fork the repository
- Create your feature branch:
git checkout -b feature/new-feature
- Commit your changes:
git commit -am 'Add new feature'
- Push to the branch:
git push origin feature/new-feature
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Streamlit
- Uses Python-Markdown
- YAML handling by PyYAML
- HTML processing with Beautiful Soup