Grav
This article is a stub. You can help the IndieWeb wiki by expanding it.
Grav is an open source flat-file CMS built on PHP, with Twig templating, and YAML + Markdown for storing articles (YAML for metadata, Markdown for the content).
Introduction
Grav uses its filesystem as a database, and heavily relies on caching (filesystem, memcache, redisβ¦)
There's an admin plugin with a nice user-interface which allows to:
- add/edit pages and articles
- configure the whole system and the plugins
- run updates and backups
- clear the cache manually
Grav is not a static site generator, as it handles dynamic operations via plugins using an eventing system. Yet it is not a Wordpress-like CMS that renders all templates on every request, as it caches rendered templates (among others).
As a concept, Grav brings the best of both worlds. But the current implementation is far from scalable (Grav team recommends setups with at max a few thousand pages).
Pros
- Fast setup, amazing documentation
- Nice responsive design
- Many useful plugins
- Multi-language support (url-based differenciation, support for language-based slugs)
Cons
- Dates are not translated
- Not optimized for big websites (1000s of pages), as building collections/taxonomies (categories, tags, events) requires parsing through all of the pages (can be made faster with SSDs, but still requires lots of RAM)
Setup
You can find both the Grav core and a package with the Admin plugin in the downloads section of the Grav site. If you download the package, simply extract it, and point your web server there to be guided through setup.
Sample configuration files are available for nginx, caddy, Apache, IIS and lighttpd.
Updates
Updates can be made through the admin interface (from the main dashboard), or using the command-line tool, from your webroot : bin/gpm selfupgrade
Backups
Although backups are achievable through the web interface, data storage within Grav only relies on files, so making daily backups of your website can be as easy as a cron job running rdiff/rsync for the user/ folder in the webroot.
Indieweb
IndieAuth
Robert van Bregt has created a basic IndieAuth plugin that will inject authentication and token endpoints into your homepage.
Microformats
The default Antimatter theme supports basic microformats2 out-of-the-box. Support for h-feed name and description is available in a fork of the Antimatter theme. The About Me plugin adds additional information, including h-card on the home page and links to your identity in silos and other sites.
Themes and plugins generally provide full instructions for adding either via the command line or through the Grav admin interface.
More microformats
The events plugin has a fork adding microformats (no RSVP support yet).
Open Graph / Twitter Cards
To automatically generate og: and twitter: tags for your pages (can be overriden on a per-page basis), there's the socialmeta plugin.
RSS
OleVik has written a plugin that will display RSS feeds in a Grav site. This can be useful for bringing in content from elsewhere.
Webmention
There is a Webmention plugin marked as "beta", with Vouch support and a published implementation report against the specification.
Jeremy Cherfas: I tried using it and in the end gave up because the data it returned were so inconsistent, depending on the source markup. Tried to get it to use XRay instead but my ability wasn't up to it then.
User:Rosemaryorchard.com is working on an improved plugin.
rel=me
Robert van Bregt has created the Rel Me plugin than can add rel-me links to a site.
Micropub
micropub is not (yet) supported natively or through a plugin. However, it should be feasible to create (a fork of) nanopub. Rosemary Orchard is working on an endpoint plugin in early 2019. Metbril also has a plugin (in progress) to provide basic support for post, reply and bookmark posts.
IndieWeb Examples
Websites running Grav:
Jeremy Cherfas
- Jeremy Cherfas runs Grav as a homepage
- New custom theme launched 2019-10-21
AboutMe plugin forh-card and social links hand coded into templates.- RSS plugin to display stream from WithKnown in sidebar
- Webmentions received with webmention app by Pelle Wessman. See Not giving up on IndieWeb
- Posts tagged with IndieWeb, some of which contain practical information.
Robert van Bregt
- Robert van Bregt has migrated from WordPress to Grav since 2019-01-01.
- Customized Antimatter theme (Microformats)
- IndieAuth plugin and RelMe plugin.
- He is working on a basic Micropub plugin.
- Has not decided on what to use for Webmention, a plugin or external service.
- Jeremy Cherfas notes: Appears to be Jekyll not Grav on 2019-10-26
Max Westen
- Max Westen has migrated from Statamic to Grav since 2019-01-06.
Nikhil Jha
- Nikhil Jha runs his blog with Grav. It accepts and sends Webmentions, but does not display accepted mentions... yet. // Robertvanbregt.nl (talk) 09:08, 23 December 2018 (PST) Your site appears to be running WordPress?
Previous Examples
cmal
- cmal ran Grav as their homepage, in English and French
- about-me plugin for h-card support (not yet translated)
- modified antimatter theme
- Jeremy Cherfas notes: raises a security warning and 503 no service on 2019-10-26
Rosemary Orchard
- Rosemary Orchard ran her primary site on Grav before moving to WordPress