Skip to content

thexmanxyz/Preload-Resources-Gantry

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 

Preload Resources - Atom for Gantry

This project contains a Gantry Atom that provides the functionality to manually define which static resources should be preloaded within the Gantry templating framework. Preload Resource encapsulates the parameterization of <link> tags to control the resource (pre-)loading behaviour. Furthermore, it provides an easy, user friendly and GUI assisted configuration and integration. In the current revision the following CMSs are supported:

  • Joomla
  • Wordpress
  • Grav

Prerequisites

  • CMS (Joomla, Wordpress, Grav)
  • Gantry Templating Framework and Theme - at least v5.4.24

Download

Choose the correct download for your target platform. The Joomla Plugin System is supported for all Gantry themes globally or locally for the templates Helium and Hydrogen. The latest Atom version is v1.0.3.


Default Atom: English / German

Legacy Atom - Gantry <5.3.2: English / German

Joomla Plugin - All Templates (Global): English / German

Joomla Plugin - Hydrogen: English / German

Joomla Plugin - Helium: English / German


Automatic Installation (Joomla only)

  1. Download the Plugin of the Preload Resources Atom for Hydrogen, Helium or Global installation.
  2. Install it over the Joomla Plugin System.

If you install the plugin globally be aware that the resource location changes to /media/gantry5/engines/nucleus

Manual Installation

  1. Download the Default Package of the Preload Resources Atom.
  2. Extract the files.
  3. Copy the .html.twig and the .yaml file to your particle folder /[GANTRY_THEME]/custom/particles. Please check the listing below to determine where the template folder for your CMS is located.

CMS Template Folder

Please be aware that the template folder path varies in dependence of the used CMS. Here is a list of the folders for the different platforms:

Wordpress

/wp-content/themes/[GANTRY_THEME]

Joomla

/templates/[GANTRY_THEME]

Grav

/user/data/gantry5/themes/[GANTRY_THEME]

Configuration

  1. Go to your Gantry templating backend (e.g. Extensions/Templates).
  2. Switch to Page Settings and add the new appearing Atom called Preload Resources either globally to your site (base outline), to a specific template or page by dragging it to the designated section.
  3. Configure the appearance according to your favor.

Supported Parameters and Atom Options

  • Supports multiple <link> tags for preloading of resources
  • Support for the following rel values
    • preload
    • dns-prefetch
    • preconnect
    • prefetch
    • subresource
    • prerender
  • Selective deactivation of resources
  • Options to define resource type, origin and MIME type

Showroom

Insight of the Preload Resources - Gantry Atom configuration:

Backend (1) - General (a)

1

Backend (2) - General (b)

2

Future Tasks

  • [?] Currently no future tasks known.

Known Issues

  • None

Dependencies

Gantry Framework

Credits

Thanks to the Gantry team for providing a modern templating framework.

by thex | gantryprojects

Copyright (c) 2019, free to use in personal and commercial software as per the license.

About

This project contains a Gantry Particle that provides the functionality to manually define which static resources should be preloaded.

Resources

License

Stars

Watchers

Forks

Packages

No packages published