Skip to content

Commit 636fbd2

Browse files
morisyclaude
andcommitted
Add enhanced markdown support and quality of life improvements
- Add Jekyll plugins: SEO tag, emoji, mentions, gists, redirects - Configure enhanced markdown with GFM, footnotes, smart quotes - Add reading time estimation to posts - Improve syntax highlighting with line numbers - Add SEO tag for better meta tag generation - Create blog documentation with markdown features guide 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 359ecc8 commit 636fbd2

File tree

5 files changed

+119
-2
lines changed

5 files changed

+119
-2
lines changed

BLOG_README.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Instant History Blog
2+
3+
This is Michael Morisy's personal blog built with Jekyll and hosted on GitHub Pages.
4+
5+
## Quick Start
6+
7+
### Writing a New Post
8+
9+
1. Create a new file in the `_posts` folder
10+
2. Name it using the format: `YYYY-MM-DD-post-title.md`
11+
3. Add the following front matter at the top:
12+
13+
```yaml
14+
---
15+
layout: post
16+
title: "Your Post Title"
17+
subtitle: "Optional subtitle"
18+
date: 2024-01-15 10:00:00
19+
tags: [tag1, tag2]
20+
---
21+
```
22+
23+
4. Write your content using Markdown
24+
25+
### Markdown Features
26+
27+
This blog supports enhanced markdown features:
28+
29+
- **GitHub Flavored Markdown**: Tables, strikethrough, task lists
30+
- **Code syntax highlighting**: Use triple backticks with language identifier
31+
- **Emojis**: Type `:emoji_name:` (e.g., `:smile:`)
32+
- **@mentions**: Link to GitHub users with `@username`
33+
- **Footnotes**: Use `[^1]` for footnote markers
34+
35+
Example:
36+
```markdown
37+
This is some text with a footnote[^1].
38+
39+
[^1]: This is the footnote content.
40+
```
41+
42+
### Local Development
43+
44+
1. Install Ruby and Bundler
45+
2. Run `bundle install` to install dependencies
46+
3. Run `bundle exec jekyll serve` to start local server
47+
4. Visit `http://localhost:4000`
48+
49+
### Deployment
50+
51+
The site automatically deploys to GitHub Pages when you push to the main branch.
52+
53+
## Features
54+
55+
- **SEO Optimization**: Automatic meta tags and Open Graph data
56+
- **Reading Time**: Shows estimated reading time for each post
57+
- **Sitemap**: Automatically generated at `/sitemap.xml`
58+
- **RSS Feed**: Available at `/feed.xml`
59+
- **Syntax Highlighting**: Beautiful code blocks with line numbers
60+
- **Social Sharing**: Twitter and Facebook share buttons
61+
- **Comments**: Configured for Staticman (requires setup)
62+
63+
## Configuration
64+
65+
Main settings are in `_config.yml`:
66+
- Site title and description
67+
- Author information
68+
- Social media links
69+
- Google Analytics
70+
- Comment system settings
71+
72+
## Tips
73+
74+
- Use `<!--more-->` in posts to set excerpt break point
75+
- Add `image: /path/to/image.jpg` in front matter for social media previews
76+
- Use `redirect_from: /old-url/` to redirect old URLs
77+
- Posts with future dates won't be published until that date
78+
79+
## Troubleshooting
80+
81+
If the site doesn't update after pushing:
82+
1. Check GitHub Actions tab for build errors
83+
2. Ensure post filenames are correctly formatted
84+
3. Verify front matter YAML is valid
85+
4. Check that post dates aren't in the future

_config.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ title: Instant History
66
# Short description of your site
77
description: Michael Morisy's long-running (with many long rests) blog on media and technology.
88

9+
# Your name to show in the footer
10+
author: Michael Morisy
11+
912
# --- Local development options ---
1013
# If your website is hosted locally rather than on GitHub, then you need to uncomment the next two parameters to set the url and baseurl
1114
# *** If you're not sure what this mean, then leave this section as it is. Only modify the url and baseurl if you know what you're doing!***
@@ -172,6 +175,21 @@ paginate: 5
172175

173176
kramdown:
174177
input: GFM
178+
hard_wrap: false
179+
auto_ids: true
180+
footnote_nr: 1
181+
entity_output: as_char
182+
toc_levels: 1..6
183+
smart_quotes: lsquo,rsquo,ldquo,rdquo
184+
enable_coderay: false
185+
syntax_highlighter: rouge
186+
syntax_highlighter_opts:
187+
css_class: 'highlight'
188+
span:
189+
line_numbers: false
190+
block:
191+
line_numbers: true
192+
start_line: 1
175193

176194
# Default YAML values (more information on Jekyll's site)
177195
defaults:
@@ -259,6 +277,12 @@ prose:
259277
plugins:
260278
- jekyll-paginate
261279
- jekyll-sitemap
280+
- jekyll-feed
281+
- jekyll-seo-tag
282+
- jekyll-gist
283+
- jekyll-mentions
284+
- jekyll-redirect-from
285+
- jemoji
262286

263287
# Beautiful Jekyll / Dean Attali
264288
# 2fc73a3a967e97599c9763d05e564189

_includes/head.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
<meta name="description" content="{{ page.subtitle }}">
1212
{% endif %}
1313

14+
{% seo %}
15+
1416
<link rel="alternate" type="application/rss+xml" title="{{ site.title }} {{ site.title-separator }} {{ site.description }}" href="{{ '/feed.xml' | absolute_url }}" />
1517

1618
{% include gtag.html %}

_includes/header.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ <h2 class="{{ include.type }}-subheading">{{ page.subtitle }}</h2>
3636
{% endif %}
3737

3838
{% if include.type == "post" %}
39-
<span class="post-meta">Posted on {{ page.date | date: site.date_format }}</span>
39+
<span class="post-meta">Posted on {{ page.date | date: site.date_format }} · {% include reading-time.html content=page.content %}</span>
4040
{% endif %}
4141
</div>
4242
</div>
@@ -61,7 +61,7 @@ <h2 class="{{ include.type }}-subheading">{{ page.subtitle }}</h2>
6161
{% endif %}
6262

6363
{% if include.type == "post" %}
64-
<span class="post-meta">Posted on {{ page.date | date: site.date_format }}</span>
64+
<span class="post-meta">Posted on {{ page.date | date: site.date_format }} · {% include reading-time.html content=page.content %}</span>
6565
{% endif %}
6666
</div>
6767
</div>

_includes/reading-time.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{% assign words = content | number_of_words %}
2+
{% if words < 360 %}
3+
<span class="reading-time">1 min read</span>
4+
{% else %}
5+
<span class="reading-time">{{ words | divided_by: 180 }} min read</span>
6+
{% endif %}

0 commit comments

Comments
 (0)