generated from chadbaldwin/simple-blog-bootstrap
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
90 changed files
with
6,324 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
_site | ||
_site/ | ||
.DS_Store | ||
Gemfile.lock | ||
elm-stuff/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
install: /opt/homebrew/opt/ruby/bin/bundle install | ||
serve: /opt/homebrew/opt/ruby/bin/bundle exec jekyll serve --livereload | ||
build: /opt/homebrew/opt/ruby/bin/bundle exec jekyll build | ||
elm: for x in _scripts/*.elm; do BASE=$(basename "$x"); elm make "$x" --output "assets/js/$BASE.js"; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<link href="/assets/css/override.css" rel="stylesheet" type="text/css"> | ||
|
||
<!-- highlight.js support --> | ||
<link rel="stylesheet" href="/js/highlightjs/styles/github.css"> | ||
<link rel="stylesheet" href="/js/highlightjs/styles/ssms.css" /> | ||
<script type="text/javascript" src="/js/highlightjs/highlight.min.js"></script> | ||
<link rel="stylesheet" href="/assets/js/highlightjs/styles/github.css"> | ||
<link rel="stylesheet" href="/assets/js/highlightjs/styles/ssms.css" /> | ||
<script type="text/javascript" src="/assets/js/highlightjs/highlight.min.js"></script> | ||
<script type="text/javascript"> hljs.highlightAll(); </script> | ||
<!-- end highlight.js support --> | ||
|
||
<script src="/js/new-window-fix.js"></script> | ||
<script src="/assets/js/new-window-fix.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Initially based on https://github.com/sonnym/jekyll_elm | ||
# | ||
# USAGE: | ||
# Copy/paste this file into the `_plugins` directory of your Jekyll project. | ||
# For every .elm file in your project, it will generate a .js file in your site | ||
# using the same name and relative path. | ||
# | ||
# As-is, the converter expects the following directory structure: | ||
# | ||
# your-jekyll-project/ | ||
# ⌞ _plugins/ | ||
# ⌞ elm_converter.rb | ||
# ⌞ elm.json | ||
|
||
require "jekyll" | ||
require "tempfile" | ||
|
||
class ElmConverter < Jekyll::Converter | ||
MODE = Jekyll.env == "development" ? "debug" : "optimize" | ||
|
||
safe false | ||
def matches(ext) ext == ".elm" end | ||
def output_ext(ext) ".js" end | ||
|
||
def convert(content) | ||
Tempfile.open [ "source", ".elm" ] do |source| | ||
Tempfile.open [ "output", ".js" ] do |output| | ||
File.write source.path, content | ||
raise unless system "cd #{@config["source"]} && \ | ||
npx elm make #{source.path} --#{MODE} --output #{output.path}" | ||
output.read | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.