Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A simple Jekyll theme for words and pictures.

License

NotificationsYou must be signed in to change notification settings

mmistakes/so-simple-theme

Repository files navigation

LICENSEJekyll

So Simple is a simpleJekyll theme for your words and pictures. Built to provide:

  • A variety of layouts with clean and readable typography.
  • Microformats markup to make post content machine-readable and discoverable.
  • Disqus Comments and Google Analytics support.
  • SEO best practices viaJekyll SEO Tag.
  • Options to customize the theme and make it your own.

See what's new in theCHANGELOG. 📘v2 documentation.

So Simple live preview

So Simple layouts

Sample Pages

Description
A post with a large hero image.PreviewSource
A post with a variety of common HTML elements showing how the theme styles them.PreviewSource
Post displaying highlighted code.PreviewSource
A post displaying images with a variety of alignments.PreviewSource
All posts grouped by year.PreviewSource
All posts grouped by category.PreviewSource
All posts grouped by tag.PreviewSource
Category page.PreviewSource
Listing of documents in grid view.PreviewSource

Additionalsample posts can be view on the demo site. Source files for these (and the entire demo site) can be found in/docs folder.

Installation

If you're running Jekyll v3.5+ and self-hosting you can quickly install the theme as a Ruby gem. If you're hosting withGitHub Pages you can install as aremote theme or directly copy all of the theme files (seestructure below) into your project.

Ruby Gem Method

  1. Add this line to your Jekyll site'sGemfile (orcreate one):

    gem"jekyll-theme-so-simple"
  2. Add this line to your Jekyll site's_config.yml file:

    theme:jekyll-theme-so-simple
  3. Then runBundler to install the theme gem and dependencies:

    bundle install

GitHub Pages Method

GitHub Pages has addedfull support for any GitHub-hosted theme.

  1. Replacegem "jekyll" with:

    gem"github-pages",group::jekyll_plugins
  2. Runbundle update and verify that all gems install properly.

  3. Addremote_theme: "mmistakes/so-simple-theme@3.2.0" to your_config.yml file. Remove any othertheme: orremote_theme: entries.


Note: Your Jekyll site should be viewable immediately athttp://USERNAME.github.io. If it's not, you can force a rebuild by pushing empty commits to GitHub (see below for more details).

If you're hosting several Jekyll based sites under the same GitHub username you will have to use Project Pages instead of User Pages. Essentially you rename the repo to something other thanUSERNAME.github.io and create agh-pages branch off ofmaster. For more details on how this works, checkGitHub's documentation.

Remove the Unnecessary

If you forked or downloaded theso-simple-theme repo you can safely remove the following files and folders:

  • .github
  • docs
  • example
  • .editorconfig
  • .gitattributes
  • banner.js
  • CHANGELOG.md
  • Gemfile
  • jekyll-theme-so-simple.gemspec
  • package.json
  • Rakefile
  • README.md
  • README-OLD.md
  • screenshot.png

Upgrading

If you're using the Ruby Gem or remote theme versions of So Simple, upgrading is fairly painless.

To check which version you are currently using, view the source of your built site and you should something similar to:

<!--    So Simple Jekyll Theme 3.0.0    Copyright 2013-2018 Michael Rose - mademistakes.com | @mmistakes    Free for personal and commercial use under the MIT license    https://github.com/mmistakes/so-simple-theme/blob/master/LICENSE-->

This will be at the top of every.html file,/assets/css/main.css, and/assets/js/main.js.

Ruby Gem

Simply runbundle update if you're using Bundler (have aGemfile) orgem update jekyll-theme-so-simple if you're not.

Remote Theme

Verify you have thelatest version assigned in_config.yml

remote_theme: "mmistakes/so-simple-theme@3.2.0"

Note: If@x.x.x is omitted the theme's currentmaster branch will be used. It is advised to"lock"remote_theme at a specific version to avoid introducing breaking changes to your site.

The next step requires rebuilding yourGitHub Pages site so it can pull down the latest theme updates. This can be achieved by pushing up a commit to your GitHub repo.

An empty commit will get the job done too if you don't have anything to push at the moment:

git commit --allow-empty -m "Force rebuild of site"

Use Git

If you want to get the most out of the Jekyll + GitHub Pages workflow, then you'll need to utilize Git. To pull down theme updates manually you must first ensure there's an upstream remote. If you forked the theme's repo then you're likely good to go.

To double check, rungit remote -v and verify that you can fetch fromorigin https://github.com/mmistakes/so-simple-theme.git.

To add it you can do the following:

git remote add upstream https://github.com/mmistakes/so-simple-theme.git

Pull Down Updates

Now you can pull any commits made to theme'smaster branch with:

git pull upstream master

Depending on the amount of customizations you've made after forking, there's likely to be merge conflicts. Work through any conflicting files Git flags, staging the changes you wish to keep, and then commit them.

Update Files Manually

Another way of dealing with updates isdownloading the theme --- replacing your layouts, includes, and assets with the newer ones manually. To be sure that you don't miss any changes review the theme'scommit history to see what has changed.

Here's a quick checklist of the important folders/files you'll want to be mindful of:

Name
_layoutsReplace all. Apply edits if you customized any layouts.
_includesReplace all. Apply edits if you customized any includes.
assetsReplace all. Apply edits if you customized stylesheets or scripts.
_sassReplace all. Apply edits if you customized Sass partials.
_data/navigation.ymlSafe to keep. Verify that there were no major structural changes or additions.
_data/text.ymlSafe to keep. Verify that there were no major structural changes or additions.
_config.ymlSafe to keep. Verify that there were no major structural changes or additions.

Note: If you're not seeing the latest version, be sure to flush browser and CDN caches. Depending on your hosting environment older versions of/assets/css/main.css,/assets/js/main.min.js, or*.html files may be cached.

Structure

Layouts, includes, Sass partials, and data files are all placed in their default locations. Stylesheets and scripts can be found inassets, and a few development related files in the project's root directory.

Please note: If you installed So Simple via the Ruby Gem or remote theme methods, theme files found in/_layouts,/_includes,/_sass, and/assets will be missing from your project. This is normal as they are bundled with thejekyll-theme-so-simple gem.

├── _data               # data files|  ├── navigation.yml   # navigation bar links|  └── text.yml         # theme text├── _includes           # theme includes├── _layouts            # theme layouts (see below for usage)├── _sass               # Sass partials├── assets|  ├── css|  |  └── main.scss|  └── js|     └── main.min.js├── _config.yml         # sample configuration└── index.md            # sample home page (recent posts/not paginated)

Starting Fresh

After creating aGemfile and installing the theme you'll need to add and edit the following files:

Note: Consult thepagination documentation below for instructions on how to enable it on the home page.

Starting fromjekyll new

Using thejekyll new command will get you up and running the quickest.

Edit yourGemfile and_config.yml files following theinstallation guide above andconfiguration guide below, then create_data/text.yml as instructed earlier.

Configuring

Configuration of site-wide elements (locale,title,description,url,logo,author, etc.) happens in your project's_config.yml. See theexample configuration in this repo for additional reference.

NameDescriptionExample
localePrimary language for the site."en-us"
titleSite's title."My Awesome Site"
descriptionA short description."This is my site, it is awesome."
baseurlUsed to test the website under the same base url it will be deployed to./my-base-path
urlThe full URL to your site."https://your-site.com"
logoPath to a site-wide logo used in masthead./images/your-logo.png

Site Skin

Three skins (default, light, and dark) are available to change the color palette of the theme.

default.csslight.cssdark.css
default skinlight skindark skin
skin:"/assets/css/skins/default.css"skin:"/assets/css/skins/light.css"skin:"/assets/css/skins/dark.css"

To use a custom skin other than the ones provided:

  1. Copy and rename/assets/css/skins/default.scss to your local repo.
  2. Override and customize Sass variables as you see fit.
  3. Update theskin path in_config.yml to reference this new skin.css file.

Site Locale

site.locale is used to declare the primary language for each web page within the site.

Example: locale:"en-US" sets the lang attribute for the site to the United States flavor of English, whileen-GB would be for the United Kingdom style of English. Country codes are optional and the shorter variationlocale: "en" is also acceptable. To find your language and country codes check thisreference table.

Properly setting the locale is important for associating localized text found in the text data file.

Note: The theme defaults to text in English (en,en-US,en-GB). If you change locale in_config.yml to something else be sure to add the corresponding locale key and translated text to_data/text.yml.

Site URL

The base hostname and protocol for your site. If you're hosting with GitHub Pages this will be something likeurl: "https://github.io.mmistakes" orurl: "https://your-site.com" if you have a custom domain name.

GitHub Pages nowforceshttps:// for new sites, so be mindful of that when setting your URL to avoid mixed-content warnings.

Note: Jekyll overrides the value ofurl withhttp://localhost:4000 when runningjekyll serve locally in development. If you want to avoid this behavior setJEKYLL_ENV=production toforce the environment to production.

