~sircmpwn/public-inbox

ddjekyll: Add support for Jekyll theme installation via Gem v1 PROPOSED

~fzakaria
~fzakaria: 1
 Bundled Drew's theme as a gem

 22 files changed, 321 insertions(+), 3 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/public-inbox/patches/10114/mbox | git am -3
Learn more about email & git

[PATCH ddjekyll 1/1] Bundled Drew's theme as a gem Export this patch

~fzakaria
From: Farid Zakaria <fmzakari@google.com>

Add the necessary changes for Drew's theme to allow
it to be installed as a theme.
---
 .ruby-version                                 |   1 +
 Gemfile                                       |  16 ++
 Gemfile.lock                                  | 252 ++++++++++++++++++
 README.md                                     |  31 ++-
 _layouts/base.html                            |   2 +-
 index.html => _layouts/index.html             |   0
 {css => assets/css}/base.scss                 |   0
 {css => assets/css}/toolchain.scss            |   0
 {fonts => assets/fonts}/FontAwesome.otf       | Bin
 {fonts => assets/fonts}/Montserrat-Bold.ttf   | Bin
 .../fonts}/Montserrat-Regular.ttf             | Bin
 {fonts => assets/fonts}/OFL.txt               |   0
 .../fonts}/fontawesome-webfont.eot            | Bin
 .../fonts}/fontawesome-webfont.svg            |   0
 .../fonts}/fontawesome-webfont.ttf            | Bin
 .../fonts}/fontawesome-webfont.woff           | Bin
 .../fonts}/fontawesome-webfont.woff2          | Bin
 .../fonts}/glyphicons-halflings-regular.eot   | Bin
 .../fonts}/glyphicons-halflings-regular.svg   |   0
 .../fonts}/glyphicons-halflings-regular.ttf   | Bin
 .../fonts}/glyphicons-halflings-regular.woff  | Bin
 jekyll-theme-ddevault.gemspec                 |  22 ++
 22 files changed, 321 insertions(+), 3 deletions(-)
 create mode 100644 .ruby-version
 create mode 100644 Gemfile
 create mode 100644 Gemfile.lock
 rename index.html => _layouts/index.html (100%)
 rename {css => assets/css}/base.scss (100%)
 rename {css => assets/css}/toolchain.scss (100%)
 rename {fonts => assets/fonts}/FontAwesome.otf (100%)
 rename {fonts => assets/fonts}/Montserrat-Bold.ttf (100%)
 rename {fonts => assets/fonts}/Montserrat-Regular.ttf (100%)
 rename {fonts => assets/fonts}/OFL.txt (100%)
 rename {fonts => assets/fonts}/fontawesome-webfont.eot (100%)
 rename {fonts => assets/fonts}/fontawesome-webfont.svg (100%)
 rename {fonts => assets/fonts}/fontawesome-webfont.ttf (100%)
 rename {fonts => assets/fonts}/fontawesome-webfont.woff (100%)
 rename {fonts => assets/fonts}/fontawesome-webfont.woff2 (100%)
 rename {fonts => assets/fonts}/glyphicons-halflings-regular.eot (100%)
 rename {fonts => assets/fonts}/glyphicons-halflings-regular.svg (100%)
 rename {fonts => assets/fonts}/glyphicons-halflings-regular.ttf (100%)
 rename {fonts => assets/fonts}/glyphicons-halflings-regular.woff (100%)
 create mode 100644 jekyll-theme-ddevault.gemspec

diff --git a/.ruby-version b/.ruby-version
new file mode 100644
index 0000000..e70b452
--- /dev/null
+++ b/.ruby-version
@@ -0,0 +1 @@
2.6.0
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..1c88816
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,16 @@
# frozen_string_literal: true

source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

gem "jekyll"

# Jekyll will automatically activate any plugins
# listed in the :jekyll_plugins group.
group :jekyll_plugins do
  gem "github-pages"
  gem "jekyll-paginate"
  gem "jekyll-seo-tag"
  gem "jekyll-feed"
