All Projects → agility → agilitycms-eleventy-starter-2020

agility / agilitycms-eleventy-starter-2020

Licence: other
A sample Eleventy starter that uses Agility CMS and aims to be a foundation for building fully static sites using 11ty and Agility CMS.

Programming Languages

Nunjucks
165 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to agilitycms-eleventy-starter-2020

frontenso-11ty-starter
Production-ready 11ty+Gulp+Webpack Starter that features Nunjucks, SASS, TailwindCSS (with JIT complier), and ESNext.
Stars: ✭ 24 (+33.33%)
Mutual labels:  jamstack, 11ty, 11ty-template
11ta-template
Deeply customizable, full-featured, ready to publish blog template built with 11ty, TailwindCSS, & Alpine.js
Stars: ✭ 98 (+444.44%)
Mutual labels:  jamstack, 11ty, 11ty-template
Sourcebit
Sourcebit helps developers build data-driven JAMstack sites by pulling data from any third-party resource
Stars: ✭ 252 (+1300%)
Mutual labels:  jamstack, headless-cms
fernfolio-11ty-template
The super simple portfolio template built with Eleventy and Netlify CMS
Stars: ✭ 64 (+255.56%)
Mutual labels:  jamstack, 11ty
11ty-web-component-generator
Use the power of 11ty to generate web components (custom elements).
Stars: ✭ 51 (+183.33%)
Mutual labels:  11ty, 11ty-template
Ghost
Turn your audience into a business. Publishing, memberships, subscriptions and newsletters.
Stars: ✭ 39,261 (+218016.67%)
Mutual labels:  jamstack, headless-cms
Awesome Jamstack
📔 Curated list of resources: books, videos, articles, speaker decks, tools about using the JAMstack (A modern web development architecture for creating fast, secure and dynamic websites)
Stars: ✭ 115 (+538.89%)
Mutual labels:  jamstack, headless-cms
11up
A utility to create an 11ty site scaffold from one of a number of site templates. Mostly just Phil Hawksworth's regular starting points
Stars: ✭ 25 (+38.89%)
Mutual labels:  jamstack, 11ty
directus-metalsmith-snipcart
Lookbook web app with Directus' open source headless CMS, Metalsmith, Vue.js & Snipcart
Stars: ✭ 14 (-22.22%)
Mutual labels:  jamstack, headless-cms
wp-vercel-deploy-hooks
WordPress Plugin to trigger Vercel deploy hooks on command / update
Stars: ✭ 51 (+183.33%)
Mutual labels:  jamstack, headless-cms
Strapi
🚀 Open source Node.js Headless CMS to easily build customisable APIs
Stars: ✭ 41,786 (+232044.44%)
Mutual labels:  jamstack, headless-cms
nuxt-cockpit
A Tutorial to Bundle Cockpit CMS & Nuxt.js in a full JAMstack
Stars: ✭ 45 (+150%)
Mutual labels:  jamstack, headless-cms
Headlesscms.org
Source for headlesscms.org
Stars: ✭ 628 (+3388.89%)
Mutual labels:  jamstack, headless-cms
Example Company Website Gatsby Sanity Combo
This is an example company website using Gatsby and Sanity in combination.
Stars: ✭ 242 (+1244.44%)
Mutual labels:  jamstack, headless-cms
Ghost Cli
CLI Tool for installing & updating Ghost
Stars: ✭ 313 (+1638.89%)
Mutual labels:  jamstack, headless-cms
plasmic
Visual page builder and web design tool for any website or web app tech stack
Stars: ✭ 1,475 (+8094.44%)
Mutual labels:  jamstack, headless-cms
eleventy-plugin-blog-tools
A collection of shortcodes, filters and tags that make blogging on 11ty more fun
Stars: ✭ 41 (+127.78%)
Mutual labels:  jamstack, 11ty
smix-eleventy-starter
A standards-respecting starter kit for Eleventy. Go Indie.
Stars: ✭ 108 (+500%)
Mutual labels:  jamstack, 11ty
statiq-starter-kontent-lumen
Lumen is a minimal, lightweight, and mobile-first starter for creating blogs using Statiq and Kontent by Kentico.
Stars: ✭ 22 (+22.22%)
Mutual labels:  jamstack, headless-cms
11ty-tailwind-jit
Try editing some Tailwind in this repo while running in dev. It's SO FAST!
Stars: ✭ 17 (-5.56%)
Mutual labels:  jamstack, 11ty