Site Base URL

This option causes all kinds of confusion in the Jekyll community. If you're not hosting your site as aGitHub Project Page or in a subfolder (e.g.,/blog), then don't mess with it.

In the case of theSo Simple demo site it's hosted on GitHub athttps://mmistakes.github.io/so-simple-theme. To correctly set this base path I'd useurl: "https://mmistakes.github.io" andbaseurl: "/so-simple-theme".

For more information on how to properly usesite.url andsite.baseurl as intended by the Jekyll maintainers, checkParker Moore's post on the subject.

Note: When usingbaseurl remember to include it as part of your link and asset paths in your content. Values ofurl: andbaseurl: "/blog" would make your local site visible athttp://localhost:4000/blog and nothttp://localhost:4000. You can either prepend all your asset and internal link paths with{{ site.baseurl }} or use Jekyll'srelative_url.

To use the example values above the following image path of{{ '/images/my-image.jpg' | relative_url }} would output correctly ashttp://localhost:4000/blog/images/my-image.jpg.

Without therelative_url filter that asset path would be missing/blog and you'd have a broken image on your page.

Date Format

You can change the default date format by specifyingdate_format in_config.yml. It accepts any of the standardLiquid date formats.

For example the default value of"%B %-d, %Y" could be changed like so:

date_format:"%Y-%m-%d"

Reading Time

Enable estimated reading time snippets site-wide withread_time: true.200 has been set as the default words per minute value — which can be changed viawords_per_minute in your_config.yml file.

read_time:truewords_per_minute:200

Mathematics

EnableMathJax (a JavaScript display engine for mathematics) site-wide with

mathjax:enable:true

Thecombo option lets you to choose aMathJax componentcombination--thedefault is "tex-svg." And, thetags option lets you controlequation numbering--choices are "ams" (default), "all", and "none."

Sample configuration:

mathjax:enable:true# MathJax equations, e.g. true, false (default)combo:"tex-svg"# "tex-svg" (default), "tex-mml-chtml", etc.tags:"ams"# "none", "ams" (default), "all"

Google Fonts

Easily useGoogle Fonts throughout your site by replacing the fontname andweights accordingly. Suggested font pairings are as follows:

google_fonts:  -name:"Source Sans Pro"weights:"400,400i,700,700i"  -name:"Lora"weights:"400,400i,700,700i"

Note: If other font families are used, be sure to add, then override the following SCSS variables in/assets/css/main.scss with thefont-family values Google provides.

$serif-font-family:"Lora",serif;$sans-serif-font-family:"Source Sans Pro",sans-serif;$monospace-font-family: Menlo, Consolas, Monaco,"Courier New",Courier,monospace;$base-font-family:$sans-serif-font-family;$headline-font-family:$sans-serif-font-family;$title-font-family:$serif-font-family;$description-font-family:$serif-font-family;$meta-font-family:$serif-font-family;

Seestylesheet documentation below for more information on overriding the theme's default variables.

Pagination

Break up the main listing of posts on the home page across multiple pages byenabling pagination.

  1. Include thejekyll-paginate plugin in yourGemfile.

    group:jekyll_pluginsdogem"jekyll-paginate"end
  2. Addjekyll-paginate to theplugins array (previouslygems) in your_config.yml file and the following pagination settings:

    paginate:10# amount of posts to show per pagepaginate_path:/page:num/
  3. Createindex.html (or renameindex.md) in the root of your project and add the following front matter:

    layout:homepaginate:true

Search

To index the full content of your documents for use in asearch page, setsearch_full_content totrue in_config.yml:

search_full_content:true

Note: Large amounts of posts will increase the size of the search index, impacting page load performance. Settingsearch_full_content tofalse (the default) restricts indexing to the first 50 words of body content.

Taxonomy Pages

By default, category and tags added to a post are not linked to taxonomy archive pages. To enable this behavior and link to pages with posts grouped by category or tag, add the following:

category_archive_path:"/categories/#"tag_archive_path:"/tags/#"

These paths should mimic the permalinks used for yourcategories andtags archive pages. The# at the end is necessary to target the correct taxonomy section on the pages.

For example if you were to createcategories.md with the following front matter:

title:Categories Archivelayout:categoriespermalink:/foo/

You'd need to changecategory_archive_path to"/foo/# for category links to function properly.

Note: You can create dedicated category and tag pages manually withlayout: category andlayout: tag. Or use plugins likejekyll-archives orjekyll-paginate-v2 to generate them automatically.

Comments (via Disqus)

If you have aDisqus account, you can show a comments section below each post.

To enable Disqus comments, add yourDisqus shortname to your project's_config.yml file:

disqus:shortname:my_disqus_shortname

Comments only appear in production when built with the followingenvironment value:JEKYLL_ENV=production to avoid polluting your Disqus account withlocalhost content.

If you don't want to display comments for a particular post you can disable them by addingcomments: false to that post's front matter.

Google Analytics

To enableGoogle Analytics, add your tracking ID to_config.yml like so:

google_analytics:UA-NNNNNNNN-N

Similar to Disqus comments above, the Google Analytics tracking script will only appear in production when using the following environment value:JEKYLL_ENV=production.

Other

For more configuration options be sure to consult the documentation for:jekyll-seo-tag,jekyll-feed,jekyll-paginate, andjekyll-sitemap.


Layouts

This theme provides the following layouts, which you can use by setting thelayoutfront matter on each page, like so:

---layout:name---

layout: default

This layout handles all of the basic page scaffolding placing the page content between the masthead and footer elements. All other layouts inherit this one and provide additional styling and features inside of the{{ content }} block.

layout: post

This layout accommodates the following front matter:

NameTypeDescription
imageStringPath to a large image associated with the post. Also used forOpenGraph,Twitter Cards, and site feed thumbnail if enabled.Suggested image sizes.
image.pathStringSame as above. Used when athumbnail orcaption needs to be assigned to theimage object as well.
image.captionStringDescribes the image or provides credit. Markdown is allowed.
authorObject or stringSpecify a post's authorname,picture,twitter,links, etc.
commentsBooleanDisable comments withcomments: false.
shareBooleanAdd social share links to a post withshare: true.

Post image example:

image:path:/images/post-image-lg.jpgthumbnail:/images/post-image-th.jpgcaption:"Photo credit [Unsplash](https://unsplash.com/)"

Note:image.feature front matter has been deprecated, to fully supportjekyll-seo-tag. If you are not usingthumbnail orcaption the post image can be assigned more concisely asimage: /images/your-post-image.jpg.

Post author example:

# post specific author data if different from what is set in _config.ymlauthor:name:John Doepicture:/images/john-doe.jpgtwitter:johndoe

Note: Author information can centralized in_data/authors.yml by doing following in the document's front matter:

author:johndoe

With the corresponding author key in_data/authors.yml:

johndoe:name:John Doepicture:/images/john-doe.jpgtwitter:johndoe

Note:author.picture recommended size is150 x 150 pixels.

Author Links

To define what links appear in the author sidebar use theauthors.links key in either_config.yml or/_data/authors.yml.

NameDescription
titleDescribes the link. Not visible, used for accessibility purposes.
urlURL the link points to.
iconCorresponds with aFont Awesome icon e.g.,fab fa-twitter-square.

Example:

author:links:    -title:Twitterurl:https://twitter.com/usernameicon:fab fa-twitter-square    -title:Instagramurl:https://instagram.com/usernameicon:fab fa-instagram    -title:GitHuburl:https://github.com/usernameicon:fab fa-github-square

Note: To disable author links completely use use:

author:links:false

layout: page

Visually this layout looks and acts similarlayout: post, with the followingdifferences.

  • Author sidebar and page meta (published date, categories, and tags) are ommitted.
  • Page is less wide due to omitted sidebar.
  • Disqus comments are omitted.
  • Next/Previous post navigation links omitted.

The page layout forms the base for several other layouts likehome,posts,categories,tags,collection,category,tag, andsearch.

layout: home

This layout accommodates the same front matter aslayout: page, with theaddition of the following:

paginate:true# enables pagination loop, see section above for additional setupentries_layout:# list (default), grid

When pagination is not enabled the page defaults to showing the latest 10 posts. To change the amount of posts shown, assign a limit value by adding the following to the page's front matter.

posts_limit:5

By default, posts are shown in a list view. To change to a grid view addentries_layout: grid to the page's front matter.

layout: posts

This layout displays all posts grouped by the year they were published. It accommodates the same front matter aslayout: page.

By default, posts are shown in a list view. To change to a grid view addentries_layout: grid to the page's front matter.

layout: categories

This layout displays all posts grouped category. It accommodates the same front matter aslayout: page.

By default, posts are shown in a list view. To change to a grid view addentries_layout: grid to the page's front matter.

layout: tags

This layout displays all posts grouped by tag. It accommodates the same front matter aslayout: page.

By default, posts are shown in a list view. To change to a grid view addentries_layout: grid to the page's front matter.

