|
|
||
|---|---|---|
| README.md | ||
README.md
WIP Basically Basic Jekyll Theme
Basically Basic is a Jekyll theme meant as a
substitute for the default jekyll new theme — Minima. Conventions and
features found in Minima are fully supported by Basically
Basic, with a few enhancements here and there.
Table of Contents
Installation
Install the theme as a Ruby Gem by adding it to your
Gemfilelike so:gem "jekyll-theme-basically-basic", :git => "https://github.com/mmistakes/jekyll-theme-basically-basic.git"Fetch and update your bundled gems by running the following Bundler command:
bundleSet the
themein your project’s Jekyll configuration,_config.yml:theme: jekyll-theme-basically-basic
Configuration
Configuration of site-wide elements (title,
description, author, etc.) happens in your
project’s _config.yml. See the example configuration for reference.
Skin
This theme comes in six different skins (color variations). To change
skins edit your project’s _config.yml to one of the
following:
theme_skin: default |
theme_skin: night | theme_skin: plum |theme_skin: sea | theme_skin: soft |
theme_skin: steel |Navigation
By default all internal pages with a title will be added
to the “off-canvas” menu. For more granular control and sorting of these
menu links:
Create a custom list to override the default setting by adding a
navigation_pagesarray to your_config.ymlfile.Add raw page paths in the order you’d like:
navigation_pages: - about.md - cv.md
Each menu link’s title and URL will be populated based on their
title and permalink respectively.
Pagination
Break up the main listing of posts into smaller lists and display them over multiple pages by enabling pagination.
Include the
jekyll-paginateplugin in yourGemfile.group :jekyll_plugins do gem "jekyll-paginate" endAdd
jekyll-paginatetogemsarray in your_config.ymlfile and the following pagination settings:paginate: 5 # amount of posts to show per page paginate_path: /page:num/Create
index.html(or renameindex.md) in the root of your project and addlayout: homepaginate: trueto its YAML Front Matter.
Comments (via Disqus)
Optionally, if you have a Disqus account, you can show a comments section below each post.
To enable Disqus comments, add your Disqus
shortname to your project’s _config.yml file:
disqus:
shortname: my_disqus_shortname
Comments are enabled by default and will only appear in production
when built with the following environment
value: JEKYLL_ENV=production
If you don’t want to display comments for a particular post you can
disable them by adding comments: false to that post’s YAML
Front Matter.
Google Analytics
To enable Google Analytics, add your tracking
ID to _config.yml like so:
google_analytics: UA-NNNNNNNN-N
Similar to comments, the Google Analytics tracking script will only
appear in production when using the following environment value:
JEKYLL_ENV=production.
Layouts
This theme provides the following layouts, which you can use by
setting the layout Front Matter on each
page, like so:
---
layout: name
---
layout: default
layout: post
layout: page
layout: home
layout: about
layout: cv
Customization
The default structure, style, and scripts of this theme can be overridden and customized in the following two ways.
Overriding Includes and Layouts
Theme defaults can be overridden
by placing a file with the same name into your project’s
_includes or _layouts directory. For
instance:
- To specify a custom style path or meta data to the
_includes/head.htmlfile, create an_includesdirectory in your project, copy_includes/head.htmlfrom Basically Basic’s gem folder to<your_project>/_includesand start editing that file.
ProTip: to locate the theme’s files on your computer
run bundle show jekyll-theme-basically-basic. This returns
the location of the gem-based theme files.
Customizing Sass (SCSS)
To override the default Sass
(located in theme’s _sass directory), do one of the
following:
- Copy directly from the Basically Basic gem
- Go to your local Basically Basic gem installation directory (run
bundle show jekyll-theme-basically-basicto get the path to it). - Copy the contents of
/assets/stylesheets/main.scssfrom there to<your_project>. - Customize want you want inside
<your_project>/assets/stylesheets/main.scss.
- Copy from this repo.
- Copy the contents of assets/stylesheets/main.scss to
<your_project>. - Customize want you want inside
<your_project/assets/stylesheets/main.scss.
Note: To make more extensive changes and customize
the Sass partials bundled in the gem. You will need to copy the complete
contents the _sass directory to
<your_project> due to the way Jekyll currently reads
those files.
To make basic tweaks to theme’s style Sass variables can be
overridden by adding to
<your_project>/assets/stylesheets/main.scss. For
instance, to change the accent color used throughout the theme add:
$accent-color: red;
Before any @import lines.
Customizing JavaScript
To override the default JavaScript bundled in the theme, do one of the following:
- Copy directly from the Basically Basic gem
- Go to your local Basically Basic gem installation directory (run
bundle show jekyll-theme-basically-basicto get the path to it). - Copy the contents of
/assets/javascripts/main.jsfrom there to<your_project>. - Customize want you want inside
<your_project>/assets/javascripts/main.js.
- Copy from this repo.
- Copy the contents of assets/javascripts/main.js to
<your_project>. - Customize want you want inside
<your_project>/assets/javascripts/main.js.
Customizing Sidebar Content
Development
To set up your environment to develop this theme:
- Clone this repo
cdinto/exampleand runbundle install.
To test the theme the locally as you make changes to it:
cdinto the root folder of the repo (e.g.jekyll-theme-basically-basic).- Run
bundle exec rake previewand open your browser tohttp://localhost:4000/example/.
This starts a Jekyll server using the theme’s files and contents of
the example/ directory. As modifications are made, refresh
your browser to see any changes.
Contributing
Found a typo in the documentation? Interested in adding a feature or fixing a bug? Then by all means submit an issue or take a stab at submitting a pull request. If this is your first pull request, it may be helpful to read up on the GitHub Flow.
Pull Requests
When submitting a pull request:
- Clone the repo.
- Create a branch off of
developand give it a meaningful name (e.g.my-awesome-new-feature) and describe the feature or fix. - Open a pull request on GitHub.
Theme documentation and sample pages can be found in the /docs folder if you’d like to tackle any
“low-hanging fruit” like fixing typos, bad grammar, etc.
Credits
Creator
Michael Rose
Icons + Demo Images:
Other:
License
The MIT License (MIT)
Copyright (c) 2017 Michael Rose
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.