Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
acivitillo committed Dec 21, 2024
0 parents commit 671acb8
Show file tree
Hide file tree
Showing 203 changed files with 13,970 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env-sample
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
URL=http://localhost:8080
36 changes: 36 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build & Deploy

on:
push:
branches: ['main']

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: ['20.11.0']

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install packages
run: npm install

- name: Run npm build
run: npm run build:11ty

- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site # Adjust to your Eleventy output directory
destination_branch: gh-pages # Ensure this branch exists or can be created
force_orphan: true # Optional: Fixes potential branch conflicts
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Node modules
node_modules

# generated files
dist
_site
src/_includes/css
src/_includes/scripts

# cache
.cache

# secret data
.env
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
src/**/*.md
src/_includes/components/**/custom-*.njk
src/common/*
src/_includes/scripts/*
18 changes: 18 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"printWidth": 110,
"tabWidth": 2,
"singleQuote": true,
"bracketSpacing": false,
"quoteProps": "consistent",
"trailingComma": "none",
"arrowParens": "avoid",
"plugins": ["prettier-plugin-jinja-template"],
"overrides": [
{
"files": "*.njk",
"options": {
"parser": "jinja-template"
}
}
]
}
48 changes: 48 additions & 0 deletions LICENSE.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Licenses

Eleventy Excellent is licensed under the ISC License.
This starter includes components that are licensed under the MIT and Apache License.

### ISC License

The **Eleventy Excellent** starter is licensed under the ISC License.
Copyright (c) 2024 Lene Saile

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

### MIT License

The **Cube Boilerplate** is licensed under the MIT License.
Copyright (c) 2024 Set Studio

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

### APACHE LICENSE 2.0

The Font **Clear Sans** is licensed under the Apache License, Version 2.0.
Copyright (c) 2021 Intel

This license allows:

- Commercial use
- Modification
- Redistribution with attribution
- Full license: https://www.apache.org/licenses/LICENSE-2.0
124 changes: 124 additions & 0 deletions eleventy.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
/**
* Most adjustments must be made in `./src/_config/*`
*/

/**
* Configures Eleventy with various settings, collections, plugins, filters, shortcodes, and more.
* Hint VS Code for eleventyConfig autocompletion.
* © Henry Desroches - https://gist.github.com/xdesro/69583b25d281d055cd12b144381123bf
* @param {import("@11ty/eleventy/src/UserConfig")} eleventyConfig -
* @returns {Object} -
*/

// register dotenv for process.env.* variables to pickup
import dotenv from 'dotenv';
dotenv.config();

// add yaml support
import yaml from 'js-yaml';

// config import
import {getAllPosts, onlyMarkdown, tagList} from './src/_config/collections.js';
import events from './src/_config/events.js';
import filters from './src/_config/filters.js';
import plugins from './src/_config/plugins.js';
import shortcodes from './src/_config/shortcodes.js';

export default async function (eleventyConfig) {
eleventyConfig.addWatchTarget('./src/assets/**/*.{css,js,svg,png,jpeg}');
eleventyConfig.addWatchTarget('./src/_includes/**/*.{webc}');

// --------------------- layout aliases
eleventyConfig.addLayoutAlias('base', 'base.njk');
eleventyConfig.addLayoutAlias('page', 'page.njk');
eleventyConfig.addLayoutAlias('post', 'post.njk');
eleventyConfig.addLayoutAlias('tags', 'tags.njk');

// --------------------- Collections
eleventyConfig.addCollection('allPosts', getAllPosts);
eleventyConfig.addCollection('onlyMarkdown', onlyMarkdown);
eleventyConfig.addCollection('tagList', tagList);

// --------------------- Plugins
eleventyConfig.addPlugin(plugins.htmlConfig);
eleventyConfig.addPlugin(plugins.cssConfig);
eleventyConfig.addPlugin(plugins.jsConfig);
eleventyConfig.addPlugin(plugins.drafts);

eleventyConfig.addPlugin(plugins.EleventyRenderPlugin);
eleventyConfig.addPlugin(plugins.EleventyHtmlBasePlugin);
eleventyConfig.addPlugin(plugins.rss);
eleventyConfig.addPlugin(plugins.syntaxHighlight);

eleventyConfig.addPlugin(plugins.webc, {
components: ['./src/_includes/webc/*.webc'],
useTransform: true
});

// --------------------- bundle
eleventyConfig.addBundle('css', {hoist: true});

// --------------------- Library and Data
eleventyConfig.setLibrary('md', plugins.markdownLib);
eleventyConfig.addDataExtension('yaml', contents => yaml.load(contents));

// --------------------- Filters
eleventyConfig.addFilter('toIsoString', filters.toISOString);
eleventyConfig.addFilter('formatDate', filters.formatDate);
eleventyConfig.addFilter('markdownFormat', filters.markdownFormat);
eleventyConfig.addFilter('splitlines', filters.splitlines);
eleventyConfig.addFilter('striptags', filters.striptags);
eleventyConfig.addFilter('shuffle', filters.shuffleArray);
eleventyConfig.addFilter('alphabetic', filters.sortAlphabetically);
eleventyConfig.addFilter('slugify', filters.slugifyString);

// --------------------- Shortcodes
eleventyConfig.addShortcode('svg', shortcodes.svgShortcode);
eleventyConfig.addShortcode('image', shortcodes.imageShortcode);
eleventyConfig.addShortcode('year', () => `${new Date().getFullYear()}`);

// --------------------- Events ---------------------
if (process.env.ELEVENTY_RUN_MODE === 'serve') {
eleventyConfig.on('eleventy.after', events.svgToJpeg);
}

// --------------------- Passthrough File Copy

// -- same path
['src/assets/fonts/', 'src/assets/images/template', 'src/assets/og-images'].forEach(path =>
eleventyConfig.addPassthroughCopy(path)
);

eleventyConfig.addPassthroughCopy({
// -- to root
'src/assets/images/favicon/*': '/',

// -- node_modules
'node_modules/lite-youtube-embed/src/lite-yt-embed.{css,js}': `assets/components/`
});

// --------------------- Build Settings
eleventyConfig.setDataDeepMerge(true);

// --------------------- Deployment Settings
eleventyConfig.setBrowserSyncConfig({
files: './public/static/**/*.css'
});

// --------------------- general config

// const isProduction = process.env.ELEVENTY_ENV === 'production';
// pathPrefix: isProduction ? '/11ty-test/' : '/'

return {
markdownTemplateEngine: 'njk',

dir: {
output: '_site',
input: 'src',
includes: '_includes',
layouts: '_layouts'
}
};
}

20 changes: 20 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[[plugins]]
package = "netlify-plugin-cache"
[plugins.inputs]
paths = [ ".cache" ]


[[headers]]
for = "/*"
[headers.values]
Content-Security-Policy = "upgrade-insecure-requests;"
X-Content-Type-Options = "nosniff"
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
Referrer-Policy = "strict-origin-when-cross-origin"
Permissions-Policy = "autoplay=(), camera=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), publickey-credentials-get=()"


[build]
command = "npm run build"
publish = "_site"
Loading

0 comments on commit 671acb8

Please sign in to comment.