layout: collection

This layout displays all documents grouped by a specific collection. It accommodates the same front matter aslayout: page with the addition of the following:

collection:# collection nameentries_layout:# list (default), gridshow_excerpts:# true (default), falsesort_by:# date (default) titlesort_order:# forward (default), reverse

To create a page showing all documents in therecipes collection you'd createrecipes.md in the root of your project and add this front matter:

title:Recipeslayout:collectionpermalink:/recipes/collection:recipes

By default, documents are shown in a list view. To change to a grid view addentries_layout: grid to the page's front matter. If you want to sort the collection by title addsort_by: title. If you want reverse sorting, addsort_order: reverse. If you are simply looking for a list that shows recipe titles (no excerpts), addshow_excerpts: false.

layout: category

This layout displays all posts grouped by a specific category. It accommodates the same front matter aslayout: page with the addition of the following:

taxonomy:# category nameentries_layout:# list (default), grid

By default, posts are shown in a list view. To change to a grid view addentries_layout: grid to the page's front matter.

To create a page showing all posts assigned to the categoryfoo you'd createfoo.md in the root of your project and add this front matter:

title:Foolayout:categorypermalink:/categories/foo/taxonomy:foo

layout: tag

This layout displays all posts grouped by a specific tag. It accommodates the same front matter aslayout: page with the addition of the following:

taxonomy:# tag nameentries_layout:# list (default), grid

By default, posts are shown in a list view. To change to a grid view addentries_layout: grid to the page's front matter.

To create a page showing all posts assigned to the tagfoo bar you'd createfoo-bar.md in the root of your project and add this front matter:

title:Foo Barlayout:tagpermalink:/tags/foo-bar/taxonomy:foo bar

layout: search

This layout displays a search form and displays related pages based on the query.

Page content index:title,excerpt,content (when enabled),categories,tags, andurl.

If you would like to exclude specific pages/posts from the search index set the search flag tofalse in their front matter.

search:false

To index the full content of your documents setsearch_full_content totrue in_config.yml:

search_full_content:true

Note: Large amounts of posts will increase the size of the search index, impacting page load performance. Settingsearch_full_content tofalse (the default) restricts indexing to the first 50 words of body content.

Images

Suggested image sizes in pixels are as follows:

ImageDescriptionSize
site.logoSite-wide logo used in masthead.200 x 200
page.image.pathLarge full-width document image.Tall images will push content down the page.1600 x 600 is a good middle-ground size to aim for.
page.imageShort-hand forpage.image.path when used alone (withoutthumbnail,caption, or other variables).Same aspage.image.path
page.image.thumbnailSmall document image used in grid view.400 x 200
author.pictureAuthor picture in post sidebar.150 x 150

Theme Text

To change text found throughout the theme, copy the following/_data/text.yml file and customize as necessary.

When adding new texts be sure the keys match theselanguage/country codes, that may be used forsite.locale.

Navigation

To define what pages are linked in the top navigation:

  1. Create a/_data/navigation.yml file.

  2. Add pages in the order you'd like them to appear:

    -title:Postsurl:/posts/-title:Categoriesurl:/categories/-title:External Pageurl:https://whatever-site.com/page.html-title:Searchurl:/search/

Note: Long titles or many links may cause the navigation bar to break into multiple lines, especially on smaller screens. Keep this in mind as you develop your site's primary navigation.

Author

Author information is used as meta data for post "by lines" and propagates thecreator field of Twitter summary cards with the following front matter in_config.yml:

author:name:John Doetwitter:johndoetwitterpicture:/images/johndoe.png

Site-wide author information can be overridden in a document's front matter in the same way:

author:name:Jane Doetwitter:janedoetwitterpicture:/images/janedoe.png

Or by specifying a corresponding key in the document's front matter, that exists insite.data.authors. E.g., you have the following in the document's front matter:

author:megaman

And you have the following in_data/authors.yml:

megaman:name:Mega Mantwitter:megamantwitterpicture:/images/megaman.pngdrlight:name:Dr. Lighttwitter:drlighttwitterpicture:/images/drlight.png

Currentlyauthor.picture is only used inlayout: post. Recommended size is150 x 150 pixels.

Footer

The footer links and copyright text can both be customized.

Footer Links

Footer links are set in_config.yml under thefooter_links key.

NameDescription
titleDescribes the link. Not visible, used for accessibility purposes.
urlURL the link points to.
iconCorresponds with aFont Awesome 5 icon e.g.,fab fa-twitter-square.

Examples:

