diff --git a/jekyll/Gemfile b/jekyll/Gemfile new file mode 100644 index 0000000..e5de555 --- /dev/null +++ b/jekyll/Gemfile @@ -0,0 +1,18 @@ +source "https://rubygems.org" + +gem "jekyll", "~> 4.3" +gem "minima", "~> 2.5" + +# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem +# and associated library. +platforms :mingw, :x64_mingw, :mswin, :jruby do + gem "tzinfo", ">= 1", "< 3" + gem "tzinfo-data" +end + +# Performance-booster for watching directories on Windows +gem "wdm", "~> 0.1", :platforms => [:mingw, :x64_mingw, :mswin] + +# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem +# do not have a Java counterpart. +gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] \ No newline at end of file diff --git a/jekyll/README.md b/jekyll/README.md new file mode 100644 index 0000000..3f5ccc4 --- /dev/null +++ b/jekyll/README.md @@ -0,0 +1,88 @@ +# Jekyll Buttondown Example + +A static website built with Jekyll featuring an integrated Buttondown newsletter subscription form. + +## Getting Started + +### Prerequisites + +- Ruby 2.5 or higher +- RubyGems +- Bundler (`gem install bundler`) + +### Setup + +1. Clone this repository +2. Navigate to the Jekyll directory: + ```bash + cd jekyll + ``` + +3. Install dependencies: + ```bash + bundle install + ``` + +4. Update `_config.yml` and replace `{username}` with your Buttondown username: + ```yaml + buttondown_username: "your-actual-username" + ``` + +5. Run the development server: + ```bash + bundle exec jekyll serve + ``` + +6. Open http://localhost:4000 in your browser + +## Features + +- **Static Site Generation**: Jekyll converts Markdown files into a complete website +- **Newsletter Integration**: Buttondown subscription form embedded in every page +- **Blog Support**: Full blogging capabilities with posts, categories, and permalinks +- **Responsive Design**: Mobile-friendly layout +- **Client-side Form Handling**: JavaScript-powered form submission with status messages + +## Project Structure + +``` +jekyll/ +├── _config.yml # Jekyll configuration +├── _layouts/ +│ └── default.html # Main layout with newsletter form +├── _posts/ # Blog posts +│ └── 2025-07-22-welcome-to-jekyll.md +├── index.md # Homepage +├── about.md # About page +├── Gemfile # Ruby dependencies +└── README.md # This file +``` + +## Customization + +### Styling +Edit the ` + + + + +
+ {{ content }} +
+ +
+

Subscribe to our Newsletter

+

Get the latest updates delivered to your inbox.

+
+ + + +
+
+ + + + + + \ No newline at end of file diff --git a/jekyll/_posts/2025-07-22-welcome-to-jekyll.md b/jekyll/_posts/2025-07-22-welcome-to-jekyll.md new file mode 100644 index 0000000..4f3815b --- /dev/null +++ b/jekyll/_posts/2025-07-22-welcome-to-jekyll.md @@ -0,0 +1,32 @@ +--- +layout: default +title: "Welcome to Jekyll with Buttondown" +date: 2025-07-22 10:00:00 -0000 +categories: jekyll update +--- + +Welcome to our Jekyll site with Buttondown integration! This is a sample blog post to demonstrate how Jekyll processes Markdown files into blog posts. + +## Why Jekyll + Buttondown? + +Combining Jekyll with Buttondown gives you: + +1. **Static Site Benefits**: Fast, secure, and easy to host +2. **Newsletter Integration**: Grow your audience with email subscriptions +3. **Markdown Simplicity**: Write content in plain text +4. **Full Control**: Customize every aspect of your site + +## Getting Started + +To use this example: + +1. Clone the repository +2. Update `_config.yml` with your Buttondown username +3. Run `bundle exec jekyll serve` +4. Visit `http://localhost:4000` + +## Adding Content + +Create new posts by adding Markdown files to the `_posts` directory. Follow the naming convention: `YYYY-MM-DD-title.md`. + +Happy blogging! \ No newline at end of file diff --git a/jekyll/about.md b/jekyll/about.md new file mode 100644 index 0000000..60ebb9a --- /dev/null +++ b/jekyll/about.md @@ -0,0 +1,34 @@ +--- +layout: default +title: About +permalink: /about/ +--- + +# About This Example + +This Jekyll site demonstrates how to integrate Buttondown email subscriptions into a static website. + +## What is Jekyll? + +Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. It takes text written in your favorite markup language and uses layouts to create a static website. + +## What is Buttondown? + +Buttondown is a small, elegant tool for producing newsletters. It's simple, reliable, and privacy-focused. + +## How It Works + +1. Jekyll generates static HTML pages from your Markdown content +2. The newsletter form is embedded in the layout template +3. Form submissions are handled client-side with JavaScript +4. Subscriptions are processed through Buttondown's API + +## Customization + +You can customize this example by: +- Modifying the layout in `_layouts/default.html` +- Updating styles in the layout file +- Changing the site configuration in `_config.yml` +- Adding your own posts in the `_posts` directory + +Remember to replace `{username}` with your actual Buttondown username in the configuration file! \ No newline at end of file diff --git a/jekyll/index.md b/jekyll/index.md new file mode 100644 index 0000000..75068f0 --- /dev/null +++ b/jekyll/index.md @@ -0,0 +1,30 @@ +--- +layout: default +title: Home +--- + +# Welcome to our Newsletter Example + +This is a simple Jekyll site demonstrating how to integrate Buttondown newsletter subscriptions into your Jekyll website. + +## Features + +- Static site generation with Jekyll +- Integrated newsletter subscription form +- Client-side form handling with vanilla JavaScript +- Responsive design +- No additional dependencies required + +## Recent Posts + +{% for post in site.posts %} +
+

{{ post.title }}

+ +

{{ post.excerpt }}

+
+{% endfor %} + +## Getting Started + +Check out the [about page]({{ "/about/" | relative_url }}) to learn more about this example. \ No newline at end of file