end
\ No newline at end of file
diff --git a/Gemfile.lock b/Gemfile.lock
new file mode 100644
index 0000000..0f2d769
--- /dev/null
+++ b/Gemfile.lock
@@ -0,0 +1,252 @@
GEM
  remote: https://rubygems.org/
  specs:
    activesupport (6.0.2.2)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 0.7, < 2)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
      zeitwerk (~> 2.2)
    addressable (2.7.0)
      public_suffix (>= 2.0.2, < 5.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.11.1)
    colorator (1.1.0)
    commonmarker (0.17.13)
      ruby-enum (~> 0.5)
    concurrent-ruby (1.1.6)
    dnsruby (1.61.3)
      addressable (~> 2.5)
    em-websocket (0.5.1)
      eventmachine (>= 0.12.9)
      http_parser.rb (~> 0.6.0)
    ethon (0.12.0)
      ffi (>= 1.3.0)
    eventmachine (1.2.7)
    execjs (2.7.0)
    faraday (1.0.1)
      multipart-post (>= 1.2, < 3)
    ffi (1.12.2)
    forwardable-extended (2.6.0)
    gemoji (3.0.1)
    github-pages (204)
      github-pages-health-check (= 1.16.1)
      jekyll (= 3.8.5)
      jekyll-avatar (= 0.7.0)
      jekyll-coffeescript (= 1.1.1)
      jekyll-commonmark-ghpages (= 0.1.6)
      jekyll-default-layout (= 0.1.4)
      jekyll-feed (= 0.13.0)
      jekyll-gist (= 1.5.0)
      jekyll-github-metadata (= 2.13.0)
      jekyll-mentions (= 1.5.1)
      jekyll-optional-front-matter (= 0.3.2)
      jekyll-paginate (= 1.1.0)
      jekyll-readme-index (= 0.3.0)
      jekyll-redirect-from (= 0.15.0)
      jekyll-relative-links (= 0.6.1)
      jekyll-remote-theme (= 0.4.1)
      jekyll-sass-converter (= 1.5.2)
      jekyll-seo-tag (= 2.6.1)
      jekyll-sitemap (= 1.4.0)
      jekyll-swiss (= 1.0.0)
      jekyll-theme-architect (= 0.1.1)
      jekyll-theme-cayman (= 0.1.1)
      jekyll-theme-dinky (= 0.1.1)
      jekyll-theme-hacker (= 0.1.1)
      jekyll-theme-leap-day (= 0.1.1)
      jekyll-theme-merlot (= 0.1.1)
      jekyll-theme-midnight (= 0.1.1)
      jekyll-theme-minimal (= 0.1.1)
      jekyll-theme-modernist (= 0.1.1)
      jekyll-theme-primer (= 0.5.4)
      jekyll-theme-slate (= 0.1.1)
      jekyll-theme-tactile (= 0.1.1)
      jekyll-theme-time-machine (= 0.1.1)
      jekyll-titles-from-headings (= 0.5.3)
      jemoji (= 0.11.1)
      kramdown (= 1.17.0)
      liquid (= 4.0.3)
      mercenary (~> 0.3)
      minima (= 2.5.1)
      nokogiri (>= 1.10.4, < 2.0)
      rouge (= 3.13.0)
      terminal-table (~> 1.4)
    github-pages-health-check (1.16.1)
      addressable (~> 2.3)
      dnsruby (~> 1.60)
      octokit (~> 4.0)
      public_suffix (~> 3.0)
      typhoeus (~> 1.3)
    html-pipeline (2.12.3)
      activesupport (>= 2)
      nokogiri (>= 1.4)
    http_parser.rb (0.6.0)
    i18n (0.9.5)
      concurrent-ruby (~> 1.0)
    jekyll (3.8.5)
      addressable (~> 2.4)
      colorator (~> 1.0)
      em-websocket (~> 0.5)
      i18n (~> 0.7)
      jekyll-sass-converter (~> 1.0)
      jekyll-watch (~> 2.0)
      kramdown (~> 1.14)
      liquid (~> 4.0)
      mercenary (~> 0.3.3)
      pathutil (~> 0.9)
      rouge (>= 1.7, < 4)
      safe_yaml (~> 1.0)
    jekyll-avatar (0.7.0)
      jekyll (>= 3.0, < 5.0)
    jekyll-coffeescript (1.1.1)
      coffee-script (~> 2.2)
      coffee-script-source (~> 1.11.1)
    jekyll-commonmark (1.3.1)
      commonmarker (~> 0.14)
      jekyll (>= 3.7, < 5.0)
    jekyll-commonmark-ghpages (0.1.6)
      commonmarker (~> 0.17.6)
      jekyll-commonmark (~> 1.2)
      rouge (>= 2.0, < 4.0)
    jekyll-default-layout (0.1.4)
      jekyll (~> 3.0)
    jekyll-feed (0.13.0)
      jekyll (>= 3.7, < 5.0)
    jekyll-gist (1.5.0)
      octokit (~> 4.2)
    jekyll-github-metadata (2.13.0)
      jekyll (>= 3.4, < 5.0)
      octokit (~> 4.0, != 4.4.0)
    jekyll-mentions (1.5.1)
      html-pipeline (~> 2.3)
      jekyll (>= 3.7, < 5.0)
    jekyll-optional-front-matter (0.3.2)
      jekyll (>= 3.0, < 5.0)
    jekyll-paginate (1.1.0)
    jekyll-readme-index (0.3.0)
      jekyll (>= 3.0, < 5.0)
    jekyll-redirect-from (0.15.0)
      jekyll (>= 3.3, < 5.0)
    jekyll-relative-links (0.6.1)
      jekyll (>= 3.3, < 5.0)
    jekyll-remote-theme (0.4.1)
      addressable (~> 2.0)
      jekyll (>= 3.5, < 5.0)
      rubyzip (>= 1.3.0)
    jekyll-sass-converter (1.5.2)
      sass (~> 3.4)
    jekyll-seo-tag (2.6.1)
      jekyll (>= 3.3, < 5.0)
    jekyll-sitemap (1.4.0)
      jekyll (>= 3.7, < 5.0)
    jekyll-swiss (1.0.0)
    jekyll-theme-architect (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-cayman (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-dinky (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-hacker (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-leap-day (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-merlot (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-midnight (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-minimal (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-modernist (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-primer (0.5.4)
      jekyll (> 3.5, < 5.0)
      jekyll-github-metadata (~> 2.9)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-slate (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-tactile (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-time-machine (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-titles-from-headings (0.5.3)
      jekyll (>= 3.3, < 5.0)
    jekyll-watch (2.2.1)
      listen (~> 3.0)
    jemoji (0.11.1)
      gemoji (~> 3.0)
      html-pipeline (~> 2.2)
      jekyll (>= 3.0, < 5.0)
    kramdown (1.17.0)
    liquid (4.0.3)
    listen (3.2.1)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    mercenary (0.3.6)
    mini_portile2 (2.4.0)
    minima (2.5.1)
      jekyll (>= 3.5, < 5.0)
      jekyll-feed (~> 0.9)
      jekyll-seo-tag (~> 2.1)
    minitest (5.14.0)
    multipart-post (2.1.1)
    nokogiri (1.10.9)
      mini_portile2 (~> 2.4.0)
    octokit (4.18.0)
      faraday (>= 0.9)
      sawyer (~> 0.8.0, >= 0.5.3)
    pathutil (0.16.2)
      forwardable-extended (~> 2.6)
    public_suffix (3.1.1)
    rb-fsevent (0.10.3)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    rouge (3.13.0)
    ruby-enum (0.8.0)
      i18n
    rubyzip (2.3.0)
    safe_yaml (1.0.5)
    sass (3.7.4)
      sass-listen (~> 4.0.0)
    sass-listen (4.0.0)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
    sawyer (0.8.2)
      addressable (>= 2.3.5)
      faraday (> 0.8, < 2.0)
    terminal-table (1.8.0)
      unicode-display_width (~> 1.1, >= 1.1.1)
    thread_safe (0.3.6)
    typhoeus (1.3.1)
      ethon (>= 0.9.0)
    tzinfo (1.2.6)
      thread_safe (~> 0.1)
    unicode-display_width (1.7.0)
    zeitwerk (2.3.0)

PLATFORMS
  ruby

DEPENDENCIES
  github-pages
  jekyll
  jekyll-feed
  jekyll-paginate
  jekyll-seo-tag

BUNDLED WITH
   2.1.4
diff --git a/README.md b/README.md
index e657c37..f74cc05 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,32 @@
# ddjekyll
# jekyll-theme-ddevault

This is [my blog](https://drewdevault.com)'s template made available for general
use.

## Local Usage
## Installation

Add this line to your Jekyll site's `Gemfile`:

```ruby
# Jekyll will automatically activate any plugins
# listed in the :jekyll_plugins group.
group :jekyll_plugins do
  # The following are plugins needed by the ddevault theme
  gem "jekyll-theme-ddevault", git: "https://git.sr.ht/~sircmpwn/ddjekyll"
  gem "jekyll-seo-tag"
  gem "jekyll-paginate"
end
```

And add this line to your Jekyll site's `_config.yml`:

```yaml
theme: jekyll-theme-ddevault
sass:
  style: compressed
```

## Local Development

You can run this like any other Jekyll site if you already have a setup you
like. Otherwise, you can use the provided Dockerfile:
@@ -14,3 +37,7 @@ docker run -p 4000:4000 -v $(pwd):/src --rm jekyll serve -H 0.0.0.0
```

You can then view your blog at http://localhost:4000.

The theme is setup just like a normal Jekyll site! Add pages, documents, data, etc. like normal to test your theme's contents.

When the theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` will be bundled.
\ No newline at end of file
diff --git a/_layouts/base.html b/_layouts/base.html
index 3d8956d..4bf86c2 100644
--- a/_layouts/base.html
+++ b/_layouts/base.html
@@ -5,7 +5,7 @@
        <meta name="viewport" content="width=device-width, initial-scale=1">
        {% seo %}
        {% feed_meta %}
        <link rel="stylesheet" type="text/css" href="/css/base.css">
        <link rel="stylesheet" type="text/css" href="/assets/css/base.css">
        <link rel="icon" type="image/png" href="/avatar.png">
    </head>
    <body>
diff --git a/index.html b/_layouts/index.html
similarity index 100%
rename from index.html
rename to _layouts/index.html
diff --git a/css/base.scss b/assets/css/base.scss
similarity index 100%
rename from css/base.scss
rename to assets/css/base.scss
diff --git a/css/toolchain.scss b/assets/css/toolchain.scss
similarity index 100%
rename from css/toolchain.scss
rename to assets/css/toolchain.scss
diff --git a/fonts/FontAwesome.otf b/assets/fonts/FontAwesome.otf
similarity index 100%
rename from fonts/FontAwesome.otf
rename to assets/fonts/FontAwesome.otf
diff --git a/fonts/Montserrat-Bold.ttf b/assets/fonts/Montserrat-Bold.ttf
similarity index 100%
rename from fonts/Montserrat-Bold.ttf
rename to assets/fonts/Montserrat-Bold.ttf
diff --git a/fonts/Montserrat-Regular.ttf b/assets/fonts/Montserrat-Regular.ttf
similarity index 100%
rename from fonts/Montserrat-Regular.ttf
rename to assets/fonts/Montserrat-Regular.ttf
diff --git a/fonts/OFL.txt b/assets/fonts/OFL.txt
similarity index 100%
rename from fonts/OFL.txt
rename to assets/fonts/OFL.txt
diff --git a/fonts/fontawesome-webfont.eot b/assets/fonts/fontawesome-webfont.eot
similarity index 100%
rename from fonts/fontawesome-webfont.eot
rename to assets/fonts/fontawesome-webfont.eot
diff --git a/fonts/fontawesome-webfont.svg b/assets/fonts/fontawesome-webfont.svg
similarity index 100%
rename from fonts/fontawesome-webfont.svg
rename to assets/fonts/fontawesome-webfont.svg
diff --git a/fonts/fontawesome-webfont.ttf b/assets/fonts/fontawesome-webfont.ttf
similarity index 100%
rename from fonts/fontawesome-webfont.ttf
rename to assets/fonts/fontawesome-webfont.ttf
diff --git a/fonts/fontawesome-webfont.woff b/assets/fonts/fontawesome-webfont.woff
similarity index 100%
rename from fonts/fontawesome-webfont.woff
rename to assets/fonts/fontawesome-webfont.woff
diff --git a/fonts/fontawesome-webfont.woff2 b/assets/fonts/fontawesome-webfont.woff2
similarity index 100%
rename from fonts/fontawesome-webfont.woff2
rename to assets/fonts/fontawesome-webfont.woff2
diff --git a/fonts/glyphicons-halflings-regular.eot b/assets/fonts/glyphicons-halflings-regular.eot
similarity index 100%
rename from fonts/glyphicons-halflings-regular.eot
rename to assets/fonts/glyphicons-halflings-regular.eot
diff --git a/fonts/glyphicons-halflings-regular.svg b/assets/fonts/glyphicons-halflings-regular.svg
similarity index 100%
rename from fonts/glyphicons-halflings-regular.svg
rename to assets/fonts/glyphicons-halflings-regular.svg
diff --git a/fonts/glyphicons-halflings-regular.ttf b/assets/fonts/glyphicons-halflings-regular.ttf
similarity index 100%
rename from fonts/glyphicons-halflings-regular.ttf
rename to assets/fonts/glyphicons-halflings-regular.ttf
diff --git a/fonts/glyphicons-halflings-regular.woff b/assets/fonts/glyphicons-halflings-regular.woff
similarity index 100%
rename from fonts/glyphicons-halflings-regular.woff
rename to assets/fonts/glyphicons-halflings-regular.woff
diff --git a/jekyll-theme-ddevault.gemspec b/jekyll-theme-ddevault.gemspec
new file mode 100644
index 0000000..f038562
--- /dev/null
+++ b/jekyll-theme-ddevault.gemspec
@@ -0,0 +1,22 @@
# frozen_string_literal: true

Gem::Specification.new do |spec|
  spec.name          = "jekyll-theme-ddevault"
  spec.version       = "0.1.0"
  spec.authors       = ["Drew Devault"]
  spec.email         = ["sir@cmpwn.com"]

  spec.summary       = "Drew Devault's template made available for general use."
  spec.homepage      = "https://git.sr.ht/~sircmpwn/ddjekyll"
  spec.license       = "CC-BY-1.0"

  spec.files         = `git ls-files -z`.split("\x0").select { |f| f.match(%r!^(index.html|assets|_layouts|_includes|_sass|css|fonts|archive|LICENSE|README)!i) }

  spec.add_runtime_dependency "jekyll", "~> 3.8"
  spec.add_runtime_dependency "jekyll-paginate", "~> 1.1"
  spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.6"
  spec.add_runtime_dependency "jekyll-feed", "~> 0.13"

  spec.add_development_dependency "bundler", "~> 1.16"
  spec.add_development_dependency "rake", "~> 12.0"
end
-- 
2.24.1
View this thread in the archives