Jekyll boilerplate is a starter kit for Jekyll themes.
To start your a theme with Jekyll Boilerplate, you can Download the files from GitHub (or clone the repo: git clone https://github.com/bradonomics/jekyll-boilerplate.git
). Remember this is a starting point for a custom website, if it doesn't make it into 90% of my builds, it isn't in the boilerplate.
The download includes dummy content (most of which I swiped from Michael Rose's unit test repo) to to check styles and formatting.
The package.json file included here is only used in the case that I need to concatenate and uglify a boat-load of javascript. I use NPM scripts in my dot files to build the site.
By default sub-menus are expanded in mobile view. This allows height calculation without a ton of extraneous Javascript. You can find the default mobile navigation toggler in the _includes/scripts.html
file.
Collapsible menus are difficult to make accessible. display: none;
is most often used to get the snazzy slide functions to work. It's best to avoid these if you have any interest in screen readers or keyboard navigators using your site.
Having said that, if you need collapsible sub-menus, you will need to use jQuery. The steps you will need to take are:
- Install jQuery and uglify-js using
npm install
. - Remove the vanilla JS toggle function in
_includes/scripts.html
. - Remove
.navigation.open
in_sass/navigation.scss
. - Uncomment
.sub-menu-toggle
in_sass/navigation.scss
. - Uncomment the sub-menu-toggle buttons in the site header.
- While in development add the uncompressed files in separate script tags at the bottom of the
_layouts/default.html
file. - Consiter moving all scripts from
_includes/scripts.html
into their own files for concatination/uglification. - Use NPM script to concatenate and uglify all Javascript. Basic usage is set in package.json. Furtur instructions can be found on npmjs.com.
- Update script tags at the bottom of the
_layouts/default.html
file.
Jekyll Boilerplate is released under the GPL-2.0 License.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA