A couple of minor tweaks and adjustments have been made to better take advantage of Grav features and functionality.
- Fully Responsive layout
- Use header images in articles, if you want to (add tag "image" and url to the image in the front matter section of a post)
- Minimal design
- Featured article support
- FontAwesome implemented for easy use of icons fonts
- Free & Open Source Font usage
Basic Setup for a new Grav site
The simplest way to install Mediator theme for Grav is to download and install the Mediator Skeleton package:
- Download Mediator Skeleton
- Simply unzip the package into your web root folder.
- Point your browser at the folder, job done!
TIP: Check out the general Grav installation instructions for more details on this process.
Existing Grav site
It is possible to install just the theme, but page content will need to reference the Mediator theme's supported templates. It is strongly advised to at least install the Mediator Skeleton package to see the theme's capabilities in action.
To install just the theme:
$ bin/gpm install mediator
Advanced GitHub-based installation
- Download and install Grav
- Create a new sandbox site with:
bin/grav sandbox ~/public_html/mediator
- Clone this repo into the
git clone: https://github.com/getgrav/grav-skeleton-mediator-site ~/public_html/mediator/user
- Install the plugin and theme dependencies:
Most of the configuration of the theme is done in the
title: Mediator description: A Grav theme - Medium inspired taxonomies: [tag, featured] metadata: description: Grav is an easy to use, yet powerful, open source flat-file CMS logo: /user/images/logo.jpg date_long: 'd F Y' date_short: 'd M Y' author: name: Bill Bloggs email: firstname.lastname@example.org image: /user/images/avatar.jpg bio: I'm a blogger and a Grav-lover social: - icon: twitter url: https://twitter.com/getgrav desc: Follow me on twitter share_url: http://twitter.com/share share_title: ?text= share_link: "&url=" - icon: facebook url: https://facebook.com/??? desc: Connect with me facebook share_url: //www.facebook.com/sharer.php share_title: ?t= share_link: "&u=" - icon: github url: https://github.com/getgrav desc: Fork me on github share_url: share_title: share_link: - icon: google-plus url: https://google.com/??? desc: Add me on google+ share_url: share_title: share_link:
Main settings for the site
title: name of your site
description: description of your site
logo: small logo for the site (300x * 300x)
long date: date used in the
short date: date used in the
author name: name site owner
author email: mail address of the site owner
author image: small image of author (300x * 300px)
author bio: short one sentence biography
The template allows to add all major social platforms to your site. Fill the the form for each platform. If you leave the share_* entries empty, the sharing buttons below a post are not shown. If you leave the url and desc empty the icons are not shown on the index page, but the share icons on the article pages remains untouched (Thanks to Phil)
- icon: name of social platform (must match a name of font-awsome icon set )
- url: url of your account
- desc: slogan of the platform
- share_url: share url
- share_title: first part of url for the title
- share_link: second part of the share url for the link to the post
The Twig template engine will magical combine the different parts to a share url.
Supported Page Types
The Mediator theme supports 3 page types via templates:
- default: the template used to display the default blog listing view
- post: a full page of the blog post
- page: similar to the post, but without author information or reading-time
Adding / Changing images on Posts
The title image in a Post is handled in the page's metadata. To include a title image you need to use "Expert" mode when editing a page on Grav Admin panel. Or if you are using an IDE simply edit the header segment of the markdown file.
Then simply add a property for image e.g.
title: 'Your Post" taxonomy: tag: - foo - bar slug: your-post image: your-image.jpg
MIT with no added caveats, so feel free to use this on your site without linking back to me or using a disclaimer or anything silly like that.