Giter Site home page Giter Site logo

utility-belt's Introduction

๐Ÿ›  Utility Belt

A collection of things we use on every Craft CMS site

Features

SEO

Automatically installs ether/seo and creates a default SEO field.

Logs

Automatically installs ether/logs.

Live Preview

Locks the default live preview target to the api/preview Next JS endpoint. Requires the FRONTEND_URL env var.

Revalidator

Adds dynamic Next JS revalidation support. Uses the section URI and any additionally defined revalidate URI's (see a Section settings in Craft CP).
Calls the api/revalidate Next JS endpoint.

Requires the FRONTEND_URL env var.
Requires the REVALIDATE_TOKEN env var, that must match the token on the frontend.

Internal URLs

Converts any absolute internal urls (based off href^=@web) to relative URIs.

Inline SVGs

Assets with the .svg extension will return the contents of the SVG in the svg field on the asset in GraphQL.

Twig Dashboard Widget

A new dashboard widget that renders the given twig template.

Link Field

A simple but powerful link field for creating links to internal elements, external URLs, custom URI's or emails.

Environment Variables

FRONTEND_URL=http://localhost:3000
REVALIDATE_TOKEN=unique-secret-token-shared-with-frontend

utility-belt's People

Contributors

tam avatar jamesedmonston avatar

Stargazers

Sean P. Myrick V19.1.7.2 avatar

Watchers

James Cloos avatar  avatar Alex Collins avatar  avatar  avatar Sean P. Myrick V19.1.7.2 avatar

Forkers

seanpm2001

utility-belt's Issues

Ability to exclude URIs

Jobs on OSE don't have single pages, so every time the feed is run, every entry causes a revalidation error.

Dashboard widgets that include a twig template

In settings, admin users would be able to create new widgets that include a twig template in much the same way as you can in Craft's Field Layout builder.

The widgets you create would then be available to select from the dashboard widget options.

Add twig support to Additional Revalidate URIs

CleanShot 2023-02-08 at 06 29 30

In the case of OSE, we need to be able to clear portfolio pages when a new post is added.
It would probably also need to support ternaries so that it didn't error if there wasn't a related value. Something like:
portfolio/{portfolioCompany|length ? portfolioCompany.one().slug : ''}

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.