footer_links:  -title:Twitterurl:https://twitter.com/usernameicon:fab fa-twitter-square  -title:GitHuburl:https://github.com/mmistakesicon:fab fa-github-square  -title:Feedurl:atom.xmlicon:fas fa-rss-square

Note: To disable footer links completely usefooter_links: false.

Copyright Text

By default the copyright inserts the current year,site.title, and the words"Powered by Jekyll & So Simple." To change this addcopyright to your_config.yml like so (Markdown is allowed):

copyright:"This site is made with <3 by *me, myself, and I*."

Helpers

You can think of these Jekyll helpers as shortcodes. Since GitHub Pages doesn't allow most plugins ---custom tags are out. Instead the theme leveragesincludes to do something similar.

Responsive Embed

Embed a video from YouTube/Vimeo or any otheriframe content that responsively sizes to fit the width of its parent.

ParameterRequiredDescription
urlYesVideo or iframe's URL e.g.,https://www.youtube.com/watch?v=-PVofD2A9t8
ratioOptionalRatio of the video or iframe content.21:9,16:9,4:3,1:1. If a ratio is not assigned16:9 is used.

Example:

{% include responsive-embed url="https://www.youtube.com/watch?v=-PVofD2A9t8" ratio="16:9" %}

Table of Contents

To include anauto-generated table of contents for posts and pages, add the following helper where you'd like it to appear.

{% include toc %}

Migration Guide

So Simple 3 is a major rewrite of the entire theme. The most notable changes are summarized below, followed by more specific changes.

It is safe to say you'll probably want to ditch all_layouts,_includes,_sass,.css, and.js files from v2 and use either theRuby gem orremote theme installation options.

Global Changes

  • "Fork method" has been deprecated in favor of installing/upgrading the theme via a gem or remote theme.
  • All_layouts,_includes,_sass, and JavaScript have been rebuilt.
  • Properly usessite.url andsite.baseurl leveraging therelative_url andabsolute_url filters.
  • Replaced custom/_includes/open-graph.html withjekyll-seo-tag.
  • Full control over links and icons used in author sidebar and footer.
  • Tag, articles, and blog starter pages have been replaced with new layouts (tags andposts) for easier use.
  • Removed404.md page.
  • Replaced customatom.xml feed file withjekyll-feed.
  • Removed defaultfavicon.ico andfavicon.png files.
  • Replaced simple JSON search withLunr.
  • ReplacedMagnific Popup withLity.
  • RemovedFitVids.JS.

Browser Support

  • CSS written with modern browsers in mind. Where possible fallbacks forfloat based layouts have been used so things don't looktoo broken in browsers that don't supportdisplay: grid and flexbox.

Configuration Changes

Locale Changes

Format has changed fromen_US (with an underscore) toen-US with a hyphen.

Owner Changes

site.owner is nowsite.author to better supportjekyll-seo-tag andjekyll-feed.

v2v3
site.owner.namesite.author.name
site.owner.avatarsite.author.picture
site.owner.emailsite.author.email
site.owner.twittersite.twitter
site.owner.google.analyticsdeprecated, replaced withjekyll-seo-tag
site.owner.bing-verifydeprecated, replaced withjekyll-seo-tag

Google Analytics Changes

site.owner.google.analytics is nowsite.google_analytics.See documentation for more information.

Disqus Comments Changes

site.owner.disqus-shortname is nowsite.disqus.shortname.See documentation more information.

To disable comments on a particular post addcomments: false to its front matter.

Search Changes

search_omit has been renamed tosearch. To exclude a post or page from search addsearch: false to its front matter instead.

Image Changes

When assigning image paths for things like thesite.logo,page.image.path,author.picture, etc. they now require a full relative or absolute path.

In So Simple v2 images were all placed in/images/ and assigned in front matter with just the filename. For images to properly load, you now need to prepend all paths with/images/... if you are storing images there e.g.,/images/your-image.jpg.

To better support Jekyll plugin's likejekyll-seo-tag,jekyll-feed, andjekyll-sitemap most of theimage keys have been renamed. Adjust the front matter in all of your posts' and pages' accordingly.

v2v3
image.featureimage.path
image.thumbimage.thumbnail
image.creditimage.caption (Markdown allowed)
image.creditlinkdeprecated use**image.caption** instead

A post with the following v2 front matter:

image:feature:feature-image-filename.jpgthumb:thumb-image-filename.jpgcredit:Michael Rosecreditlink:https://mademistakes.com

Would be converted into the following v3 front matter:

