Skip to content

Commit fd20fbc

Browse files
committed
intial commit after cloning
0 parents  commit fd20fbc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+10322
-0
lines changed

.eleventy.js

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
const htmlmin = require("html-minifier");
2+
const markdownIt = require('markdown-it');
3+
const pluginRss = require("@11ty/eleventy-plugin-rss");
4+
5+
const isPages = process.env.ELEVENTY_ENV === 'pages'
6+
const outDir = isPages ? 'docs' : 'public'
7+
8+
module.exports = function (eleventyConfig) {
9+
// PLUGINS
10+
eleventyConfig.addPlugin(pluginRss);
11+
12+
// shortcode to render markdown from string => {{ STRING | markdown | safe }}
13+
eleventyConfig.addFilter('markdown', function(value) {
14+
let markdown = require('markdown-it')({
15+
html: true
16+
});
17+
return markdown.render(value);
18+
});
19+
20+
// rebuild on CSS changes
21+
eleventyConfig.addWatchTarget('./src/_includes/css/');
22+
23+
// Markdown
24+
eleventyConfig.setLibrary(
25+
'md',
26+
markdownIt({
27+
html: true,
28+
breaks: true,
29+
linkify: true,
30+
typographer: true
31+
})
32+
)
33+
34+
//create collections
35+
eleventyConfig.addCollection('sections', async (collection) => {
36+
return collection.getFilteredByGlob('./src/sections/*.md');
37+
});
38+
39+
// STATIC FILES
40+
eleventyConfig.addPassthroughCopy({ './src/static/': '/' });
41+
42+
// TRANSFORM -- Minify HTML Output
43+
eleventyConfig.addTransform("htmlmin", function(content, outputPath) {
44+
if( outputPath && outputPath.endsWith(".html") ) {
45+
let minified = htmlmin.minify(content, {
46+
useShortDoctype: true,
47+
removeComments: true,
48+
collapseWhitespace: true
49+
});
50+
return minified;
51+
}
52+
return content;
53+
});
54+
55+
return {
56+
dir: {
57+
input: 'src',
58+
output: outDir,
59+
data: './_data',
60+
includes: './_includes',
61+
layouts: './_layouts'
62+
},
63+
templateFormats: [
64+
'md',
65+
'njk',
66+
'11ty.js'
67+
],
68+
htmlTemplateEngine: 'njk'
69+
};
70+
};

.github/FUNDING.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: [ttntm]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: ['https://www.buymeacoffee.com/ttntm']

.gitignore

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
.env
2+
public/
3+
4+
# Logs
5+
logs
6+
*.log
7+
npm-debug.log*
8+
yarn-debug.log*
9+
yarn-error.log*
10+
lerna-debug.log*
11+
12+
# Diagnostic reports (https://nodejs.org/api/report.html)
13+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
14+
15+
# Runtime data
16+
pids
17+
*.pid
18+
*.seed
19+
*.pid.lock
20+
21+
# Directory for instrumented libs generated by jscoverage/JSCover
22+
lib-cov
23+
24+
# Coverage directory used by tools like istanbul
25+
coverage
26+
*.lcov
27+
28+
# nyc test coverage
29+
.nyc_output
30+
31+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
32+
.grunt
33+
34+
# Bower dependency directory (https://bower.io/)
35+
bower_components
36+
37+
# node-waf configuration
38+
.lock-wscript
39+
40+
# Compiled binary addons (https://nodejs.org/api/addons.html)
41+
build/Release
42+
43+
# Dependency directories
44+
node_modules/
45+
jspm_packages/
46+
47+
# TypeScript v1 declaration files
48+
typings/
49+
50+
# TypeScript cache
51+
*.tsbuildinfo
52+
53+
# Optional npm cache directory
54+
.npm
55+
56+
# Optional eslint cache
57+
.eslintcache
58+
59+
# Microbundle cache
60+
.rpt2_cache/
61+
.rts2_cache_cjs/
62+
.rts2_cache_es/
63+
.rts2_cache_umd/
64+
65+
# Optional REPL history
66+
.node_repl_history
67+
68+
# Output of 'npm pack'
69+
*.tgz
70+
71+
# Yarn Integrity file
72+
.yarn-integrity
73+
74+
# dotenv environment variables file
75+
.env
76+
.env.test
77+
78+
# parcel-bundler cache (https://parceljs.org/)
79+
.cache
80+
81+
# Next.js build output
82+
.next
83+
84+
# Nuxt.js build / generate output
85+
.nuxt
86+
dist
87+
88+
# Gatsby files
89+
.cache/
90+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
91+
# https://nextjs.org/blog/next-9-1#public-directory-support
92+
# public
93+
94+
# vuepress build output
95+
.vuepress/dist
96+
97+
# Serverless directories
98+
.serverless/
99+
100+
# FuseBox cache
101+
.fusebox/
102+
103+
# DynamoDB Local files
104+
.dynamodb/
105+
106+
# TernJS port file
107+
.tern-port

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
12.18.2

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Tom Doe
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# 11ty-landing-page
2+
3+
A simple landing page built with 11ty and Tailwind CSS.
4+
5+
**Other versions**
6+
7+
- [Astro](https://github.com/ttntm/astro-landing-page)
8+
- [Hugo](https://github.com/ttntm/hugo-landing-page)
9+
10+
## How to use this template
11+
12+
**Requirements:**
13+
14+
1. Eleventy (developed and tested with version 0.12.1)
15+
2. Tailwind CSS
16+
17+
All other dependencies are either linked from a CDN or included in this repository.
18+
19+
**Setup:**
20+
21+
1. Fork, clone or download
22+
2. `cd` into the root folder
23+
3. run `npm install`
24+
4. run `npm run serve`
25+
5. open a browser and go to `http://localhost:8080`
26+
27+
**Basic configuration:**
28+
29+
1. Eleventy -> `./.eleventy.js`
30+
2. Tailwind -> `./tailwind.config.js`
31+
3. Netlify -> `./netlify.toml`
32+
33+
CSS is built via PostCSS and based on `./src/_includes/css/_page.css`. Building CSS gets triggered by `./src/css/page.11ty.js` and Tailwind's config is set to JIT (see: [Tailwind docs](https://tailwindcss.com/docs/just-in-time-mode))
34+
35+
Please note that this CSS build _does not_ include the `normalize.css` file used for the 2 regular pages (imprint, privacy) - a minified production version is stored in `./src/static/css` and gets included in the build by default.
36+
37+
**Change Content:**
38+
39+
Page content is stored in
40+
41+
- `./src/`
42+
- `imprint.md`
43+
- `privacy.md`
44+
- `./src/sections/`
45+
- `./src/_data/features.json`
46+
47+
**Change Templates/Layout:**
48+
49+
Page structure and templates are stored in `./src/_layouts/` and can be edited there.
50+
51+
Best have a look at `./layouts/base.njk` first to understand how it all comes together - the page itself is constructed from partial templates stored in `./src/includes/` and each section has a corresponding template file (`section.**.njk`) stored there.
52+
53+
`index.njk` in `./src/` arranges everything, meaning that sections can be added/re-ordered/removed/... there.
54+
55+
**Change images:**
56+
57+
Images are stored in `./static/img/`; everything in there can be considered a placeholder that should eventually be replaced with your actual production images.

docs/css/normalize.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/css/page.css

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/img/features/icon1.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/img/features/icon2.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/img/features/icon3.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/img/features/icon4.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/img/features/icon5.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/img/features/icon6.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/img/features/icon7.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/img/features/icon8.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/img/github.svg

Lines changed: 4 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)