https://github.com/whitep4nth3r/mk2-p4nth3rblog
My personal blog site #BuiltWithEleventy.
https://github.com/whitep4nth3r/mk2-p4nth3rblog
contentful eleventy javascript
Last synced: about 1 month ago
JSON representation
My personal blog site #BuiltWithEleventy.
- Host: GitHub
- URL: https://github.com/whitep4nth3r/mk2-p4nth3rblog
- Owner: whitep4nth3r
- License: mit
- Created: 2022-01-21T13:52:51.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-17T08:21:58.000Z (12 months ago)
- Last Synced: 2024-05-17T09:34:09.966Z (12 months ago)
- Topics: contentful, eleventy, javascript
- Language: JavaScript
- Homepage: https://whitep4nth3r.com
- Size: 7.9 MB
- Stars: 38
- Watchers: 2
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://app.netlify.com/sites/mk2-p4nth3rblog/deploys)
# whitep4nth3r.com
This site is built with [Eleventy](https://www.11ty.dev/docs/) and [Netlify](https://netlify.com)
---
## Developing locally
### Install dependencies
```bash
npm install
```### Run the site locally
Use the Netlify CLI to inject environment variables stored against the Netlify site — no local `.env` file needed!
```bash
ntl dev
```## Project structure
---
### `./lib`
Contains all code to fetch and format data from the following sources:
- Contentful
- GitHub
- Twitch---
## `./src`
Directories prefixed with `_` are utility folders, providing global data, layouts, styles, component partials and other
functionality.Other directories (about, blog, talks, topics, uses) act as page-level route directories, resulting
in e.g. `/activity/`, `/talks/` etc in the site build.The site homepage is built from `/src/index.11ty.js`.
---
## Inside page-level route directories
- e.g. `/{name}/index.11ty.js` builds the `/{name}/` route.
- e.g. `/{name}/{name}.11tydata.js` fetches the data that is provided to sibling files.
- e.g. `{name}-pages.11ty.js` creates a collection of files (or dynamic routes) using Eleventy pagination, available on
`/{name}/{dynamic_route}/`---
### `.eleventy.js`
The Eleventy config file:
- loads plugins
- defines how to output files and directories from ./src## Build output
Using `netlify dev`, the site is built to and served from `_site`.