Eleventy + Agility CMS

This is a sample Eleventy starter site that uses Agility CMS and aims to be a foundation for building fully static sites using 11ty and Agility CMS.

Getting Started

This is going to be fun! Let's go!

Agility CMS Account

The first thing you need is a free Agility CMS account. You can get that here 👋. Once you create your Agility CMS account and new project name, come back here 🧐.

Clone the Repo

Now that you've got the content, you need the code!

Go ahead and clone the repo from github: 👇

https://github.com/agility/agilitycms-eleventy-starter-2020.git

Install Dependencies

npm install or yarn install

Normally, this will create 9,999,999,999 files in your node_modules folder. Luckily, we're only gonna create 9,999,999 for this small demo.

YAY! 👏👏👏

Environment Variables

You care about the environment don't you? 🌲🌳🌴🎋

Either way, you're gonna need to grab a few variables from your Agility CMS account. Head over to the API Keys page in Agility CMS (https://manager.agilitycms.com/settings/apikeys) and grab your GUID, and API Keys for Preview and Fetch.

🗄🗄🗄 Copy those into your .env file (rename it from .env.example)

Take Command of the cmd line

We've hooked up some neat commands to make your life easy.

🔥 Local 🔥 Development 🔥

If you want to run the project locally in preview mode, with a hot-reloading server, do this:

npm start or yarn start

Build It and They Will Browse

This is the entire reason for being for 11ty.

Preview Mode

npm run dev or yarn dev

Live or Production Mode

npm run build or yarn build

Wipe The Content 🧽

This example is using the Agility CMS Sync SDK. That content is cached in the node_modules folder. If you want to clear all that out, use this.

npm run cms-clear or yarn run cms-clear

The next time you run the project, the content will be pulled down again.

How this thing works 🤓

This projects uses nunjucks templates, and all the magic happens in the pages folder. Open that thing up and take a peek.

Pages Pages Pages

Agility CMS has the concept of pages and a sitemap. Those obejects are made available in the _data/pages.js data array.

Each page is rendered via the index.njk file, which just splits each page object into its own, er... page :). It also sets the permalink property to the path of the page object. Voila! Our Agility CMS pages are magically routed and rendered.

Layout -> Template -> Modules

Now let's take a look at how the templating works.

Each page uses the layout.njk template for the main html output.

Then, based on the agilitypage.templateFileName property, we load a .njk template file dynamically. In this case we only have the main-template.njk file.

In that template, we set the zoneName parameter and render the modules in the MainContentZone zone.

Each module zone has one or more modules in there, which are in turn rendered by a .njk file. I've put them in the /modules folder, and we've only got a few that are configured in this Agility CMS instance.

Hopefully, you can use the examples in this project to create your own modules.

A well-thought-out project with useful modules can empower your content editors with a set of building blocks for creating and updates the pages of your website.

Collections

This project is a blog template, so we have set of pages that are rendered based on the Posts list. Most of that is configured as a Dynamic Page in Agility CMS, so you don't have to do much to implement it, but you'll notice on the modules/postdetails.njk file that we use a property called agilitypage.dynamicPageItem. That object represents the Blog Post that we are currently rendering.

CSS + JavaScript

Tailwind CSS

To keep things super simple, this project makes use of free and amazing TailwindUI components, and it's all used via a dead simple https://cdn.jsdelivr.net/npm/@tailwindcss/ui@latest/dist/tailwind-ui.min.css file referenced in the header. No post-css or anything, at least not yet.

Alpine.js

We've pulled in a global reference to Alpine.js in the layout template, too. It's being used in a couple places to hide/show the mobile menu and the preview bar.

Want to learn more?

Amazing that you've gotten this far! Keep learning with me (Joel Varty) or the rest of the Agility CMS team.

Join us on Slack to answer questions and provide feedback directly to the team.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].