Compare commits

...

No commits in common. "master" and "main" have entirely different histories.
master ... main

12 changed files with 3 additions and 2674 deletions

View File

@ -1,34 +0,0 @@
const markdownIt = require('markdown-it')
const markdownItAnchor = require('markdown-it-anchor')
module.exports = function(eleventyConfig) {
// Copy these static files to _site folder
eleventyConfig.addPassthroughCopy('src/assets')
eleventyConfig.addPassthroughCopy('src/manifest.json')
const md = markdownIt({ html: true, linkify: true })
md.use(markdownItAnchor, {
level: [1, 2],
permalink: markdownItAnchor.permalink.headerLink({
safariReaderFix: true,
class: 'header-anchor',
})
})
eleventyConfig.setLibrary('md', md)
eleventyConfig.setLiquidOptions({
dynamicPartials: false,
strictFilters: false
})
// asset_img shortcode
eleventyConfig.addLiquidShortcode('asset_img', (filename, alt) => {
return `<img class="my-4" src="/assets/img/posts/${filename}" alt="${alt}" />`
})
return {
markdownTemplateEngine: 'liquid',
dir: {
input: 'src',
}
}
}

3
.gitignore vendored
View File

@ -1,6 +1,3 @@
_site/*
# ---> Node
# Logs
logs

3
README.md 100644
View File

@ -0,0 +1,3 @@
# Eleventy-Template
A template for making sites with Eleventy - Meant to be a starter and expandable, but contains some nice-to-haves by default. See the Readme file for more information

2530
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +0,0 @@
{
"name": "eleventy-template",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "npx @11ty/eleventy --serve",
"build": "npx @11ty/eleventy"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@11ty/eleventy": "^2.0.1",
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
"markdown-it": "^14.0.0",
"markdown-it-anchor": "^8.6.7"
}
}

View File

@ -1,23 +0,0 @@
# Eleventy Template by Nexan
This is a template kit for me to potentially use for building barebones sites using Eleventy.
In terms of what functions this will have by default, I plan to have an auto-built Sitemap.xml file, a 404 Page, and a few other things to be determined later.
Files being worked on live in `/src/`, while output will live in `/_site` once built.
Pre-made scripts for NPM include `start` and `build` which run a development version of the site, and build the site for publishing, respectively. More scripts may be added later as I find them useful.
Templating is done in Liquid, pages can be made in any language available to Eleventy, though they will mostly be Markdown or HTML, or a combination of the two.
## How to Use
To make a new page, create a new file in the `/src/` directory, add [Front Matter Data](https://www.11ty.dev/docs/data-frontmatter/) at the top of the file, and start editing.
Pages should, realistically, be either Markdown files ending with `.md` or HTML files ending with `.html` or `.htm`, and content should stay consistent between the two - that is, HTML should stay in HTML files, while Markdown should stay in Markdown files. However, sometimes you may need to put HTML in your Markdown file if you need something more advanced, and Eleventy does allow for that functionality if needed.
By default, pages will generate a folder of the same name containing a single `index.html` file upon building. If you want to change this, add a `permalink:` Front Matter to the page, pointing to a specific file (for an example, see the `sitemap.md` file, which outputs to an XML at the root of the site instead of in a folder)
Anything in the `/assets/` directory will be copied through, including CSS in the `/styles/` directory, and there are a few little bits in `.eleventy.js` that could help with development.
As mentioned above, the `start` script will run a local development server for semi-live code editing, and `build` will build the site for deployment.

View File

@ -1,8 +0,0 @@
{
"name": "Change Me",
"url": "",
"title": "Change Me",
"description": "Welcome to my blog",
"github": "https://git.nexxy.co",
"twitter": ""
}

View File

@ -1,13 +0,0 @@
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title> {{ title }}</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="/assets/styles/style.css" rel="stylesheet" />
</head>
<body>
{{ content }}
</body>
</html>

View File

@ -1,5 +0,0 @@
---
layout: main.liquid
---
# hello, world

View File

@ -1,26 +0,0 @@
{
"name": "Change Me",
"short_name": "Change Me",
"icons": [
{
"src": "/assets/img/favicon/favicon-32x32.png",
"sizes": "32x32",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "/assets/img/favicon/favicon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/assets/img/favicon/favicon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#000",
"background_color": "#fff",
"display": "standalone",
"start_url": ""
}

View File

@ -1,13 +0,0 @@
---
permalink: /sitemap.xml
eleventyExcludeFromCollections: true
---
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for page in collections.all %}
<url>
<loc>{{ site.url }}{{ page.url | url }}</loc>
<lastmod>{{ page.date }}</lastmod>
<changefreq>{{page.data.changeFreq}}</changefreq>
</url>
{% endfor %}
</urlset>