image:path:/images/feature-image-filename.jpgthumbnail:/images/thumb-image-filename.jpgcaption:"[Michael Rose](https://mademistakes)"

Development Changes

Step-by-Step

Rough steps to migrate a stock So Simple v2 fork (with no alterations) to the latest.

  1. Remove_includes/,_layouts/,_sass/,jshintrc,Gruntfile.js, andsearch.json.

  2. EditGemfile for either theRuby gem orGitHub Pages installation methods and follow those instructions.

  3. Add the following Google Fonts to_config.yml:

    google_fonts:  -name:"Source Sans Pro"weights:"400,400i,700,700i"  -name:"Lora"weights:"400,400i,700,700i"
  4. Edit_config.yml paying close attention to those keys thathave been renamed or have new relative path requirements.locale,logo, andowner are good places to start.

  5. Rename all instances ofimage.feature,image.thumb, andimage.credit in posts/pages adhering to theimage changes above.

  6. Remove the body content inindex.html and changelayout: page tolayout: home. Configurepagination if necessary.

  7. Remove the body content in/search/index.md and changelayout: page tolayout: search.

  8. Remove the body content in/tags/index.md and changelayout: page tolayout: tags.

  9. Remove the body content in/articles/index.md and changelayout: page tolayout: category and addtaxonomy: articles.

  10. Remove the body content in/body/index.md and changelayout: page tolayout: category and addtaxonomy: blog.

  11. Renamemodified front matter in posts/pages tolast_modified_at for improved parity with plugins that support it.

  12. Addtag_archive_path: "/tags/#" to_config.yml to activate tag links in post meta sidebar.

  13. Renameavatar topicture in_data/authors.yml (and in any posts/pages front matter), and edit the paths adhering to theimage path changes above.


Customization

When installing as aRuby gem orremote theme the core theme files (_layouts,_includes,_sass,assets, etc.) will be absent from your project.

The default structure, style, and scripts of this theme can be overridden and customized in the following two ways:

Overriding Includes and Layouts

Theme files can beoverridden by placing a file with the same name into your project's_includes or_layouts directory. For instance:

  • To add another social sharing button to_includes/social-share.html, create an_includes directory in your project, copy_includes/social-share.html from So Simple's gem folder to<your_project>/_includes and edit that file.

ProTip: to locate the theme's files on your computer runbundle show jekyll-theme-so-simple. This returns the location of the gem-based theme files.

The theme comes with two files to help inject custom markup and content into predefined locations.

Description
_includes/head-custom.htmlInserted inside the<head> element for adding metadata, favicons, etc.
_includes/footer-custom.htmlInserted inside the<footer> element before site scripts and copyright information.

Customizing Sass (SCSS)

