├── .gitignore ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── _config.yml ├── _includes ├── footer.html ├── head.html ├── header.html ├── metadata.json └── styles.scss ├── _layouts ├── default.html ├── page.html └── post.html ├── _plugins └── shortcodes.rb ├── _posts └── 2016-03-30-immaculate-showcase.md ├── _sass ├── _lean_tufte.scss ├── _syntax-highlighting.scss └── _tufte.scss ├── _site ├── LICENSE ├── README.md ├── about │ └── index.html ├── assets │ ├── et-book │ │ ├── et-book-bold-line-figures │ │ │ ├── et-book-bold-line-figures.eot │ │ │ ├── et-book-bold-line-figures.svg │ │ │ ├── et-book-bold-line-figures.ttf │ │ │ └── et-book-bold-line-figures.woff │ │ ├── et-book-display-italic-old-style-figures │ │ │ ├── et-book-display-italic-old-style-figures.eot │ │ │ ├── et-book-display-italic-old-style-figures.svg │ │ │ ├── et-book-display-italic-old-style-figures.ttf │ │ │ └── et-book-display-italic-old-style-figures.woff │ │ ├── et-book-roman-line-figures │ │ │ ├── et-book-roman-line-figures.eot │ │ │ ├── et-book-roman-line-figures.svg │ │ │ ├── et-book-roman-line-figures.ttf │ │ │ └── et-book-roman-line-figures.woff │ │ ├── et-book-roman-old-style-figures │ │ │ ├── et-book-roman-old-style-figures.eot │ │ │ ├── et-book-roman-old-style-figures.svg │ │ │ ├── et-book-roman-old-style-figures.ttf │ │ │ └── et-book-roman-old-style-figures.woff │ │ └── et-book-semi-bold-old-style-figures │ │ │ ├── et-book-semi-bold-old-style-figures.eot │ │ │ ├── et-book-semi-bold-old-style-figures.svg │ │ │ ├── et-book-semi-bold-old-style-figures.ttf │ │ │ └── et-book-semi-bold-old-style-figures.woff │ └── images │ │ ├── sf.jpg │ │ └── sushi.jpg ├── contact │ └── index.html ├── feed.xml ├── immaculate-showcase.html └── index.html ├── about.md ├── assets ├── et-book │ ├── et-book-bold-line-figures │ │ ├── et-book-bold-line-figures.eot │ │ ├── et-book-bold-line-figures.svg │ │ ├── et-book-bold-line-figures.ttf │ │ └── et-book-bold-line-figures.woff │ ├── et-book-display-italic-old-style-figures │ │ ├── et-book-display-italic-old-style-figures.eot │ │ ├── et-book-display-italic-old-style-figures.svg │ │ ├── et-book-display-italic-old-style-figures.ttf │ │ └── et-book-display-italic-old-style-figures.woff │ ├── et-book-roman-line-figures │ │ ├── et-book-roman-line-figures.eot │ │ ├── et-book-roman-line-figures.svg │ │ ├── et-book-roman-line-figures.ttf │ │ └── et-book-roman-line-figures.woff │ ├── et-book-roman-old-style-figures │ │ ├── et-book-roman-old-style-figures.eot │ │ ├── et-book-roman-old-style-figures.svg │ │ ├── et-book-roman-old-style-figures.ttf │ │ └── et-book-roman-old-style-figures.woff │ └── et-book-semi-bold-old-style-figures │ │ ├── et-book-semi-bold-old-style-figures.eot │ │ ├── et-book-semi-bold-old-style-figures.svg │ │ ├── et-book-semi-bold-old-style-figures.ttf │ │ └── et-book-semi-bold-old-style-figures.woff └── images │ ├── sf.jpg │ └── sushi.jpg ├── contact.md ├── feed.xml └── index.html /.gitignore: -------------------------------------------------------------------------------- 1 | .sass-cache 2 | .jekyll-metadata 3 | .DS_Store 4 | s3_website.yml 5 | .jekyll-cache 6 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'jekyll' 4 | gem 'jekyll-paginate' 5 | gem 'jekyll-compose', group: [:jekyll_plugins] -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | addressable (2.7.0) 5 | public_suffix (>= 2.0.2, < 5.0) 6 | colorator (1.1.0) 7 | concurrent-ruby (1.1.5) 8 | em-websocket (0.5.1) 9 | eventmachine (>= 0.12.9) 10 | http_parser.rb (~> 0.6.0) 11 | eventmachine (1.2.7) 12 | ffi (1.11.3) 13 | forwardable-extended (2.6.0) 14 | http_parser.rb (0.6.0) 15 | i18n (1.7.0) 16 | concurrent-ruby (~> 1.0) 17 | jekyll (4.0.0) 18 | addressable (~> 2.4) 19 | colorator (~> 1.0) 20 | em-websocket (~> 0.5) 21 | i18n (>= 0.9.5, < 2) 22 | jekyll-sass-converter (~> 2.0) 23 | jekyll-watch (~> 2.0) 24 | kramdown (~> 2.1) 25 | kramdown-parser-gfm (~> 1.0) 26 | liquid (~> 4.0) 27 | mercenary (~> 0.3.3) 28 | pathutil (~> 0.9) 29 | rouge (~> 3.0) 30 | safe_yaml (~> 1.0) 31 | terminal-table (~> 1.8) 32 | jekyll-compose (0.11.0) 33 | jekyll (>= 3.7, < 5.0) 34 | jekyll-paginate (1.1.0) 35 | jekyll-sass-converter (2.0.1) 36 | sassc (> 2.0.1, < 3.0) 37 | jekyll-watch (2.2.1) 38 | listen (~> 3.0) 39 | kramdown (2.1.0) 40 | kramdown-parser-gfm (1.1.0) 41 | kramdown (~> 2.0) 42 | liquid (4.0.3) 43 | listen (3.2.0) 44 | rb-fsevent (~> 0.10, >= 0.10.3) 45 | rb-inotify (~> 0.9, >= 0.9.10) 46 | mercenary (0.3.6) 47 | pathutil (0.16.2) 48 | forwardable-extended (~> 2.6) 49 | public_suffix (4.0.1) 50 | rb-fsevent (0.10.3) 51 | rb-inotify (0.10.0) 52 | ffi (~> 1.0) 53 | rouge (3.13.0) 54 | safe_yaml (1.0.5) 55 | sassc (2.2.1) 56 | ffi (~> 1.9) 57 | terminal-table (1.8.0) 58 | unicode-display_width (~> 1.1, >= 1.1.1) 59 | unicode-display_width (1.6.0) 60 | 61 | PLATFORMS 62 | ruby 63 | 64 | DEPENDENCIES 65 | jekyll 66 | jekyll-compose 67 | jekyll-paginate 68 | 69 | BUNDLED WITH 70 | 1.17.2 71 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2016 Lau Siaw Young 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Immaculate 2 | 3 | A beautiful, fast, AMP-compliant Jekyll theme based on Tufte CSS. 4 | 5 | [Check it out here!](https://immaculate-siawyoung-com.cdn.ampproject.org/c/immaculate.siawyoung.com/) 6 | 7 | [Google AMP](https://www.ampproject.org/) 8 | 9 | [Tufte CSS](https://github.com/edwardtufte/tufte-css) 10 | 11 | Immaculate is really fast, thanks to Google AMP. When served over Google's CDN, you will see typical `DOMContentLoaded` times of well under 100ms (when using the leaner stylesheet, see below). The benefits are most obvious for slower connections. On the *Regular - 2G* throttling setting in Chrome, the demo page still manages a `DOMContentLoaded` of under 500ms. 12 | 13 | Immaculate includes tag support for some of the more commonly-used Tufte CSS layout options, including sidenotes, margin notes, and full-width figures. Other features, such as `newthought` or epigraphs, can be used by typing raw HTML in your Markdown files. I might add helper tags for these in the future. 14 | 15 | **Caveat (need hep!)**: AMP HTML does not allow form elements, including checkboxes, which are used in Tufte CSS to toggle the display of sidenotes and margin notes at smaller widths. As such, I've modified Immaculate to disable this functionality at smaller widths for the time being. It's a big deal, and I'm looking for help on emulating this functionality without using checkboxes. 16 | 17 | ## Getting Started 18 | 19 | ``` 20 | git clone git@github.com:siawyoung/immaculate.git 21 | cd immaculate 22 | bundle install 23 | bundle exec jekyll serve --baseurl '' 24 | ``` 25 | 26 | Modify the template files and `_config.yml` to your liking, and publish away! 27 | 28 | ## Helper Tags 29 | 30 | Immaculate comes with a few helper tags. The source code for these tags can be found in `_plugins/shortcodes.rb`. 31 | 32 | ### Image 33 | 34 | ``` 35 | {% image %} 36 | ``` 37 | 38 | The `image` tag allows you to insert AMP-compliant images into the post. 39 | 40 | `src` is the `src` attribute of the image tag. 41 | 42 | `width` and `height` of the image must be specified, as per AMP specifications. 43 | 44 | `option` - an optional argument which supports the following options: 45 | 46 | - `fw` - makes the image full width 47 | - `raw` - outputs the raw `amp-img` tag, can be used in conjunction with margin notes 48 | 49 | ##### Example usage 50 | 51 | ``` 52 | {% image https://image.com/image.jpg 1200 600 fw %} 53 | ``` 54 | 55 | ### Youtube 56 | 57 | ``` 58 | {% youtube %} 59 | ``` 60 | 61 | The `youtube` tag allows you to insert AMP-compliant embedded Youtube videos into the post. 62 | 63 | `id` is the Youtube viddeo ID. 64 | 65 | `width` and `height` of the video must be specified, as per AMP specifications. 66 | 67 | `option` - an optional argument which supports the following options: 68 | 69 | - `fw` - makes the video full width 70 | - `raw` - outputs the raw `amp-youtube` tag, can be used in conjunction with margin notes 71 | 72 | ##### Example usage 73 | 74 | ``` 75 | {% youtube aj2h3h1sf 600 400 %} 76 | ``` 77 | 78 | ### Sidenote 79 | 80 | (See caveat above) 81 | 82 | ``` 83 | {% sidenote %} 84 | ``` 85 | 86 | The `sidenote` tag allows you insert sidenotes into the post. 87 | 88 | `id` is a unique identifier for the sidenote, and it can be anything - it will not show up visually. 89 | 90 | `body` is the body of the sidenote. It can also accommodate `span`-level HTML elements (``, ``, ``, no block-level elements). 91 | 92 | ##### Example usage 93 | 94 | ``` 95 | This is a very long{% sidenote meh Yes, very long. %} sentence. 96 | ``` 97 | 98 | ### Margin Note 99 | 100 | (See caveat above) 101 | 102 | ``` 103 | {% marginnote %} 104 | 105 | {% endmarginnote %} 106 | ``` 107 | 108 | The `marginnote` tag block allows you to insert margin notes into the post. 109 | 110 | `id` is a unique identifier for the margin note, and it can be anything - it will not show up visually. 111 | 112 | `body` is the body of the sidenote. It can also accommodate `span`-level HTML elements (``, ``, ``, no block-level elements). 113 | 114 | You can also use margin notes in conjunction with `image` and `youtube` tags by specifying the `raw` option. 115 | 116 | ##### Example usage 117 | 118 | ``` 119 | {% marginnote yt %} 120 | {% youtube aj2h3h1sf 350 200 raw %} 121 | This is a extremely succinct example. 122 | {% endmarginnote %} 123 | ``` 124 | 125 | ### Blockquote 126 | 127 | ``` 128 | {% blockquote