Git Product home page Git Product logo

grav's Introduction

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 [email protected] 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

grav's People

Contributors

bovisp avatar carusogabriel avatar eschmar avatar flaviocopes avatar gertt avatar hugoaf avatar hwmaier avatar jgonyea avatar mahagr avatar mufac avatar nazwa avatar newbthenewbd avatar nicohood avatar olevik avatar pamtbaau avatar perlkonig avatar pierrejoye avatar rhukster avatar ricardo118 avatar rindeal avatar robwent avatar rotzbua avatar ryanmpierson avatar sommerregen avatar stephan-strate avatar toovy avatar viliuss avatar vivalldi avatar w00fz avatar xf- 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grav's Issues

Should children.count() includes pages that are invisible?

Is it possible to get a total count of child pages where visible is "true"? At present the children.count() returns the total number of pages regardless of whether they are visible or not.

One scenario where this maybe useful is when using a navigation menu (that supports drop-downs) and you don't want to include child pages in the drop-drown structure (e.g. blog articles etc.)

Parse error when bin/grav install

git clone grav.git
bin/grav install

Parse error: parse error in /Users/corey/Programs/webroot/grav/system/src/Grav/Console/CleanCommand.php on line 15

Blog Comments?

Does Grav have the features necessary to create a simple comment system to go with a blog?

I'm thinking the upcoming forms plug-in would allow a comment to be entered and then saved as a Markdown file with the appropriate YAML front matter. Perhaps they'd be saved in a folder within the folder holding the parent blog post.

Those files could then be cycled through and displayed much like the blog posts themselves.

Or will it not be that simple and require a plug-in (or plug-ins) to implement?

Compile Error

Than i was try to install at first run i have "Cannot use Tracy\Debugger as Debugger because the name is already in use". I'm sure it's same of my server configure. (CentOS Apache/2.2.15 PHP/5.4.22 )

Composer dependencies in plugins

If I right understand, grav install only can clone plugin from git repos. But now many projects use composer for managing dependencies and autoloading.

I think, must be provided some functionality, which run setup commands for plugins, e.g. composer install.

Thanks.

404 error

Whenever I create a new page and navigate to it on a web browser I get a 404 error and my URL bar shows http://mcpe.w-a-s-d.co.uk/test (the new page is called test) but the folder doesn't exist at the root of my server so I looks to be pointing in the wrong direction ?

Thanks for your help
Josh

pagination.next_url returns wrong URL?

Both on my test site and the Grav blog site, it seems that pagination.next_url is returning the wrong URL. In both cases the lines:

    {% if pagination.hasNext %}
        <li><a href="{{ base_url }}{{ pagination.next_url }}">&raquo;</a></li>
    {% else %}
        <li><span>&raquo;</span></li>
    {% endif %}

in pagination.html.twig will create a link back to /blog, instead of /blog/page:2, under the next page arrow.

Debugger in development mode

Hi,

I'd like to get rid of Tracy bar at production. But it is hard-coded at index.php that debugger is in development mode regardless the configuration:

https://github.com/getgrav/grav/blob/master/index.php

Debugger::enable(Debugger::DEVELOPMENT, is_dir(LOG_DIR) ? LOG_DIR : null);

I can see that at develop branch it is hard-coded the opposite way:

https://github.com/getgrav/grav/blob/develop/index.php

'debugger' => new Debugger(Debugger::PRODUCTION)

I'd suggest to use

Debugger::DETECT

This will use development mode on localhost and production mode on public IP. That is what all of us need, isn't it?
More info: https://github.com/nette/tracy#production-mode-and-error-logging

I wanted to implement it and make a pull request, but I can't make develop branch working on my localhost. It seems to have missing few classes. That's why I rather write this issue.

Questions:

  1. Is it possible to implement DETECT mode?
  2. When you plan to release new version? Develop and master branch are quite different...

Windows problems

Extracting the header from files with windows line endings (CRLF) fails.
It would be great if the respective functions were less strict, e.g. by removing all CR characters before parsing.

Refactor events to use Symfony Event Dispatcher + new event naming

We're are moving to a more powerful event dispatcher system for our eventing. As part of this move we are also going to be changing the names of our events to the following format

on<Object><Action>

This will make things a bit tidier and should scale better with more plugins.

bin/grav install doesn't work

Hi guys.
I have a trouble when installing Grav with Terminal. I clone the repository from Github, and, after then, call the bin/grav install command, but the terminal send me this error:

ERROR Missing .dependencies file in user/ folder
ERROR invalid YAML in .dependencies

I'm doing something wrong?
Thanks :)

Support media directly in markdown syntax

Currently media functionality provides powerful image manipulation. http://learn.getgrav.org/content/media. However it requires twig tags, and twig processing to be enabled for a page. Ideally we would extend parsedown to translate local image references into media calls. This way it would be more readable, and editable in markdown editors, yet still providing the power of our media processing.

![Alt text](image1jpg?forceResize=200,200 "Optional title")

Retina Image Core Ability?

A wonderful feature that might well differentiate Grav from others even more would be the built-in ability to deal with responsive images.

Perhaps if the Markdown markup called for an image in the traditional way, Grav could be smart enough to know the screen resolution of the display and serve the regular, or the @2x image.

Possible?

Submenus possible?

There is no word about submenus - are they possible with the current code?

What Can The Paginator Paginate?

Grav has a paginator plug-in (pagination.php) that will divide "articles' into desecrate pages.

Does it work only with .md files or can it paginate a group of images files that are displayed in a <ul> and individual <li>s?

Using Grav with Google App Engine

Any input on using grav with Google App Engine (GAE), such as how should the app.yaml file look?

Also I get an APC cache error using the problems plugin, I will post more when I get home.