To override the defaultSass (located in theme's_sass directory), do one of the following:

  1. Copy directly from the So Simple gem

    • Go to your local So Simple gem installation directory (runbundle show jekyll-theme-so-simple to get the path to it).
    • Copy the contents of/assets/css/main.scss from there to<your_project>.
    • Customize what you want inside<your_project>/assets/css/main.scss.
  2. Copy from this repo.

    • Copy the contents ofassets/css/main.scss to<your_project>.
    • Customize what you want inside<your_project/assets/css/main.scss.

Note: To customize the actual Sass partials bundledin the gem, you will need to copy the complete contents of the_sass directory to<your_project>. Due to the way Jekyll currently imports these files it's all or nothing. Overriding a single Sass partial (or two) won't work like_includes and_layouts.

To make basic tweaks to theme's style, Sass variables can be overridden by adding to<your_project>/assets/css/main.scss. For instance, to change the accent color used throughout the theme add the following before all@import lines:

$accent-color:tomato;

Customizing JavaScript

To override the default JavaScript bundled in the theme, do one of the following:

  1. Copy directly from the So Simple gem

    • Go to your local So Simple gem installation directory (runbundle show jekyll-theme-so-simple to get the path to it).
    • Copy the contents of/assets/js/main.js from there to<your_project>.
    • Customize what you want inside<your_project>/assets/js/main.js.
  2. Copy from this repo.

    • Copy the contents of/assets/js/main.jsto<your_project>.
    • Customize what you want inside<your_project>/assets/js/main.js.

The theme's/assets/js/main.min.js file is built from jQuery plugins and other scripts found in/assets/js/.

├── assets|  ├── js|  |  ├── lunr                             # Lunr search plugin|  |  |   ├── lunr.xx.js                   # Lunr language plugins|  |  |   ├── ...|  |  |   ├── lunr.min.js|  |  |   └── lunr.stemmer.support.min.js|  |  ├── plugins|  |  |   ├── jquery.smooth-scroll.min.js  # make same-page links scroll smoothly|  |  |   ├── lity.min.js                  # responsive lightbox|  |  |   └── table-of-contents.js         # table of contents toggle|  |  ├── main.js                          # jQuery plugin settings and other scripts|  |  ├── main.min.js                      # concatenated and minified scripts|  |  ├── search-data.json                 # search index used by Lunr

To modify or add your own scripts, include them inassets/js/main.js and then rebuild usingnpm run build:js.See below for more details.

If you add additional scripts to/assets/js/plugins/ and would like them concatenated with the others, be sure to update theuglify script inpackage.json. Same goes for scripts that you remove.

You can also add scripts to the<head> or closing</body> elements by adding paths to the following arrays in_config.yml.

Example:

head_scripts:  -https://code.jquery.com/jquery-3.2.1.min.js  -/assets/js/your-custom-head-script.jsfooter_scripts:  -/assets/js/your-custom-footer-script.js

Note: If you assign paths tofooter_scripts the theme's/assets/js/main.min.js file will be deactivated. This script includes plugins and other scripts that will cease to function unless you specifically add them to thefooter_scripts array.

Font Awesome Icons

The theme utilizes theFont Awesome SVG with JS version for iconography. Prominent locations these icons appear are in the author sidebar and footer links.


Development

To set up your environment to develop this theme:

  1. Clone this repo
  2. cd into/example and runbundle install.

To test the theme locally as you make changes to it:

  1. cd into the root folder of the repo (e.g.jekyll-theme-so-simple).
  2. Runbundle exec rake preview and open your browser tohttp://localhost:4000/example/.

This starts a Jekyll server using the theme's files and contents of theexample/ directory. As modifications are made, refresh your browser to see any changes.

JavaScript Build Script

In an effort to reduce dependencies a set ofnpm scripts are used to buildmain.min.js instead of task runners likeGulp orGrunt. If those tools are more your style then by all means use them instead 😉.

To get started:

  1. Install Node.js.
  2. cd to the root of your project.
  3. Install all of the dependencies by running npm install.

Note: If you upgraded from a previous version of the theme be sure you copied overpackage.json prior to runningnpm install. You may also need to remove yournode_modules directory as well.

If all goes well, executingnpm run build:js will compress/concatenatemain.js and all plugin scripts into/assets/js/main.min.js.

Contributing

Found a typo in the documentation? Requesting a feature orbug fix? Search through the open and closed issues beforesubmitting an issue to avoid duplication.

Pull requests are also appreciated. If this is your first time, it may be helpful to read up on theGitHub Flow.

If your contribution adds or changes the theme's behavior, make sure to update the documentation and/or sample content. Documentation lives in README.md while sample posts, pages, and collections are in thedocs andexample folders.

Pull Requests

When submitting a pull request:

  1. Clone the repo.
  2. Create a branch off ofmaster and give it a meaningful name (e.g.my-awesome-new-feature).
  3. Open a pull request on GitHub and describe what problem it solves.

Credits

Creator

Michael Rose

Icons + Demo Images:

Other:


License

The MIT License (MIT)

Copyright (c) 2013-2019 Michael Rose and contributors

Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, 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 THESOFTWARE.

So Simple incorporatesFont Awesome,Copyright (c) 2017 Dave Gandy.Font Awesome is distributed under the terms of theSIL OFL 1.1andMIT License.

So Simple incorporates photographs fromUnsplash.

So Simple incorporates photographs fromWeGraphics

So Simple incorporatesBreakpoint.Breakpoint is distributed under the terms of theMIT/GPL Licenses.

So Simple incorporatesjQuery Smooth Scroll,Copyright (c) 2017 Karl Swedberg.jQuery Smooth Scroll is distributed under the terms of theMIT License.

So Simple incorporatesLunr,Copyright (c) 2017 Oliver Nightingale.Lunr is distributed under the terms of theMIT License.

So Simple incorporatesLity,Copyright (c) 2015-2016, Jan Sorgalla.Lity is distributed under the terms of the MIT License](http://opensource.org/licenses/MIT).

So Simple incorporatesTable of Contents Toggle,Copyright (c) 2017 Timothy B. Smith.Table of Contents Toggle is distributed under the terms of the MIT License](http://opensource.org/licenses/MIT).

About

A simple Jekyll theme for words and pictures.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors57


[8]ページ先頭

©2009-2025 Movatter.jp