-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Phil Hawksworth
committed
Jun 13, 2019
1 parent
e9af85a
commit d8661ad
Showing
3 changed files
with
37 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,16 @@ Phil's first port of call when starting another project using Eleventy. | |
|
||
This project scaffold includes: | ||
|
||
- Eleventy with a skeleton site and some configs I use regularly | ||
- A date format filter for Nunjucks | ||
- Sass pipeline | ||
- JS pipeline | ||
- Serverless (FaaS) development pipeline with Netlify Functions for Lambda | ||
- [Eleventy](https://11ty.io) with a skeleton site | ||
- A date format filter for Nunjucks based on [Luxon](https://moment.github.io/luxon) | ||
- A tiny CSS pipeline with PostCSS | ||
- A tiny inline JS pipeline | ||
- JS search index generator | ||
- [Netlify Dev](https://www.netlify.com/products/dev) for testing [Netlify redirects](https://netlify.com/docs/redirects/) | ||
- Serverless (FaaS) development pipeline with [Netlify Dev](https://www.netlify.com/products/dev) and [Netlify Functions](https://www.netlify.com/products/functions) | ||
|
||
|
||
![Eleventy screenshot](./eleventyone-template.png) | ||
![Eleventy screenshot](./eleventyone-template.jpg) | ||
|
||
|
||
## Instructions | ||
|
@@ -32,29 +34,44 @@ Good question. Here's what it will do... | |
3. That's it really. | ||
|
||
|
||
## Local development | ||
## Prerequisites | ||
|
||
To build the site you need: | ||
- [Node and NPM](https://nodejs.org/) | ||
|
||
- [Node](https://nodejs.org) - to run the build | ||
- [Yarn](https://yarnpkg.com) - to install and manage dependencies | ||
## Running locally | ||
|
||
```bash | ||
# install the dependencies | ||
npm install | ||
|
||
# External data sources can be stashed locally | ||
npm run seed | ||
|
||
# It will then be available locally for building with | ||
npm run start | ||
``` | ||
|
||
### Getting started | ||
## Add some Netlify helpers | ||
Netlify Dev adds the ability to use Netlify redirects, proxies, and serverless functions. | ||
|
||
```bash | ||
# install the Netlify CLI in order to get Netlify Dev | ||
npm install -g netlify-cli | ||
|
||
# clone this repository | ||
git clone [email protected]:philhawksworth/eleventyone.git | ||
# run a local server with some added Netlify sugar in front of Eleventy | ||
netlify dev | ||
``` | ||
|
||
# go to the working directory | ||
cd eleventyone | ||
A serverless functions pipeline is included via Netlify Dev. By running `netlify dev` you'll be able to execute any of your serverless functions directly like this: | ||
|
||
# install dependencies | ||
yarn | ||
- [/.netlify/functions/hello](/.netlify/functions/hello) | ||
- [/.netlify/functions/fetch-joke](/.netlify/functions/fetch-joke) | ||
|
||
# start a local build server with hot reloading | ||
yarn start | ||
``` | ||
|
||
### Redirects and proxies | ||
|
||
Netlify's Redirects API can provide friendlier URLs as proxies to these URLs. | ||
|
||
- [/api/hello](/api/hello) | ||
- [/api/fetch-joke](/api/fetch-joke) | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.