Skip to content

Commit

Permalink
Initial build
Browse files Browse the repository at this point in the history
  • Loading branch information
MattMcAdams committed Jan 16, 2024
1 parent 27f73e1 commit 127d982
Show file tree
Hide file tree
Showing 14 changed files with 2,860 additions and 2 deletions.
52 changes: 52 additions & 0 deletions .eleventy.js
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",
},
};
};;
24 changes: 24 additions & 0 deletions .gitignore
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
48 changes: 46 additions & 2 deletions README.md
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>
&nbsp;&middot;&nbsp;
<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`.
Loading

0 comments on commit 127d982

Please sign in to comment.