Giter Site home page Giter Site logo

11ty-dynamic-static's Introduction

Dynamic-Static

An static, Eleventy blog, with dynamic markup generated by Cloudflare Workers.

Live Demo

See it in action here

Run this yourself

  1. Clone the repo
git clone [email protected]:jkup/dynamic-static-11ty.git
  1. npm install
npm install
  1. npx eleventy to generate the static site
npx @11ty/eleventy
  1. Set your Worker name in wrangler.toml. It's currently "dynamic-static-11ty" but you can make it anything you want.
  2. Sign up for a Workers account and install the CLI. Instructions can be found here
  3. Wrangler login
wrangler login
  1. Publish your Worker!
wrangler publish

How to do this yourself

  1. Create an empty GitHub repo
  2. Clone the 11ty starter blog into a new folder
git clone https://github.com/11ty/eleventy-base-blog.git your-repo-name
  1. Override the base blog origin to your new repo
git remote set-url origin [email protected]:your/repo.git
  1. Initialize a Wokers Sites project in this repo
wrangler init --site your-repo-name
  1. Open workers-site/index.js
  2. Add any KV Store or HTMLRewriter code you want before it sets headers and returns a response.
  3. Publish to Workers!
wrangler publish

Note: You'll have to run npx eleventy before wrangler publish because wrangler will just grab whatever is currently in _site/.

11ty-dynamic-static's People

Contributors

aboutdavid avatar andersk avatar atlas48 avatar benedfit avatar benjifs avatar clottman avatar davidakennedy avatar denmch avatar dhoman avatar fschoenfeldt avatar j9t avatar jkup avatar kitt avatar krzychukula avatar lonekorean avatar mathiasbynens avatar nhoizey avatar nick-novak avatar nilsmielke avatar onezerodigits avatar plug-n-play avatar shwilliam avatar styfle avatar thedamon avatar uvacoder avatar verlok avatar zachleat avatar

Watchers

 avatar

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.