├── .editorconfig ├── .github └── issue_template.md ├── .gitignore ├── CONTRIBUTING.md ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── config.rb ├── data └── settings.yml ├── helpers ├── meta_tags_helper.rb ├── svg_helper.rb └── urls_helper.rb ├── lib └── svg.rb ├── package.json ├── source ├── assets │ ├── images │ │ ├── codeless-middleman.jpg │ │ ├── logos │ │ │ └── favicon_base.png │ │ └── svg │ │ │ └── .gitkeep │ ├── javascripts │ │ └── application.js │ └── stylesheets │ │ └── application.css.scss ├── favicon.ico ├── index.html.slim └── layouts │ ├── commons │ ├── _favicon.html.slim │ └── _meta_tags.html.slim │ └── layout.html.slim ├── webpack.config.js └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | 13 | [*.md] 14 | trim_trailing_whitespace = false 15 | -------------------------------------------------------------------------------- /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Context 4 | 5 | 6 | ## Expected Behavior 7 | 8 | 9 | ## Actual Behavior 10 | 11 | 12 | ## Possible Fix 13 | 14 | 15 | ## Steps to Reproduce 16 | 17 | 18 | 1. 19 | 2. 20 | 3. 21 | 4. 22 | 23 | ## Your Environment 24 | 25 | * Version used: 26 | * Browser Name and version: 27 | * Operating System and version (desktop or mobile): 28 | * Link to your project: 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore bundler config 2 | /.bundle 3 | 4 | # Ignore the build directory 5 | /build 6 | /dist 7 | 8 | # Ignore Sass' cache 9 | /.sass-cache 10 | 11 | # Ignore .DS_store file 12 | .DS_Store 13 | 14 | # Ignore NPM 15 | .npm-debug.log 16 | /node_modules 17 | /.tmp 18 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | If you have problems, please create a [GitHub Issue](https://github.com/flexbox/codeless/issues). 2 | 3 | Have a fix or want to add a feature? [Pull Requests](https://github.com/flexbox/codeless/pulls) are welcome! 4 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # If you have OpenSSL installed, we recommend updating 2 | # the following line to use 'https' 3 | source 'http://rubygems.org' 4 | 5 | # Core 6 | gem 'middleman', '~> 4.3.2' 7 | gem 'middleman-favicon-maker' 8 | gem 'middleman-minify-html', '~> 3.4.1' 9 | gem 'middleman-robots' 10 | gem 'middleman-sitemap-ping' 11 | 12 | # -- NEEDS FIX -- not yet compatible with middleman 4.x 13 | # gem 'middleman-deploy', '~> 1.0.0' # FIXME: wait for new release 14 | gem 'middleman-deploy', git: 'https://github.com/middleman-contrib/middleman-deploy', branch: 'master' 15 | # gem 'middleman-sitemap', '~> 0.0.13' # FIXME: wait for this PR to be merged https://github.com/statonjr/middleman-sitemap/pull/10 16 | gem 'middleman-sitemap', git: 'https://github.com/matsu911/middleman-sitemap', branch: 'master' 17 | 18 | # Templating Engines 19 | gem 'slim', '~> 3.0.7' 20 | gem 'oga', '~> 2.8' 21 | 22 | # Testing Deploy 23 | gem 'rake' 24 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GIT 2 | remote: https://github.com/matsu911/middleman-sitemap 3 | revision: b52c2256d4188761122804cbb79ceb6cd1afdf6b 4 | branch: master 5 | specs: 6 | middleman-sitemap (0.0.13) 7 | middleman-core (>= 3.2.2) 8 | 9 | GIT 10 | remote: https://github.com/middleman-contrib/middleman-deploy 11 | revision: 243ab38b08896cd5a37d6845a01a5761b934a898 12 | branch: master 13 | specs: 14 | middleman-deploy (2.0.0.pre.alpha) 15 | middleman-core (>= 3.2) 16 | net-sftp 17 | ptools 18 | 19 | GEM 20 | remote: http://rubygems.org/ 21 | specs: 22 | activesupport (5.0.7.1) 23 | concurrent-ruby (~> 1.0, >= 1.0.2) 24 | i18n (>= 0.7, < 2) 25 | minitest (~> 5.1) 26 | tzinfo (~> 1.1) 27 | addressable (2.6.0) 28 | public_suffix (>= 2.0.2, < 4.0) 29 | ansi (1.5.0) 30 | ast (2.3.0) 31 | backports (3.11.4) 32 | coffee-script (2.4.1) 33 | coffee-script-source 34 | execjs 35 | coffee-script-source (1.12.2) 36 | concurrent-ruby (1.1.4) 37 | contracts (0.13.0) 38 | docile (1.1.5) 39 | dotenv (2.6.0) 40 | em-websocket (0.5.1) 41 | eventmachine (>= 0.12.9) 42 | http_parser.rb (~> 0.6.0) 43 | erubis (2.7.0) 44 | eventmachine (1.2.5) 45 | execjs (2.7.0) 46 | fast_blank (1.0.0) 47 | fastimage (2.1.5) 48 | favicon_maker (1.3.1) 49 | docile (~> 1.1) 50 | ffi (1.9.25) 51 | haml (5.0.4) 52 | temple (>= 0.8.0) 53 | tilt 54 | hamster (3.0.0) 55 | concurrent-ruby (~> 1.0) 56 | hashie (3.6.0) 57 | htmlcompressor (0.2.0) 58 | http_parser.rb (0.6.0) 59 | i18n (0.9.5) 60 | concurrent-ruby (~> 1.0) 61 | kramdown (1.17.0) 62 | listen (3.0.8) 63 | rb-fsevent (~> 0.9, >= 0.9.4) 64 | rb-inotify (~> 0.9, >= 0.9.7) 65 | memoist (0.16.0) 66 | middleman (4.3.2) 67 | coffee-script (~> 2.2) 68 | haml (>= 4.0.5) 69 | kramdown (~> 1.2) 70 | middleman-cli (= 4.3.2) 71 | middleman-core (= 4.3.2) 72 | middleman-cli (4.3.2) 73 | thor (>= 0.17.0, < 2.0) 74 | middleman-core (4.3.2) 75 | activesupport (>= 4.2, < 5.1) 76 | addressable (~> 2.3) 77 | backports (~> 3.6) 78 | bundler 79 | contracts (~> 0.13.0) 80 | dotenv 81 | erubis 82 | execjs (~> 2.0) 83 | fast_blank 84 | fastimage (~> 2.0) 85 | hamster (~> 3.0) 86 | hashie (~> 3.4) 87 | i18n (~> 0.9.0) 88 | listen (~> 3.0.0) 89 | memoist (~> 0.14) 90 | padrino-helpers (~> 0.13.0) 91 | parallel 92 | rack (>= 1.4.5, < 3) 93 | sassc (~> 2.0) 94 | servolux 95 | tilt (~> 2.0.9) 96 | uglifier (~> 3.0) 97 | middleman-favicon-maker (4.0.4) 98 | favicon_maker (~> 1.3, >= 1.3.1) 99 | middleman-core (~> 4.0) 100 | middleman-livereload (3.4.6) 101 | em-websocket (~> 0.5.1) 102 | middleman-core (>= 3.3) 103 | rack-livereload (~> 0.3.15) 104 | middleman-minify-html (3.4.1) 105 | htmlcompressor (~> 0.2.0) 106 | middleman-core (>= 3.2) 107 | middleman-robots (1.3.2) 108 | middleman (>= 4.0) 109 | middleman-sitemap-ping (1.0.0) 110 | middleman (>= 3.1) 111 | minitest (5.11.3) 112 | net-sftp (2.1.2) 113 | net-ssh (>= 2.6.5) 114 | net-ssh (4.1.0) 115 | oga (2.10) 116 | ast 117 | ruby-ll (~> 2.1) 118 | padrino-helpers (0.13.3.4) 119 | i18n (~> 0.6, >= 0.6.7) 120 | padrino-support (= 0.13.3.4) 121 | tilt (>= 1.4.1, < 3) 122 | padrino-support (0.13.3.4) 123 | activesupport (>= 3.1) 124 | parallel (1.13.0) 125 | ptools (1.3.4) 126 | public_suffix (3.0.3) 127 | rack (2.0.6) 128 | rack-livereload (0.3.16) 129 | rack 130 | rake (12.0.0) 131 | rb-fsevent (0.10.3) 132 | rb-inotify (0.10.0) 133 | ffi (~> 1.0) 134 | ruby-ll (2.1.2) 135 | ansi 136 | ast 137 | sassc (2.0.0) 138 | ffi (~> 1.9.6) 139 | rake 140 | servolux (0.13.0) 141 | slim (3.0.8) 142 | temple (>= 0.7.6, < 0.9) 143 | tilt (>= 1.3.3, < 2.1) 144 | temple (0.8.0) 145 | thor (0.20.3) 146 | thread_safe (0.3.6) 147 | tilt (2.0.9) 148 | tzinfo (1.2.5) 149 | thread_safe (~> 0.1) 150 | uglifier (3.2.0) 151 | execjs (>= 0.3.0, < 3) 152 | 153 | PLATFORMS 154 | ruby 155 | 156 | DEPENDENCIES 157 | middleman (~> 4.3.2) 158 | middleman-deploy! 159 | middleman-favicon-maker 160 | middleman-livereload 161 | middleman-minify-html (~> 3.4.1) 162 | middleman-robots 163 | middleman-sitemap! 164 | middleman-sitemap-ping 165 | oga (~> 2.8) 166 | rake 167 | slim (~> 3.0.7) 168 | 169 | BUNDLED WITH 170 | 1.16.4 171 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | 341 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Middleman advanced template 2 |
3 | 4 |
Start your next Middleman 4 project in seconds with the best DX
5 |
A highly scalable, Middleman template with a focus on SEO & best practices.
6 |
7 | 8 | [![Greenkeeper badge](https://badges.greenkeeper.io/flexbox/codeless.svg)](https://greenkeeper.io/) 9 | 10 | ###### Tools 11 | - [Slim](http://slim-lang.com) *[for html]* 12 | - [Sass](http://sass-lang.com) *[for css]* 13 | - [Yarn](https://yarnpkg.com) *[package management]* 14 | - [Webpack](https://webpack.js.org/) *[bundle for assets]* 15 | 16 | ###### Middleman 17 | - [GitHub Pages](http://pages.github.com) *[deployment/hosting]* 18 | - [Middleman Favicon Maker](https://github.com/follmann/middleman-favicon-maker) *[Generate favicon files in various sizes]* 19 | 20 | ## Start a new project 21 | 22 | $ gem install middleman 23 | $ middleman init MY_PROJECT_FOLDER -T flexbox/codeless 24 | 25 | ## Getting Started 26 | 27 | You need [Bundler](http://bundler.io/) to install gems 28 | 29 | $ gem install bundler 30 | $ bundle install 31 | $ yarn 32 | 33 | ### Browser preview – _[http://locahost:4567](http://locahost:4567)_ 34 | 35 | $ bundle exec middleman server 36 | 37 | ### Deploying to GitHub Pages 38 | 39 | $ bundle exec middleman deploy 40 | 41 | __💡 Note:__ If you get an error with `middleman build`, make sure [Imagemagik](http://www.imagemagick.org/script/index.php) is installed 42 | 43 | $ brew install imagemagick 44 | -------------------------------------------------------------------------------- /config.rb: -------------------------------------------------------------------------------- 1 | require 'slim' 2 | 3 | activate :directory_indexes 4 | 5 | set :css_dir, 'assets/stylesheets' 6 | set :images_dir, 'assets/images' 7 | set :js_dir, 'assets/javascripts' 8 | 9 | activate :external_pipeline, 10 | name: :webpack, 11 | command: build? ? 'yarn run build' : 'yarn run start', 12 | source: '.tmp/dist', 13 | latency: 1 14 | 15 | page '/*.xml', layout: false 16 | page '/*.json', layout: false 17 | page '/*.txt', layout: false 18 | 19 | # Build-specific configuration 20 | configure :build do 21 | activate :favicon_maker do |f| 22 | f.template_dir = File.join(root, 'source/assets/images/logos/') 23 | f.output_dir = File.join(root, 'build') 24 | f.icons = { 25 | 'favicon_base.png' => [ 26 | { icon: 'chrome-touch-icon-192x192.png' }, 27 | { icon: 'apple-touch-icon.png', size: '152x152' }, 28 | { icon: 'ms-touch-icon-144x144-precomposed.png', size: '144x144' }, 29 | { icon: 'favicon-196x196.png' }, 30 | { icon: 'favicon-160x160.png' }, 31 | { icon: 'favicon-96x96.png' }, 32 | { icon: 'favicon-32x32.png' }, 33 | { icon: 'favicon-16x16.png' }, 34 | { icon: 'favicon.ico', size: '64x64,32x32,24x24,16x16' } 35 | ] 36 | } 37 | end 38 | 39 | activate :asset_hash 40 | activate :gzip 41 | activate :minify_css 42 | activate :minify_html, remove_input_attributes: false 43 | activate :minify_javascript 44 | 45 | activate :sitemap, hostname: @app.data.settings.site.url 46 | activate :sitemap_ping do |config| 47 | config.host = @app.data.settings.site.url.to_s 48 | end 49 | 50 | activate :robots, 51 | rules: [{ user_agent: '*', allow: %w(/) }], 52 | sitemap: @app.data.settings.site.url + '/sitemap.xml' 53 | 54 | # Use this for github.io gh-pages 55 | set :relative_links, true 56 | activate :relative_assets 57 | end 58 | 59 | # Push-it to the web 60 | activate :deploy do |deploy| 61 | deploy.deploy_method = :git 62 | deploy.branch = 'gh-pages' 63 | deploy.build_before = true # always use --no-clean options 64 | 65 | committer_app = "#{Middleman::Deploy::PACKAGE} v#{Middleman::Deploy::VERSION}" 66 | commit_message = "Deployed using #{committer_app}" 67 | 68 | deploy.commit_message = commit_message 69 | end 70 | -------------------------------------------------------------------------------- /data/settings.yml: -------------------------------------------------------------------------------- 1 | site: 2 | title: codeless 3 | title_separator: • 4 | description: 'Write less code, solve more problems' 5 | i18n: en 6 | geo: 7 | placename: 'Lille, Nord' 8 | position: 50.629250;3.057256 9 | region: FR-59 10 | url: 'https://github.com/flexbox/codeless' 11 | twitter_card_img: 'https://raw.githubusercontent.com/flexbox/codeless/master/source/favicon_base.png' 12 | author: David Leuliette 13 | 14 | social: 15 | twitter: '_flexbox' 16 | -------------------------------------------------------------------------------- /helpers/meta_tags_helper.rb: -------------------------------------------------------------------------------- 1 | module MetaTagsHelper 2 | def meta_tag_description 3 | site_description = data.settings.site.description 4 | page_description = current_page.data.description 5 | 6 | if page_description.nil? || page_description.empty? 7 | description = site_description 8 | else 9 | description = page_description 10 | end 11 | 12 | if description.nil? || description.empty? 13 | puts "== path:#{current_page.url} meta description is missing on settings.yml" 14 | elsif description.length > 150 15 | puts "== path:#{current_page.url} meta description should be between 140-150 characters. You have: #{description.length}" 16 | else 17 | description 18 | end 19 | end 20 | 21 | def meta_tag_image 22 | if current_page.data['twitter_card_img'] 23 | path = image_path(current_page.data['twitter_card_img']) 24 | else 25 | path = data.settings.site.twitter_card_img 26 | end 27 | 28 | path 29 | end 30 | 31 | def meta_tag_title 32 | site_title = data.settings.site.title 33 | page_title = current_page.data.title 34 | separator = data.settings.site.title_separator 35 | 36 | if page_title.nil? || page_title.empty? 37 | return title = site_title 38 | else 39 | title = page_title 40 | end 41 | 42 | if title.blank? 43 | puts "== path:#{current_page.url} title is missing on settings.yml" 44 | elsif title.length > 70 45 | puts "== path:#{current_page.url} title should be under 70 characters. You have: #{title.length}" 46 | else 47 | title += ' ' + separator + ' ' 48 | title += site_title 49 | 50 | title 51 | end 52 | 53 | end 54 | 55 | def meta_tag_url 56 | host_url(current_page.url) 57 | end 58 | end 59 | -------------------------------------------------------------------------------- /helpers/svg_helper.rb: -------------------------------------------------------------------------------- 1 | require 'lib/svg' 2 | 3 | module SvgHelper 4 | def svg_tag(filename, options={}) 5 | root = Middleman::Application.root 6 | file_path = File.join(root, 'source', config[:images_dir], filename) 7 | return '(SVG img not found)' unless File.exists?(file_path) 8 | 9 | SVG.inline(file_path, options) 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /helpers/urls_helper.rb: -------------------------------------------------------------------------------- 1 | module UrlsHelper 2 | def host_url(url) 3 | data.settings.site.url + url 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /lib/svg.rb: -------------------------------------------------------------------------------- 1 | # [Imported from http://github.com/cveneziani/middleman-boilerplate/] 2 | require 'oga' 3 | 4 | # SVG file inliner 5 | # 6 | # Examples 7 | # 8 | # SVG.inline('images/square.svg', class: 'logo', alt: 'Website logo') 9 | # # => "" 14 | class SVG 15 | private 16 | 17 | attr_reader :file_path, :options 18 | 19 | public 20 | 21 | # Public: Convert a SVG file into an inline version 22 | # 23 | # file_path - The file path of the SVG file 24 | # options - Hash of options (default: {}) 25 | # :class - String for any class(es) to be applied to the `svg` tag 26 | # Override any existing class value. 27 | # :alt - String used to add accessibility and SEO to the SVG 28 | # - Set `role="img"` and `aria-label` attributes 29 | # - Add a `desc` element 30 | # 31 | # Examples 32 | # 33 | # SVG.inline('images/square.svg') 34 | # # => " 36 | # 37 | # " 38 | # SVG.inline('images/square.svg', class: 'logo', alt: 'Website logo') 39 | # # => "" 44 | # 45 | # Returns the inlined SVG as a String 46 | def self.inline(file_path, options={}) 47 | new(file_path, options).inline 48 | end 49 | 50 | def initialize(file_path, options={}) 51 | @file_path = file_path 52 | @options = options 53 | end 54 | 55 | # Public: See doc of .inline method. 56 | def inline 57 | return read_file if options.empty? 58 | inline_with_options 59 | end 60 | 61 | private 62 | 63 | def inline_with_options 64 | document = Oga.parse_xml(File.open(file_path)) 65 | svg = document.css('svg').first 66 | 67 | svg.set('role', 'img') 68 | 69 | apply_class_option(svg) if options[:class] 70 | apply_alt_option(svg) if options[:alt] 71 | 72 | document.to_xml 73 | end 74 | 75 | def apply_alt_option(svg) 76 | desc = Oga::XML::Element.new(name: :desc) 77 | desc.inner_text = options[:alt] 78 | 79 | svg.set('aria-label', options[:alt]) 80 | svg.children << desc 81 | end 82 | 83 | def apply_class_option(svg) 84 | svg.set(:class, options[:class]) 85 | end 86 | 87 | def read_file 88 | File.read(file_path) 89 | end 90 | end 91 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codeless", 3 | "version": "1.0.0", 4 | "description": "Middleman starter template with yarn & webpack", 5 | "repository": "git@github.com:flexbox/codeless", 6 | "author": "flexbox ", 7 | "scripts": { 8 | "test": "mocha --require test/helpers/dom.js --compilers js:babel-core/register", 9 | "start": "NODE_ENV=development webpack --watch -d --color", 10 | "build": "NODE_ENV=production webpack --bail -p" 11 | }, 12 | "babel": { 13 | "presets": [ 14 | "es2015" 15 | ] 16 | }, 17 | "postcss": { 18 | "plugins": { 19 | "autoprefixer": {} 20 | } 21 | }, 22 | "browserslist": [ 23 | "> 1%", 24 | "last 2 versions" 25 | ], 26 | "dependencies": { 27 | "autoprefixer": "^9.1.1", 28 | "babel-core": "^6.26.0", 29 | "babel-eslint": "^7.2.3", 30 | "babel-loader": "^7.1.2", 31 | "babel-preset-es2015": "^6.24.1", 32 | "clean-webpack-plugin": "^1.0.0", 33 | "css-loader": "^0.28.5", 34 | "extract-text-webpack-plugin": "^3.0.0", 35 | "node-sass": "^4.5.3", 36 | "postcss-loader": "^2.0.6", 37 | "sass-loader": "^6.0.6", 38 | "sinon": "^3.2.1", 39 | "style-loader": "^0.23.1", 40 | "webpack": "^3.5.5" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /source/assets/images/codeless-middleman.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flexbox/codeless/b71255340f19a62e8c2b2b2b524d7e57c18bf69e/source/assets/images/codeless-middleman.jpg -------------------------------------------------------------------------------- /source/assets/images/logos/favicon_base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flexbox/codeless/b71255340f19a62e8c2b2b2b524d7e57c18bf69e/source/assets/images/logos/favicon_base.png -------------------------------------------------------------------------------- /source/assets/images/svg/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flexbox/codeless/b71255340f19a62e8c2b2b2b524d7e57c18bf69e/source/assets/images/svg/.gitkeep -------------------------------------------------------------------------------- /source/assets/javascripts/application.js: -------------------------------------------------------------------------------- 1 | // Import JavaScript files 2 | // import './file'; 3 | -------------------------------------------------------------------------------- /source/assets/stylesheets/application.css.scss: -------------------------------------------------------------------------------- 1 | @charset 'utf-8'; 2 | 3 | // Import Sass files 4 | // @import 'folder/file'; 5 | 6 | body { 7 | background-color: #F1F1F1; 8 | text-align: center; 9 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; 10 | margin: 0; 11 | } 12 | -------------------------------------------------------------------------------- /source/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flexbox/codeless/b71255340f19a62e8c2b2b2b524d7e57c18bf69e/source/favicon.ico -------------------------------------------------------------------------------- /source/index.html.slim: -------------------------------------------------------------------------------- 1 | --- 2 | title: Homepage 3 | description: 'Write less code, solve more problems' 4 | twitter_card_img: '' 5 | --- 6 | 7 | h1 = data.settings.site.title 8 | em = data.settings.site.description 9 | markdown: 10 | Advanced Middleman template with `Sass`, `Slim` & `Yarn` 11 | 12 | 🚀 13 | = link_to 'Read the documentation', data.settings.site.url 14 | -------------------------------------------------------------------------------- /source/layouts/commons/_favicon.html.slim: -------------------------------------------------------------------------------- 1 | - unless development? 2 | / Add to homescreen for Chrome on Android 3 | meta name="mobile-web-app-capable" content="yes" 4 | meta name="application-name" content="#{data.settings.site.title}" 5 | link rel="icon" sizes="192x192" href="/chrome-touch-icon-192x192.png" 6 | 7 | / Add to homescreen for Safari on iOS 8 | meta name="apple-mobile-web-app-capable" content="yes" 9 | meta name="apple-mobile-web-app-status-bar-style" content="black" 10 | meta name="apple-mobile-web-app-title" content="#{data.settings.site.title}" 11 | link rel="apple-touch-icon" href="/apple-touch-icon.png" 12 | 13 | / Tile icon for Win8 (144x144 + tile color) 14 | meta name="msapplication-TileImage" content="ms-touch-icon-144x144-precomposed.png" 15 | meta name="msapplication-TileColor" content="#607D8B" 16 | meta name="theme-color" content="#607D8B" 17 | 18 | / Classic favicons 19 | link rel="icon" type="image/png" href="/favicon-196x196.png" sizes="196x196" 20 | link rel="icon" type="image/png" href="/favicon-160x160.png" sizes="160x160" 21 | link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" 22 | link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32" 23 | link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16" 24 | -------------------------------------------------------------------------------- /source/layouts/commons/_meta_tags.html.slim: -------------------------------------------------------------------------------- 1 | / SEO 2 | title 3 | = meta_tag_title 4 | meta name="description" content=meta_tag_description 5 | meta name="author" content="#{data.settings.site.author}" 6 | meta name="robots" content="index, follow" 7 | 8 | / Geocoding 9 | meta name="geo.placename" content="#{data.settings.site.geo.placename}" 10 | meta name="geo.position" content="#{data.settings.site.geo.position}" 11 | meta name="geo.region" content="#{data.settings.site.geo.region}" 12 | 13 | / Microdata 14 | meta itemprop="name" content=meta_tag_title 15 | meta itemprop="description" content=meta_tag_description 16 | meta itemprop="image" content=meta_tag_image 17 | 18 | / Facebook Open Graph 19 | meta property="og:site_name" content="#{data.settings.site.title}" 20 | meta property="og:title" content=meta_tag_title 21 | meta property="og:description" content=meta_tag_description 22 | meta property="og:image" content=meta_tag_image 23 | meta property="og:type" content="website" 24 | meta property="og:url" content=meta_tag_url 25 | 26 | / Google+ 27 | meta itemprop="name" content=meta_tag_title 28 | meta itemprop="image" content=meta_tag_image 29 | 30 | / Twitter Card 31 | meta name="twitter:card" content="summary_large_image" 32 | meta name="twitter:site" content="@#{data.settings.social.twitter}" 33 | meta name="twitter:title" content=meta_tag_title 34 | meta name="twitter:description" content=meta_tag_description 35 | meta name="twitter:image" content=meta_tag_image 36 | -------------------------------------------------------------------------------- /source/layouts/layout.html.slim: -------------------------------------------------------------------------------- 1 | doctype html 2 | 3 | html prefix="og: http://ogp.me/ns#" lang="#{data.settings.site.i18n}" 4 | head 5 | meta charset="utf-8" 6 | meta http-equiv="x-ua-compatible" content="ie=edge" 7 | meta name="viewport" content="width=device-width, initial-scale=1.0" 8 | = partial 'layouts/commons/meta_tags' 9 | = partial 'layouts/commons/favicon' 10 | = stylesheet_link_tag 'application' 11 | = yield_content :head 12 | 13 | body class="#{page_classes}" 14 | 15 | == yield 16 | 17 | = javascript_include_tag 'all.bundle' 18 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const webpack = require('webpack'); 2 | const ExtractTextPlugin = require('extract-text-webpack-plugin'); 3 | const Clean = require('clean-webpack-plugin'); 4 | const path = require('path'); 5 | 6 | module.exports = { 7 | devtool: 'cheap-module-eval-source-map', 8 | entry: { 9 | all: path.join(__dirname, '/source/assets/javascripts/application.js') 10 | }, 11 | output: { 12 | path: path.join(__dirname, '.tmp/dist'), 13 | filename: 'assets/javascripts/[name].bundle.js' 14 | }, 15 | resolve: { 16 | modules: [ 17 | __dirname + '/assets/javascript', 18 | __dirname + '/assets/stylesheets', 19 | __dirname + '/node_modules', 20 | ], 21 | extensions: ['.js', '.css', '.scss'] 22 | }, 23 | module: { 24 | rules: [ 25 | { 26 | test: /\.scss$/, 27 | use: [ 28 | { loader: 'style-loader', options: { sourceMap: true } }, 29 | { loader: 'css-loader', options: { sourceMap: true } }, 30 | { loader: 'postcss-loader', options: { sourceMap: true } }, 31 | { loader: 'sass-loader', options: { sourceMap: true } } 32 | ] 33 | }, 34 | { 35 | test: /\.js$/, 36 | exclude: /(node_modules)/, 37 | use: ['babel-loader'] 38 | } 39 | ] 40 | }, 41 | plugins: [ 42 | // Always expose NODE_ENV to webpack, in order to use `process.env.NODE_ENV` 43 | // inside your code for any environment checks; UglifyJS will automatically 44 | // drop any unreachable code. 45 | new webpack.DefinePlugin({ 46 | 'process.env': { 47 | NODE_ENV: JSON.stringify(process.env.NODE_ENV), 48 | }, 49 | }), 50 | new Clean(['.tmp']), 51 | new ExtractTextPlugin('assets/stylesheets/[name].bundle.css'), 52 | ], 53 | }; 54 | --------------------------------------------------------------------------------