Convert Figma logo to code with AI

getgrav logograv

Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony

14,531
1,409
14,531
427

Top Related Projects

48,920

:globe_with_meridians: Jekyll is a blog-aware static site generator in Ruby

75,317

The world’s fastest framework for building websites.

16,839

A simpler site generator. Transforms a directory of templates (of varying types) into HTML.

55,199

The best React-based framework with performance, scalability and security built in.

39,168

A fast, simple & powerful blog framework, powered by Node.js.

17,877

A Git-based CMS for Static Site Generators

Quick Overview

Grav is a modern, open-source, flat-file CMS (Content Management System) that makes it easy to create and manage websites. It is designed to be simple, fast, and flexible, making it a popular choice for developers and content creators alike.

Pros

  • Simplicity: Grav's flat-file structure and lack of a database make it easy to set up and manage, even for non-technical users.
  • Performance: Grav's lightweight architecture and caching capabilities result in fast-loading websites.
  • Flexibility: Grav's modular design allows for easy customization and integration with a wide range of plugins and themes.
  • Open-source: Grav is an open-source project, which means it benefits from a large and active community of contributors.

Cons

  • Limited Scalability: Grav may not be the best choice for large, complex websites with high traffic or extensive content management needs.
  • Learning Curve: While Grav is relatively easy to use, it still has a learning curve, especially for users unfamiliar with flat-file CMS systems.
  • Plugin Compatibility: Some Grav plugins may not be as well-maintained or compatible with the latest version of the CMS as users would like.
  • Lack of Enterprise-level Features: Grav may not offer the same level of enterprise-level features and support as some commercial CMS solutions.

Code Examples

N/A (Grav is not a code library)

Getting Started

N/A (Grav is not a code library)

Competitor Comparisons

48,920

:globe_with_meridians: Jekyll is a blog-aware static site generator in Ruby

Pros of Jekyll

  • Larger community and ecosystem with more themes and plugins
  • Seamless integration with GitHub Pages for easy deployment
  • Ruby-based, which may be preferred by some developers

Cons of Jekyll

  • Slower build times for large sites
  • Less flexible content management compared to Grav's hierarchical structure
  • Steeper learning curve for non-technical users

Code Comparison

Jekyll (Liquid template):

{% for post in site.posts %}
  <h2>{{ post.title }}</h2>
  <p>{{ post.excerpt }}</p>
{% endfor %}

Grav (Twig template):

{% for page in pages.children %}
  <h2>{{ page.title }}</h2>
  <p>{{ page.summary }}</p>
{% endfor %}

Both Jekyll and Grav are popular static site generators, but they have different approaches to content management and templating. Jekyll uses Liquid templating and a flat file structure, while Grav employs Twig templating and a hierarchical content structure. Jekyll's tight integration with GitHub Pages makes it an excellent choice for developers familiar with Ruby and looking for easy deployment. On the other hand, Grav offers a more flexible content management system and may be more suitable for complex site structures and non-technical users.

75,317

The world’s fastest framework for building websites.

Pros of Hugo

  • Faster build times, especially for large sites
  • Simpler installation process (single binary)
  • Larger ecosystem with more themes and plugins

Cons of Hugo

  • Steeper learning curve, especially for non-technical users
  • Less flexibility in content organization compared to Grav's modular approach
  • Limited built-in functionality, often requiring additional plugins

Code Comparison

Hugo (Go template):

{{ range .Pages }}
  <h2>{{ .Title }}</h2>
  {{ .Content }}
{{ end }}

Grav (Twig template):

{% for page in pages.children %}
  <h2>{{ page.title }}</h2>
  {{ page.content }}
{% endfor %}

Both Hugo and Grav are popular static site generators, but they have different approaches. Hugo focuses on speed and simplicity, making it ideal for large sites and developers comfortable with Go templates. Grav, built on PHP, offers a more user-friendly interface and greater flexibility in content structure, making it suitable for content-heavy sites and users who prefer a more traditional CMS experience.

Hugo's single binary installation and faster build times are significant advantages for larger projects and teams with technical expertise. However, Grav's modular architecture and intuitive admin panel make it more accessible for non-technical users and provide more built-in functionality out of the box.

16,839

A simpler site generator. Transforms a directory of templates (of varying types) into HTML.

Pros of Eleventy

  • Simpler setup and faster build times
  • More flexible with multiple templating languages support
  • Easier integration with existing JavaScript ecosystems

Cons of Eleventy

  • Less built-in functionality, requiring more custom development
  • Steeper learning curve for non-developers
  • Lacks a built-in admin interface

Code Comparison

Eleventy (JavaScript):

module.exports = function(eleventyConfig) {
  return {
    dir: {
      input: "src",
      output: "dist"
    }
  };
};

Grav (PHP):

<?php
namespace Grav\Theme;

use Grav\Common\Theme;

class CustomTheme extends Theme
{
    // Theme setup
}

Summary

Eleventy is a lightweight static site generator that offers flexibility and speed, making it ideal for developers comfortable with JavaScript. It excels in build performance and integration with modern web development tools.

Grav, on the other hand, is a flat-file CMS that provides a more comprehensive out-of-the-box solution. It includes a user-friendly admin interface and content management features, making it suitable for non-technical users and projects requiring dynamic content.

The choice between Eleventy and Grav depends on the project requirements, team expertise, and desired level of control over the development process.

55,199

The best React-based framework with performance, scalability and security built in.

Pros of Gatsby

  • Built on React, offering a modern JavaScript ecosystem and component-based architecture
  • Extensive plugin system for easy integration of various features and data sources
  • GraphQL for efficient data querying and management

Cons of Gatsby

  • Steeper learning curve, especially for developers new to React and GraphQL
  • Longer build times for large sites, which can slow down development workflow
  • Higher resource consumption compared to static site generators

