Questions tagged [grav]

Grav is a open-source, flat-file, PHP-based CMS.

Key Technologies

  • Twig Templating: for powerful control of the user interface
  • Markdown: for easy content creation
  • YAML: for simple configuration
  • Parsedown: for fast Markdown and Markdown Extra support
  • Doctrine Cache: for performance
  • Pimple Dependency Injection Container: for extensibility and maintainability
  • Symfony Event Dispatcher: for plugin event handling
  • Symfony Console: for CLI interface
  • Gregwar Image Library: for dynamic image manipulation

It's focus is on quick set-up and extensions via plug-ins and themes.

More Information

207 questions
2
votes
2 answers

Scan folder with twig

I am doing my first steps with GRAV CMS and just get in contact with twig (as well my first steps). For my template, I would like to scan a folder and echo each file in it. Usually I would use normal PHP and scandir and foreach but it seems as I…
Julian
  • 121
  • 3
  • 9
2
votes
1 answer

Global Content Block in Grav CMS

I'm using the Grav CMS and would like to have a block of global content present on each page. In other words, every page on the site will have this same block of content (near the footer). I'd like the content of this block to be editable similar to…
Brett DeWoody
  • 59,771
  • 29
  • 135
  • 184
1
vote
2 answers

Exclude plugin css files from frontend assets in Grav

I don't want Grav to include the form-styles.css and the login.css on the frontend assets. Upon research i found out, that they are included to the frontend assets by the login and form plugins, which can't be disabled. Is there a way to exclude…
1
vote
2 answers

Grav markup how to embed youtube video in frontmatter?

I was planning to do something like the following to embed a youtube video into a grav website using frontmatter (the page is currently using only only frontmatter with no entries in the markup file): rows: - title: XYZ …
The amateur programmer
  • 1,238
  • 3
  • 18
  • 38
1
vote
1 answer

Setting up SCSS compilation in a custom theme in Grav CMS

Trying to get to grips with Grav and have created a completely new theme from scratch using (or in my early stages of understanding, basically copying) the bare minimum from the default Quark theme. I have got the base files and folders in place but…
zigojacko
  • 1,983
  • 9
  • 45
  • 77
1
vote
0 answers

PHP: Missing mbstring in pcf

I've been at this all day with no solution. It's easy to run locally, but trying to get this running on Pivotal Cloud Foundry has been a different challenge. I've been trying to get Grav-CMS (https://getgrav.org/) deployed onto PCF. I'm close, but…
McFads
  • 81
  • 7
1
vote
0 answers

Understanding menus and module pages in grav

Maybe I missed something in the documentations of grav. I'm new to grav and it seems a very basic question to me: I'm using a fresh setup of grav, using the quark template. Why does the main menu (home, typography) disappear on module pages? How can…
awado
  • 207
  • 3
  • 10
1
vote
0 answers

Grav import blueprints

I have a question about blueprints import and need some help. i have a partial blueprint (.yaml) file that contains: form: .import_works: label: imported Label type: text default: import default If i import this file into a…
froschler
  • 11
  • 2
1
vote
1 answer

How to Add Header and Footer in Grav CMS

I know how to add content in Grav CMS but i am facing problem in how to add a header section in Grav CMS. Please tell me where do i have to write the code for header and footer. In (.md) files or twig files?
1
vote
1 answer

Permissions issue with Docker, nginx and Grav

I'm trying to set up a simple Grav site workflow using git, Docker and two containers: one for nginx and one for PHP. The idea is to git clone into my Digital Ocean droplet and run docker-compose up -d --build to build and serve the website. I'm…
fbnlsr
  • 130
  • 1
  • 9
1
vote
1 answer

How to add css class to specific text.md file

I’m using Grav modular pages to build a site but can’t find how to target a specific module to add a css class. I have found this https://learn.getgrav.org/16/content/media but can’t see if there’s a way to do this. What I’m trying to achieve is…
J4G
  • 211
  • 5
  • 14
1
vote
1 answer

Add specific button in editor toolbar Grav CMS

How can I add a new button in the editor toolbar in Grav CMS?. For example, the toolbar now contains a bold button, italic button, list button...etc. What I want is to add a new button to this toolbar to do a specific task like "Adding to some…
ASammour
  • 865
  • 9
  • 12
1
vote
1 answer

I have a gallery of images in Grav/Twig and want a few of them to be displayed on homepage but randomly

Currently using page.find('/folder_name').media.images to extract images and setting limit in for loop. But no way to randomize them. And setting limit in for loop is I believe not a good way of doing it. Could anybody help? Here I am asking for…
Aabha Pandey
  • 905
  • 6
  • 10
1
vote
1 answer

Getting error when trying to edit subpage in Grav

Whenever I try to add or edit a subpage (i.e. a child page of the main page), I am getting this error: count(): Parameter must be an array or an object that implements Countable Offending line is:
Bowie
  • 88
  • 9
1
vote
1 answer

Grav CMS links in css

I have a problem with adding the custom fonts in Grav CMS. All fonts are added under the folder path: user/themes/bildxwerkstatt/fonts It works on my computer when I'm adding this code in .css file @font-face { font-family: MullerBlack; src:…
O.Telegin
  • 77
  • 8
1 2
3
13 14