mirror of
https://github.com/maxboeck/webring
synced 2024-11-22 19:33:08 +00:00
basic eleventy setup
This commit is contained in:
parent
095a4cfd74
commit
7b3d56d9f0
11 changed files with 60 additions and 32 deletions
|
@ -6,6 +6,8 @@ module.exports = function(config) {
|
|||
|
||||
config.addLayoutAlias('base', 'base.njk')
|
||||
|
||||
config.addPassthroughCopy('src/assets/images')
|
||||
|
||||
config.addTransform('htmlmin', function(content, outputPath) {
|
||||
if (outputPath.endsWith('.html')) {
|
||||
return htmlMinifier.minify(content, {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import meta from '../src/data/meta'
|
||||
import members from '../src/data/members'
|
||||
import meta from '../../src/data/meta'
|
||||
import members from '../../src/data/members'
|
||||
|
||||
export const redirect = site => {
|
||||
const location = site && site.url ? site.url : meta.url
|
|
@ -1,7 +1,7 @@
|
|||
const gulp = require('gulp')
|
||||
const sass = require('gulp-sass')
|
||||
|
||||
gulp.task('css', function() {
|
||||
gulp.task('styles', function() {
|
||||
return gulp
|
||||
.src('./src/assets/styles/*.scss')
|
||||
.pipe(
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "webring",
|
||||
"version": "1.0.0",
|
||||
"description": "A boilerplate for hosting a webring on github/netlify",
|
||||
"description": "A boilerplate for hosting a webring community",
|
||||
"author": "Max Böck",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
@ -9,10 +9,10 @@
|
|||
"url": "http://github.com/maxboeck/webring"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "gulp build && eleventy serve",
|
||||
"start": "gulp build && eleventy --serve && yarn run serve:lambda",
|
||||
"build": "gulp build && yarn run build:lambda",
|
||||
"serve:lambda": "netlify-lambda serve lambda",
|
||||
"build:lambda": "netlify-lambda build lambda"
|
||||
"serve:lambda": "netlify-lambda serve _lambda",
|
||||
"build:lambda": "netlify-lambda build _lambda"
|
||||
},
|
||||
"dependencies": {
|
||||
"@11ty/eleventy": "^0.8.2",
|
||||
|
|
4
src/assets/styles/main.scss
Normal file
4
src/assets/styles/main.scss
Normal file
|
@ -0,0 +1,4 @@
|
|||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
layout: base
|
||||
---
|
||||
<h1>{{ meta.title }}</h1>
|
18
src/layouts/base.njk
Normal file
18
src/layouts/base.njk
Normal file
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
|
||||
<title>{{ meta.title }}</title>
|
||||
|
||||
<link rel="stylesheet" href="{{ '/assets/styles/main.css' | url }}">
|
||||
</head>
|
||||
<body>
|
||||
{{ content | safe }}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
Loading…
Reference in a new issue