feat: Add basic blog functionality#1
Conversation
FebilAravindan
commented
Jun 28, 2025
- Created a 'blog' directory for markdown posts.
- Added a sample blog post 'my-first-post.md'.
- Created an HTML template 'blog-post-template.html' for styling posts.
- Created 'blog.html' to list blog posts.
- Added a Python script 'convert_md_to_html.py' to convert markdown posts to HTML using the template.
- Installed 'markdown' library.
- Generated 'blog/my-first-post.html' from the markdown file.
- Updated 'index.html' with a navigation link to the blog page.
- Verified all links and content display as expected.
- Created a 'blog' directory for markdown posts. - Added a sample blog post 'my-first-post.md'. - Created an HTML template 'blog-post-template.html' for styling posts. - Created 'blog.html' to list blog posts. - Added a Python script 'convert_md_to_html.py' to convert markdown posts to HTML using the template. - Installed 'markdown' library. - Generated 'blog/my-first-post.html' from the markdown file. - Updated 'index.html' with a navigation link to the blog page. - Verified all links and content display as expected.
There was a problem hiding this comment.
Pull Request Overview
This PR adds basic blog functionality by integrating markdown-based posts with HTML templates and updating navigation.
- Adds a blog directory with sample markdown and HTML files.
- Implements a Python script to convert markdown files into styled HTML using a new template.
- Introduces a new blog listing page and updates main navigation accordingly.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| index.html | Updates navigation to include a link to the blog page. |
| convert_md_to_html.py | Introduces markdown-to-HTML conversion with metadata handling. |
| blog/my-first-post.md | Provides a sample markdown blog post with metadata. |
| blog/my-first-post.html | Generated HTML page from the markdown post. |
| blog.html | Creates a blog listing page for posts. |
| blog-post-template.html | Adds an HTML template for styling individual blog posts. |
| </div> | ||
| <div class="nav_link"> | ||
| blog | ||
| <a href="blog.html" style="color: inherit; text-decoration: none;">blog</a> |
There was a problem hiding this comment.
Consider moving inline styles to a CSS class to improve maintainability and consistency across the project.
| if not os.path.exists(output_dir): | ||
| os.makedirs(output_dir) |
There was a problem hiding this comment.
Consider using os.makedirs(output_dir, exist_ok=True) to simplify directory creation and handle concurrent directory creation safely.
| if not os.path.exists(output_dir): | |
| os.makedirs(output_dir) | |
| os.makedirs(output_dir, exist_ok=True) | |
| if not os.path.exists(output_dir): # Log only if the directory was just created |
| <div class="container"> | ||
| <p class="post-meta">Published on: 2023-10-27 by Your Name</p> | ||
| <div class="post-content"> | ||
| <h1>My First Post</h1> |
There was a problem hiding this comment.
[nitpick] The title appears both in the header and within the post content, which might lead to duplication; consider removing one instance to streamline the presentation.
| <h1>My First Post</h1> |