Fatal error, once uploaded on a live host running PHP5.5

I'm sure it's not really a "Grav Issue" or bug, as it runs like a charm locally, but have no idea on why have I a "fatal error" once uploaded.

Context : A basic shared hosting plan (yup, I know, there are better sollutions), but that server running PHP 5.5 and obviously Apache as almost everywhere.

Localhost : on MAMP, the local server, all was just a breeze and worked perfectly.

Remote Host : But ... when I upload my work, or even a full copy of a fresh install of Grav, I have "the non-oject error" as follow :

Fatal error: Call to a member function get() on a non-object in /home/host/www/folder/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php on line 69

PS: Tested also with PHP5.4 on the remote host with the same result.
I hope I'll find a way to make that work as I'm quite enthousiast with Grav and what it can do ... and the huge potential of it for the future.

Install issue

I attempted to install Grav using the ZIP. Running PHP 5.4.26 on webhost. The problem is when I browse to the location all I see is a blank page! Any ideas on what is wrong?

Alternative Templating engines

Loving what I'm reading so far with Grav and think I'd like to use it on a few projects in the near future.

One thing has cropped up that i'd like to know what peoples opinions are on alternative templating engines? Is there scope to swap out Twig for something else if we wished to used a different flavour of constructing our sites maybe?

We use XSLT and XML a lot and it would be great to think some sort of XSLT bridge similar to this: https://github.com/iwyg/xsltbridge which is for Laravel, but could possibly be ported to work with Grav?

Just putting it out there.

Content handling - Backend?

Hi, I'm very pleased with how everything in grav looks so far. Since you guys already said, that the backend might take a while and content management might take even longer or will not be included in the first version of the backend (did I get that right?), I was thinking about writing a preliminary plugin for at least elementary editing with aloha editor or sth similar.
So I'd like to know what the approximate roadmap looks like regarding authentication and authorization? Is the base for user management already set? Will I find everything in the development branch? As far as I can see, the learn docs don't cover that yet...
Best regards and thanks for this project!
J

Twig dynamic cache plugin

One feature I think would be really great to have incorporated into Grav is the ability to cache specific bits of content for defined amounts of time.

https://github.com/asm89/twig-cache-extension

Provides a great twig extension that does just what the doctor ordered. Would be great to create a custom Grav plugin to add this functionality if required.

Changes made to markdown file isn't showing up in the browser.

I know the official documentation recommended LightPaper for editing markdown files, but since I'm not accustomed to it, I tried editing the markdown files using other code editors.

Surprisingly, changes made using those code editor aren't showing up in the browser (Chrome/Firefox), I even tried clearing the browser everytime I'm previewing but the problem persist. The only way to have the browser reflect the changes is by opening and re-saving the markdown files using LightPaper.

Those code editors are:

  • Atom
  • Brackets
  • Dreamweaver
  • Komodo Edit
  • SeaMonkey
  • TextWrangler

Encoding-related issue?

Taxonomies Within Taxonomies?

Say blog posts have categories. And they have tags.

Is there a mechanism in Grav to return all the tags used in a given category?

And a mechanism to return all the posts that have a given category and given tag?

Grav inside Joomla a routing issue

Hello guys,

I've created a folder 'docs' inside joomla so the 'docs' can be accessible through 'www.website.com/docs' but when i hit the url it showing Joomla 404 - url not found page.
screen shot 2014-09-08 at 3 36 24 pm

I've tried to add some rules in nginx server block but no luck. Here is the code:

location /docs/ {
                 root /usr/share/nginx/docs;
                index index.php index.html index.htm;
                try_files $uri $uri/ /index.php?$request_uri;
        }

Any workaround?

Dropbox plugin

I would love to have a dropbox plugin to sync data. There are several key things to consider:

  1. webhook to automatically trigger a sync process
  2. manual method to start sync process
  3. sync from dropbox to grav
  4. sync from grav to dropbox

Native comments plugin

Hi,
Is a native comments feature/plugin is planned ?

Disqus service may no suit all users :

  • privacy issues for the users (why do I have to send my IP to an other service if I just want to interact with this website ?) ;
  • the comments are not hosted on the website (dependencies are not a great gift on the web) ;
  • registration that may keep readers away from commenting.

Actually I really don't want to create a debate about disqus, but just say that "comments stored in grav database" may interest some «old school» users :)

Default theme doesn't render properly with Galaxy Note

Hello,

I've noticed the default theme shipped with grav doesn't fit with the Galaxy Note (GT-N7000) native browser (embedded in Android 4.1.2)

Maybe you have some insights about how to fix the stylesheet for this particular version of the native Android browser?

P.S. : Rendering with Chrome is totally OK!

.htaccess Dependency Issue on IIS

On systems such as IIS and nginx, the .htaccess is not used at all.

However, Grav seems to require a .htaccess file during requirement checking. This can be worked around by adding a dummy .htaccess but really this should be supported natively with IIS semi-officially supported on the documentation.

Plans For Keeping Plug-ins Current?

Grav's plug-in architecture is pretty handy for expanding what Grav does from it's core. But it brings the need to manage those plug-ins, which may be from the Grav team, the website designer, or third parties. And a site may end up with more than several.

Will the future update capability handle that?

Markdown only?

Do I have the option to use HTML syntax in my content files or is markdown the only supported syntax at the moment?

wordpress import ?

Hi,
Is there a way to import wordpress content on Grav ?

I am very interested to switch from WP to this very nice CMS :)
Thanks for your time,
Regards
Tom

Will RocketThemes Develop On Grav?

To what extent does RocketThemes expect to develop on Grav?

I would think that some appropriate client, or in-house, work would serve to speed Grav's development. You know, dog food.

Bob

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.