Skip to content
Grav plugin to provide a file browser / directory listing for website visitors
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets Update Readme and add screenshots Jun 8, 2019
js Utilise datasets for folders instead of IDs to avoid non-unique IDs Jun 8, 2019
scss Fix responsive height by using flex Jun 8, 2019
templates Utilise datasets for folders instead of IDs to avoid non-unique IDs Jun 8, 2019
.gitignore Initial commit Jun 6, 2019
LICENSE Initial commit Jun 6, 2019 Add installation instructions Jun 10, 2019
blueprints.yaml Update and rearrage configuration options Jun 8, 2019
file-browser.php Initial commit Jun 6, 2019
file-browser.yaml Update and rearrage configuration options Jun 8, 2019
languages.yaml Update and rearrage configuration options Jun 8, 2019
package-lock.json Initial commit Jun 6, 2019
package.json Update deploy command Jun 8, 2019

Grav File Browser Plugin

The File Browser plugin for Grav is a highly-configurable solution for providing visitors with a file browser/directory listing.


The preferred method of installation is via the GPM, which makes it easy to keep the plugin up-to-date.

$ bin/gpm install file-browser

Manual installation

Alternatively, you can download the zip version of this repository, unzip to /your/site/grav/user/plugins and rename directory to file-browser.


By default, the plugin is configured to source files from user://files, which doesn't usually exist and will need to be created. Typically this will resolve to user/files, but if you're using a multi-site setup, it will resolve to user/sites/{site-name}/files.


  • enabled: (bool) Plugin status.
  • built_in_css: (bool) Whether to load the built-in CSS.
  • load_font_awesome: (bool) Whether to load Font Awesome Free.
  • source: (text) URI for file directory (eg. user://files).
  • show_hidden_files: (bool) Whether to show hidden files.
  • default_view: (tile/list) Default view for the file browser.
  • base_to_extend: (text) Twig template to extend (eg. partials/base.html.twig).

Font Awesome Pro

  • use_alt_arrows: (bool) Whether to use fa-arrow-alt-* for navigation controls.
  • icon_weight: (fas/far/fal) Font Awesome variant to use.

File icons

  • file_icon_default: (text) Default icon to use for files.
  • show_thumbnails: (bool) Whether to generate thumbnails.
  • thumbnail_types: (text, comma separated) File types to generate thumbnails for.
  • file_specific_icons: Whether to use specific icons for defined file types.
  • colourise_icons: (bool) Whether to colourise specific icon types.
  • file_icon_types: (list) Font Awesome icon: comma-separated list of extensions (eg. fa-file-video: 'mp4, mov').

Per-page configuration

All configuration options can be overridden on a per-page basis simply by adding the same keys to the template page under a key called file_browser:. For example:

title: Raw Pages
  source: "user://pages"

To Do

  • Build an admin panel for managing files.
  • Make file-specific icon colouring configurable via the config file.
  • Include template for modular pages.
  • Implement shortcode insertion.
  • Add support for sourcing files from outside of Grav.
  • Translations: Please send me pull requests!


MIT license. See LICENSE

You can’t perform that action at this time.