-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
27f73e1
commit 127d982
Showing
14 changed files
with
2,860 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
const fs = require("fs"); | ||
|
||
module.exports = function (eleventyConfig) { | ||
/* ================================================================== | ||
Enable static passthrough | ||
================================================================== */ | ||
eleventyConfig.addPassthroughCopy({ "src/_static/": "/" }); | ||
/* ================================================================== | ||
Override Browsersync defaults (used only with --serve) | ||
================================================================== */ | ||
eleventyConfig.setBrowserSyncConfig({ | ||
callbacks: { | ||
ready: function (err, browserSync) { | ||
const content_404 = fs.readFileSync("dist/404.html"); | ||
|
||
browserSync.addMiddleware("*", (req, res) => { | ||
// Provides the 404 content without redirect. | ||
res.writeHead(404, { "Content-Type": "text/html; charset=UTF-8" }); | ||
res.write(content_404); | ||
res.end(); | ||
}); | ||
}, | ||
}, | ||
ui: false, | ||
ghostMode: false, | ||
}); | ||
/* ================================================================== | ||
RETURN | ||
================================================================== */ | ||
return { | ||
// Control which files Eleventy will process | ||
// e.g.: *.md, *.njk, *.html, *.liquid | ||
templateFormats: ["md", "njk", "html", "liquid"], | ||
|
||
// Pre-process *.md files with: | ||
markdownTemplateEngine: "njk", | ||
|
||
// Pre-process *.html files with: | ||
htmlTemplateEngine: "njk", | ||
|
||
// Opt-out of pre-processing global data JSON files: | ||
dataTemplateEngine: false, | ||
|
||
// Set directories | ||
dir: { | ||
input: "src", | ||
includes: "_includes", | ||
data: "_data", | ||
output: "dist", | ||
}, | ||
}; | ||
};; |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# System Junk | ||
|
||
*.log | ||
.cache | ||
.DS_Store | ||
src/.temp | ||
.env | ||
.env.* | ||
|
||
# Project junk | ||
|
||
node_modules | ||
dist | ||
static/temp | ||
|
||
# Large media | ||
|
||
src/_static/cdn/ | ||
!src/_static/cdn/.gitkeep | ||
# src/_static/images/ | ||
# !src/_static/images/.gitkeep | ||
|
||
# Local Netlify folder | ||
.netlify |
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 |
---|---|---|
@@ -1,2 +1,46 @@ | ||
# webring | ||
A simple webring service / website template | ||
# Webring | ||
|
||
A simple [webring](https://en.wikipedia.org/wiki/Webring) service / website template. Built with [11ty](https://www.11ty.dev/). | ||
|
||
## Rules & Criteria | ||
|
||
Put the criteria for joining your webring here. | ||
|
||
## Join the webring | ||
|
||
To join this webring, you must include a link to the index as well as a pervious and next link on your site. These links must be accessible from your homepage at minimum, but the footer is the best place to put them. | ||
|
||
You may use the code below, or some adaptation of it: | ||
|
||
```html | ||
<p>Part of the <a href="https://example.com">example</a> webring. | ||
<a href="https://example.com?a=prev&ref=YOUR_URL">Previous</a> | ||
· | ||
<a href="https://example.com?a=next&ref=YOUR_URL">Next</a> | ||
</p> | ||
``` | ||
|
||
## For developers | ||
|
||
### Getting Started | ||
|
||
Local development of this project requires npm. | ||
|
||
Create a new repository using this as a template, or fork this repository. Clone and install project dependencies with `npm install`. | ||
|
||
To open the site locally, run `npm run dev`. To build the website for production, run `npm run build`, the site will be built in the "dist" folder. | ||
|
||
### Adding / Removing sites | ||
|
||
To add, remove, or change the order of sites, edit `_data/sites.json`. The structure should match the following: | ||
|
||
```json | ||
[ | ||
{ | ||
"title": "Name", | ||
"url": "https://example.com" | ||
} | ||
] | ||
``` | ||
|
||
If you wish to add to this structure, you'll also need to edit `src/sites.liquid`. |
Oops, something went wrong.