Giter Site home page Giter Site logo

grav-theme-medium's Introduction

Medium

Medium

Medium is a simple and modern blogging theme based on Medium.com's design language, built for Grav CMS.

Key Features

  • Built using Foundation 6.
  • Responsive and mobile friendly.
  • Lightweight and minimal for optimal performance.
  • Beautiful, legible typography.
  • Super clean and modern design.
  • Support for Disqus comments.
  • Google Analytics built-in.
  • Twitter integration.

Installation

Installing the Medium theme can be done in one of two ways. Our GPM (Grav Package Manager) installation method enables you to quickly and easily install the theme with a simple terminal command, while the manual method enables you to do so via a zip file.

GPM Installation (Recommended)

The simplest way to install this theme is the Grav Package Manager (GPM) through your system's Terminal (also called the command line). From the root of your Grav install type:

bin/gpm install medium

This will install the Medium theme into your /user/themes directory within Grav. Its files can be found under /your/site/grav/user/themes/medium.

Manual Installation

To install this theme, just download the zip version of this repository and unzip it under /your/site/grav/user/themes. Then, rename the folder to medium. You can find these files either on GitHub or via GetGrav.org.

You should now have all the theme files under

/your/site/grav/user/themes/medium

GPM Update

The simplest way to update this theme is via the Grav Package Manager (GPM). You can do this with this by navigating to the root directory of your Grav install using your system's Terminal (also called command line) and typing the following:

bin/gpm update medium

Setup

If you want to set Medium as the default theme, you can do so by following these steps:

  • Navigate to /your/site/grav/user/config.
  • Open the system.yaml file.
  • Change the theme: setting to theme: medium.
  • Save your changes.
  • Clear the Grav cache. The simplest way to do this is by going to the root Grav directory in Terminal and typing bin/grav clear-cache.

Pages Structure

To get your blog up and running, copy the pages folder from /your/site/grav/user/themes/medium/_demo and replace it with /your/site/grav/user/pages. This will help set-up a basic structure of your website using the templates.

Configuration

The Medium theme has a few simple options that help you configure the theme (medium.yaml):

enabled: true
default_lang: en
infinite_scroll: true
analytics: UA-YOURCODE
social:
    twitter: @getgrav

In order to configure Medium, you should copy the theme's medium.yaml file into a file of your own: user/config/themes/medium.yaml and make your modifications there.

Other information

Editing the Theme

  1. In the terminal: cd /your/site/grav/user/themes/medium.
  2. Install NPM dependencies: npm install.
  3. Install Bower dependencies: bower install.
  4. Run Gulp: gulp.
  5. You can edit the SCSS, JS and Images files in the src folder.
  6. You can edit the Twig templates in templates.

Supported plugins

Contributing

Pull requests are the way to go.

Creators

Matthew Blode

License

MIT ยฉ Matthew Blode

grav-theme-medium's People

Contributors

diomed avatar flaviocopes avatar fountainpen avatar jimmysjolund avatar mblode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

grav-theme-medium's Issues

How to activate disqus?

How can I install/enable the disqus plugin, so that readers can comment on my post?

Thanks!

RuntimeException (400)

Hi!
I get this error when upon activation of this theme:

RuntimeException (400) Template "default.html.twig" is not defined.

D:\wamp\www\grav\system\src\Grav\Common\Twig\Twig.php

"Read more" is hardcoded and don't change with translations

I have added Swedish to the languages.yaml and noticed that the link "Read more..." did not translate when changing the language. I found that it's coded in the /templates/partials/post-item.html.twig

Read more...

Is it possible to get it to respond to the different languages supported in the languages.yaml?

Search not working.

Thanks for this nice theme!

I have installed this theme, and the simpleSearch plugin. I then navigate to the home page of the blog, the page appears with a search box at the top-right corner. I enter some text like "install", which is supposed to return an article (I use the demo pages provided by this theme), but it does not.

Here is the error in the browser console in case it's helpful:

screen shot 2018-09-13 at 4 33 17 pm

Any idea?

full width images

Hi

Are there ways (classes) to make images to stretch over the full width of the screen?

Titles font?

Hi Matthew,

Could you tell me which font do you use for titles?
Demo website is down and I'm not sure which one is really used from _settings.scss.

Regards,
Matthieu

Can't use demo data with other templates

Hi!

I use grav one day. I have installed your theme by bin/gpm install medium with demo data and it works fine, but when I change it to another (Antimatter, for example), I see an error:

RuntimeException thrown with message "Template "post.html.twig" is not defined."

Stacktrace:
#9 RuntimeException in /Users/Artyom/domains/gravru/system/src/Grav/Common/Twig/Twig.php:345
#8 Twig_Error_Loader in /Users/Artyom/domains/gravru/vendor/twig/twig/lib/Twig/Loader/Chain.php:115
#7 Twig_Loader_Chain:getCacheKey in /Users/Artyom/domains/gravru/vendor/twig/twig/lib/Twig/Environment.php:312
#6 Twig_Environment:getTemplateClass in /Users/Artyom/domains/gravru/vendor/twig/twig/lib/Twig/Environment.php:378
#5 Twig_Environment:loadTemplate in /Users/Artyom/domains/gravru/vendor/twig/twig/lib/Twig/Environment.php:347
#4 Twig_Environment:render in /Users/Artyom/domains/gravru/system/src/Grav/Common/Twig/Twig.php:334
#3 Grav\Common\Twig\Twig:processSite in /Users/Artyom/domains/gravru/system/src/Grav/Common/Grav.php:186
#2 Grav\Common\Grav:Grav\Common\{closure} in /Users/Artyom/domains/gravru/vendor/pimple/pimple/src/Pimple/Container.php:113
#1 Pimple\Container:offsetGet in /Users/Artyom/domains/gravru/system/src/Grav/Common/Grav.php:288
#0 Grav\Common\Grav:process in /Users/Artyom/domains/gravru/index.php:38

How to fix it?

demo offline

Hi Matthew,

Just a heads up, when clicking the demo on the Grav download page where your theme is listed, it runs an error as the domain is offline.

Great theme by the way! ๐Ÿ‘

Custom theme based on medium theme?

No issues, but a question...

What will happen to the changes in 'src' if I update the theme later? Will they be gone even if I use separate scss/css ? Or, is there a way to use 'medium' theme as base theme for custom theme?

Thank You!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.