Code Comparison

Gatsby (React-based):

import React from "react"
import { Link } from "gatsby"

export default function Home() {
  return <Link to="/about/">About</Link>
}

Grav (Twig-based):

<a href="{{ base_url }}/about">About</a>

Key Differences

  • Gatsby is a static site generator using React, while Grav is a flat-file CMS using PHP
  • Gatsby requires a build process to generate static files, whereas Grav renders pages on-the-fly
  • Gatsby uses GraphQL for data management, while Grav relies on YAML-based content files
  • Grav offers a more traditional CMS experience, suitable for non-technical users
  • Gatsby provides better performance for large-scale sites due to its static nature
39,168

A fast, simple & powerful blog framework, powered by Node.js.

Pros of Hexo

  • Faster build times for large sites due to its static site generation approach
  • More extensive plugin ecosystem with a wider range of community-contributed themes and plugins
  • Easier integration with version control systems and continuous deployment pipelines

Cons of Hexo

  • Steeper learning curve for non-developers due to its command-line interface and Node.js environment
  • Less flexibility in content management compared to Grav's flat-file CMS approach
  • Limited built-in multilingual support, requiring additional plugins for comprehensive language handling

Code Comparison

Grav (PHP):

---
title: My Page
---
# Welcome to My Page
{{ page.content }}

Hexo (JavaScript):

---
title: My Page
---
# Welcome to My Page
<%- page.content %>

Both systems use front matter for page metadata, but Grav uses Twig templating while Hexo uses EJS for content rendering. Hexo's static site generation approach results in simpler deployment, while Grav offers more dynamic content capabilities out of the box.

17,877

A Git-based CMS for Static Site Generators

Pros of Decap CMS

  • Integrates seamlessly with static site generators and Git-based workflows
  • Provides a user-friendly interface for content management without requiring technical knowledge
  • Supports a wide range of content types and custom fields

Cons of Decap CMS

  • Requires additional setup and configuration compared to Grav's all-in-one solution
  • May have a steeper learning curve for developers unfamiliar with JAMstack architectures
  • Limited built-in themes and plugins compared to Grav's ecosystem

Code Comparison

Decap CMS configuration (config.yml):

backend:
  name: git-gateway
  branch: main
collections:
  - name: "blog"
    label: "Blog"
    folder: "content/blog"
    create: true
    fields:
      - {label: "Title", name: "title", widget: "string"}
      - {label: "Body", name: "body", widget: "markdown"}

Grav page configuration (blog.md):

---
title: My Blog Post
taxonomy:
    category: blog
    tag: [technology, web]
---

# Blog post content here

Both systems offer unique approaches to content management. Decap CMS focuses on providing a user-friendly interface for static sites, while Grav offers a more traditional flat-file CMS experience with built-in routing and templating.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Grav

PHPStan Discord PHP Tests OpenCollective OpenCollective OpenCollective

Grav is a Fast, Simple, and Flexible, file-based Web-platform. There is Zero installation required. Just extract the ZIP archive, and you are already up and running. It follows similar principles to other flat-file CMS platforms, but has a different design philosophy than most. Grav comes with a powerful Package Management System to allow for simple installation and upgrading of plugins and themes, as well as simple updating of Grav itself.

The underlying architecture of Grav is designed to use well-established and best-in-class technologies to ensure that Grav is simple to use and easy to extend. Some of these key technologies include:

Requirements

Documentation

The full documentation can be found from learn.getgrav.org.

QuickStart

These are the options to get Grav:

Downloading a Grav Package

You can download a ready-built package from the Downloads page on https://getgrav.org

With Composer

You can create a new project with the latest stable Grav release with the following command:

$ composer create-project getgrav/grav ~/webroot/grav

From GitHub

  1. Clone the Grav repository from https://github.com/getgrav/grav to a folder in the webroot of your server, e.g. ~/webroot/grav. Launch a terminal or console and navigate to the webroot folder:

    $ cd ~/webroot
    $ git clone https://github.com/getgrav/grav.git
    
  2. Install the plugin and theme dependencies by using the Grav CLI application bin/grav:

    $ cd ~/webroot/grav
    $ bin/grav install
    

Check out the install procedures for more information.

Adding Functionality

You can download plugins or themes manually from the appropriate tab on the Downloads page on https://getgrav.org, but the preferred solution is to use the Grav Package Manager or GPM:

$ bin/gpm index

This will display all the available plugins and then you can install one or more with:

$ bin/gpm install <plugin/theme>

Updating

To update Grav you should use the Grav Package Manager or GPM:

$ bin/gpm selfupgrade

To update plugins and themes:

$ bin/gpm update

Upgrading from older version

Contributing

We appreciate any contribution to Grav, whether it is related to bugs, grammar, or simply a suggestion or improvement! Please refer to the Contributing guide for more guidance on this topic.

Security issues

If you discover a possible security issue related to Grav or one of its plugins, please email the core team at contact@getgrav.org and we'll address it as soon as possible.

Getting Started

Exploring More

Backers

Support Grav with a monthly donation to help us continue development. [Become a backer]

Supporters

Support Grav with a monthly donation to help us continue development. [Become a supporter]

Sponsors

Support Grav with a yearly donation to help us continue development. [Become a sponsor]

License

See LICENSE

Running Tests

First install the dev dependencies by running composer install from the Grav root.

Then composer test will run the Unit Tests, which should be always executed successfully on any site. Windows users should use the composer test-windows command. You can also run a single unit test file, e.g. composer test tests/unit/Grav/Common/AssetsTest.php

To run phpstan tests, you should run:

  • composer phpstan for global tests
  • composer phpstan-framework for more strict tests
  • composer phpstan-plugins to test all installed plugins