From 88765f0964f2f93934cdd11915c6fbba61c5403f Mon Sep 17 00:00:00 2001 From: Horacio Gonzalez Date: Fri, 3 Dec 2021 14:05:19 +0100 Subject: [PATCH] Initial commit --- .eleventy.js | 94 + .eleventyignore | 8 + .esmrc.json | 5 + .github/workflows/main.yml | 27 + .gitignore | 5 + .nvmrc | 1 + .tool-versions | 1 + CONTRIBUTING.md | 88 + LICENSE | 22 + README.md | 65 + _data/README.md | 70 + _data/author.js | 49 + _data/colophon.js | 25 + _data/colors.js | 141 + _data/copyright.js | 28 + _data/labels.js | 38 + _data/links.js | 23 + _data/project.js | 13 + _data/site.js | 87 + _includes/README.md | 5 + _includes/filters/README.md | 5 + _includes/filters/file-to-string.js | 28 + _includes/filters/index.js | 26 + _includes/filters/minify-css.js | 37 + _includes/filters/minify-js.js | 41 + _includes/index.js | 25 + _includes/layouts/README.md | 15 + _includes/layouts/archive.11ty.js | 36 + _includes/layouts/base.11ty.js | 29 + _includes/layouts/episodes.11ty.js | 110 + _includes/layouts/guests.11ty.js | 34 + _includes/layouts/home.11ty.js | 36 + _includes/layouts/page.11ty.js | 30 + _includes/layouts/person.11ty.js | 46 + _includes/layouts/post.11ty.js | 30 + _includes/layouts/team.11ty.js | 34 + _includes/shortcodes/README.md | 5 + _includes/shortcodes/archive.js | 53 + _includes/shortcodes/author-meta.js | 30 + _includes/shortcodes/author.js | 25 + _includes/shortcodes/colophon.js | 29 + _includes/shortcodes/copyright-notice.js | 29 + _includes/shortcodes/css-root.js | 60 + _includes/shortcodes/description.js | 30 + _includes/shortcodes/edit-this-page.js | 26 + _includes/shortcodes/external-css.js | 44 + _includes/shortcodes/favicon.js | 33 + _includes/shortcodes/getting-started.js | 37 + _includes/shortcodes/head-tag.js | 41 + _includes/shortcodes/index.js | 66 + _includes/shortcodes/inline-css.js | 32 + _includes/shortcodes/jumbo.js | 48 + _includes/shortcodes/nav.js | 56 + _includes/shortcodes/page-date.js | 35 + _includes/shortcodes/pagination-nav.js | 84 + _includes/shortcodes/site-footer.js | 31 + _includes/shortcodes/site-header.js | 52 + _includes/shortcodes/social-icons.js | 54 + _includes/shortcodes/social-meta.js | 46 + _includes/shortcodes/team.js | 59 + _includes/shortcodes/title-tag.js | 35 + _includes/transforms/README.md | 5 + _includes/transforms/index.js | 22 + _includes/transforms/minify-html.js | 40 + content/README.md | 24 + content/content.11tydata.js | 18 + content/index.md | 9 + content/pages/pages.11tydata.js | 22 + content/team.11ty.js | 42 + content/team/aurelie_vache.md | 16 + content/team/francois_teychene.md | 16 + content/team/horacio_gonzalez.md | 21 + content/team/philippe_charriere.md | 15 + content/team/pierre_tibulle.md | 17 + content/team/sebastien_blanc.md | 15 + content/team/stephanie_moallic.md | 16 + content/team/team.11tydata.js | 22 + css/forms.css | 8 + css/home.css | 121 + css/index.css | 535 ++ css/pages.css | 9 + css/posts.css | 36 + img/backgrounds/back-01.jpg | Bin 0 -> 259539 bytes img/backgrounds/camping-des-speakers.jpg | Bin 0 -> 44778 bytes img/backgrounds/les-briques-du-web.jpg | Bin 0 -> 353607 bytes img/backgrounds/les-briques-du-web.png | Bin 0 -> 3348790 bytes img/banner.png | Bin 0 -> 1436503 bytes img/deploy-to-netlify-button.svg | 1 + img/favicon-164.png | Bin 0 -> 43969 bytes img/favicon.ico | Bin 0 -> 9662 bytes img/favicon.png | Bin 0 -> 6047 bytes img/guests/angela_ricci.jpg | Bin 0 -> 17237 bytes img/guests/cecile_freyd-foucault.jpg | Bin 0 -> 16667 bytes img/guests/fanny_demey.jpg | Bin 0 -> 42630 bytes img/guests/francois_beaufort.jpg | Bin 0 -> 53142 bytes img/guests/greg_quinio.jpg | Bin 0 -> 15690 bytes img/guests/julie-moynat.jpg | Bin 0 -> 232414 bytes img/guests/laurent_thiebault.jpg | Bin 0 -> 24731 bytes img/guests/shirley.jpeg | Bin 0 -> 32572 bytes img/guests/stephanie_walter.jpeg | Bin 0 -> 42759 bytes img/icons.svg | 131 + img/logos/les-briques-du-web-white-bg.png | Bin 0 -> 189720 bytes img/logos/les-briques-du-web.png | Bin 0 -> 188783 bytes img/logos/logo.png | Bin 0 -> 100285 bytes img/logos/logo.svg | 3892 ++++++++++++ img/logos/logo_color_text.png | Bin 0 -> 42197 bytes img/logos/logo_gray_text.png | Bin 0 -> 149121 bytes img/team/aurelie_vache.jpg | Bin 0 -> 59557 bytes img/team/francois_teychene.jpg | Bin 0 -> 42497 bytes img/team/horacio_gonzalez.jpg | Bin 0 -> 11395 bytes img/team/philippe_charriere.jpg | Bin 0 -> 13903 bytes img/team/pierre_tibulle.jpg | Bin 0 -> 69830 bytes img/team/sebastien_blanc.jpg | Bin 0 -> 25773 bytes img/team/stephanie_moallic.jpg | Bin 0 -> 35913 bytes netlify.toml | 3 + package-lock.json | 7041 +++++++++++++++++++++ package.json | 30 + 117 files changed, 14524 insertions(+) create mode 100644 .eleventy.js create mode 100644 .eleventyignore create mode 100644 .esmrc.json create mode 100644 .github/workflows/main.yml create mode 100644 .gitignore create mode 100644 .nvmrc create mode 100644 .tool-versions create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 _data/README.md create mode 100644 _data/author.js create mode 100644 _data/colophon.js create mode 100644 _data/colors.js create mode 100644 _data/copyright.js create mode 100644 _data/labels.js create mode 100644 _data/links.js create mode 100644 _data/project.js create mode 100644 _data/site.js create mode 100644 _includes/README.md create mode 100644 _includes/filters/README.md create mode 100644 _includes/filters/file-to-string.js create mode 100644 _includes/filters/index.js create mode 100644 _includes/filters/minify-css.js create mode 100644 _includes/filters/minify-js.js create mode 100644 _includes/index.js create mode 100644 _includes/layouts/README.md create mode 100644 _includes/layouts/archive.11ty.js create mode 100644 _includes/layouts/base.11ty.js create mode 100644 _includes/layouts/episodes.11ty.js create mode 100644 _includes/layouts/guests.11ty.js create mode 100644 _includes/layouts/home.11ty.js create mode 100644 _includes/layouts/page.11ty.js create mode 100644 _includes/layouts/person.11ty.js create mode 100644 _includes/layouts/post.11ty.js create mode 100644 _includes/layouts/team.11ty.js create mode 100644 _includes/shortcodes/README.md create mode 100644 _includes/shortcodes/archive.js create mode 100644 _includes/shortcodes/author-meta.js create mode 100644 _includes/shortcodes/author.js create mode 100644 _includes/shortcodes/colophon.js create mode 100644 _includes/shortcodes/copyright-notice.js create mode 100644 _includes/shortcodes/css-root.js create mode 100644 _includes/shortcodes/description.js create mode 100644 _includes/shortcodes/edit-this-page.js create mode 100644 _includes/shortcodes/external-css.js create mode 100644 _includes/shortcodes/favicon.js create mode 100644 _includes/shortcodes/getting-started.js create mode 100644 _includes/shortcodes/head-tag.js create mode 100644 _includes/shortcodes/index.js create mode 100644 _includes/shortcodes/inline-css.js create mode 100644 _includes/shortcodes/jumbo.js create mode 100644 _includes/shortcodes/nav.js create mode 100644 _includes/shortcodes/page-date.js create mode 100644 _includes/shortcodes/pagination-nav.js create mode 100644 _includes/shortcodes/site-footer.js create mode 100644 _includes/shortcodes/site-header.js create mode 100644 _includes/shortcodes/social-icons.js create mode 100644 _includes/shortcodes/social-meta.js create mode 100644 _includes/shortcodes/team.js create mode 100644 _includes/shortcodes/title-tag.js create mode 100644 _includes/transforms/README.md create mode 100644 _includes/transforms/index.js create mode 100644 _includes/transforms/minify-html.js create mode 100644 content/README.md create mode 100644 content/content.11tydata.js create mode 100644 content/index.md create mode 100644 content/pages/pages.11tydata.js create mode 100644 content/team.11ty.js create mode 100644 content/team/aurelie_vache.md create mode 100644 content/team/francois_teychene.md create mode 100644 content/team/horacio_gonzalez.md create mode 100644 content/team/philippe_charriere.md create mode 100644 content/team/pierre_tibulle.md create mode 100644 content/team/sebastien_blanc.md create mode 100644 content/team/stephanie_moallic.md create mode 100644 content/team/team.11tydata.js create mode 100644 css/forms.css create mode 100644 css/home.css create mode 100644 css/index.css create mode 100644 css/pages.css create mode 100644 css/posts.css create mode 100644 img/backgrounds/back-01.jpg create mode 100644 img/backgrounds/camping-des-speakers.jpg create mode 100644 img/backgrounds/les-briques-du-web.jpg create mode 100644 img/backgrounds/les-briques-du-web.png create mode 100644 img/banner.png create mode 100644 img/deploy-to-netlify-button.svg create mode 100644 img/favicon-164.png create mode 100644 img/favicon.ico create mode 100644 img/favicon.png create mode 100644 img/guests/angela_ricci.jpg create mode 100644 img/guests/cecile_freyd-foucault.jpg create mode 100644 img/guests/fanny_demey.jpg create mode 100644 img/guests/francois_beaufort.jpg create mode 100644 img/guests/greg_quinio.jpg create mode 100644 img/guests/julie-moynat.jpg create mode 100644 img/guests/laurent_thiebault.jpg create mode 100644 img/guests/shirley.jpeg create mode 100644 img/guests/stephanie_walter.jpeg create mode 100644 img/icons.svg create mode 100644 img/logos/les-briques-du-web-white-bg.png create mode 100644 img/logos/les-briques-du-web.png create mode 100644 img/logos/logo.png create mode 100644 img/logos/logo.svg create mode 100644 img/logos/logo_color_text.png create mode 100644 img/logos/logo_gray_text.png create mode 100644 img/team/aurelie_vache.jpg create mode 100644 img/team/francois_teychene.jpg create mode 100644 img/team/horacio_gonzalez.jpg create mode 100644 img/team/philippe_charriere.jpg create mode 100644 img/team/pierre_tibulle.jpg create mode 100644 img/team/sebastien_blanc.jpg create mode 100644 img/team/stephanie_moallic.jpg create mode 100644 netlify.toml create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.eleventy.js b/.eleventy.js new file mode 100644 index 0000000..f19909f --- /dev/null +++ b/.eleventy.js @@ -0,0 +1,94 @@ +/** + * @file Configures preferences for Eleventy + * @author Reuben L. Lillie + * @author Horacio Gonzalez + * @see {@link https://www.11ty.dev/docs/config/ 11ty Documentation} + */ + +// Require native Node.js modules +import { readFileSync } from 'fs' + +/** + * Require the includes module for the following. + * + * - Filters (for modifying content on input) + * - Shortcodes (for reusable content) + * - Transforms (for modifying a template’s output) + * + * Storing these modules in separate directories, + * rather than all in this file, + * helps keep the codebase organized—at least that’s the idea. + */ +import includes from './_includes/' + +/** + * 11ty’s configuration module + * @module .eleventy + * @param {Object} eleventyConfig 11ty’s Config API + * @return {Object} 11ty’s Config object optional + * @see {@link https://www.11ty.dev/docs/config/ Configuring 11ty} + */ +export default function (eleventyConfig) { + + // Pass 11ty’s Conig object to the includes module (~/_includes) + includes(eleventyConfig) + + /** + * Combine data in the Eleventy data cascade, rather than overwriting it + * @see {@link https://www.11ty.dev/docs/data-deep-merge/ Data deep merge in 11ty} + */ + eleventyConfig.setDataDeepMerge(true) + + /** + * Copy static assets to the output directory + * @see {@link https://www.11ty.dev/docs/copy/ Passthrough copy in 11ty} + */ + eleventyConfig.addPassthroughCopy('css') + eleventyConfig.addPassthroughCopy('img') + + /** + * Have Eleventy watch the following additional files for live browsersync + * @see @{@link https://www.11ty.dev/docs/config/#add-your-own-watch-targets Add your own watch targets in 11ty} + */ + eleventyConfig.addWatchTarget('./**/*.css') + eleventyConfig.addWatchTarget('./**/*.js') + eleventyConfig.addWatchTarget('./**/*.md') + eleventyConfig.addWatchTarget('./**/*.jpg') + eleventyConfig.addWatchTarget('./**/*.png') + + /** + * Serve the rendered 404 page when using `eleventy --serve` locally + * @see {@link https://www.11ty.dev/docs/quicktips/not-found/#with-serve Adding a 404 page in 11ty} + */ + eleventyConfig.setBrowserSyncConfig({ + callbacks: { + ready: (err, bs) => { + bs.addMiddleware("*", (req, res) => { + const content_404 = readFileSync('_site/404.html'); + // Provides the 404 content without redirect + res.write(content_404); + // Add 404 http status code in request header + // res.writeHead(404, { "Content-Type": "text/html" }) + res.writeHead(404); + res.end() + }) + } + } + }) + + // If you want to use an alternative file structure, + // then you can uncomment this return statement + // and change the values for one or more of these directories + // (defaults shown). + + return { + dir: { + input: '.', + includes: '_includes', + data: '_data', + output: '_site' + }, + pathPrefix: '/', + } + +} diff --git a/.eleventyignore b/.eleventyignore new file mode 100644 index 0000000..bea2aac --- /dev/null +++ b/.eleventyignore @@ -0,0 +1,8 @@ +# Eleventy will not process files or globs listed here +# Put individual file paths or globs on separate lines +# Files listed in .gitignore are automatically ignored +# For more information, see https://www.11ty.dev/docs/ignores/ + +# Ignore all README files +./CONTRIBUTING.md +./**/README.md diff --git a/.esmrc.json b/.esmrc.json new file mode 100644 index 0000000..376c0bc --- /dev/null +++ b/.esmrc.json @@ -0,0 +1,5 @@ +{ + "cjs": { + "dedefault": true + } +} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..0d695f3 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,27 @@ +name: Eleventy Build +on: [push] + +jobs: + build_deploy: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [ 16.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + steps: + - uses: actions/checkout@master + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build --if-present + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + deploy_key: ${{ secrets.RDV_SPEAKERS }} + publish_branch: gh-pages + publish_dir: _site + destination_dir: les-briques-du-web + external_repository: RdvSpeakers/rdv-speakers + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fdb2b53 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +# Ignore installed npm packages +node_modules/ + +# Ignore eleventy output during manual tests +_site/ diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..d9e5892 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +17.1.0 diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..cbe6d2a --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +nodejs 12.16.2 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..58a4057 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,88 @@ +# Contributing + +When contributing to this repository, please first discuss the change you wish to make via issue, +email, or any other method with the owners of this repository before making a change. + +Please note we have a code of conduct, please follow it in all your interactions with the project. + +## Pull Request Process + +1. Ensure any install or build dependencies are removed before the end of the layer when doing a + build. +2. Ensure your work is thoroughly tested, to the best of your abilities +3. You may merge the Pull Request in once you have the sign-off from a maintainer + +## Code of Conduct + +### Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +### Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +### Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +### Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +### Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at reubenlillie@gmail.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +### Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..50f5ebc --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2020 Reuben L. Lillie +Copyright (c) 2021 Horacio Gonzalez + +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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..9b75acd --- /dev/null +++ b/README.md @@ -0,0 +1,65 @@ +# Website for *Le Camping des Speakers* + +🚧 Still a work in progress 🚧 + + +## An [Eleventy](https://11ty.dev/) site + +*[Le Camping des Speakers](https://github.com/RdvSpeakers/camping-des-speakers-website/)* is statically generated from this source code with the [Eleventy](https://11ty.dev/) static site generator using [JavaScript templates (*.11ty.js)](https://11ty.dev/languages/javascript/). + +It's based on [eleventy-dot-js-blog](https://gitlab.com/reubenlillie/eleventy-dot-js-blog) started made by [Reuben L. Lillie](https://twitter.com/reubenlillie). + + +## Getting started + +Run a local copy of this site on your computer. + +Install [Node.js](https://nodejs.org/) on your machine (see [11ty documentation for version requirements](https://www.11ty.dev/docs/getting-started/)). + +Then enter the following commands into your terminal: + +### 1. Clone this repository and all its dependencies + +```cli +git clone git@gitlab.com:reubenlillie/eleventy-dot-js-blog.git my-blog-directory-name +``` + +### 2. Go to the working directory + +```cli +cd my-blog-directory-name +``` +Specifically take a look at the file named [`.eleventy.js`](https://gitlab.com/reubenlillie/eleventy-dot-js-blog/-/blob/master/.eleventy.js) to see if you want to [configure any Eleventy options differently](https://www.11ty.dev/docs/config/). + +### 3. Install the project dependencies with [NPM](https://www.npmjs.com/) + +```cli +npm install +``` + +### 4. Edit the `.js` files in the [`_data`](https://gitlab.com/reubenlillie/eleventy-dot-js-blog/-/blob/master/_data/site.js) directory with your site information + +### 5. Run Eleventy + +```cli +npx eleventy +``` + +Or build and host locally for local development + +```cli +npx eleventy --serve +``` + +Or build automatically when a template changes + +```cli +npx eleventy --watch +``` + +Or in debug mode + +```cli +DEBUG=* npx eleventy +``` +© 2021 by [Horacio Gonzalez](https://twitter.com/LostInBrittany) diff --git a/_data/README.md b/_data/README.md new file mode 100644 index 0000000..698ab1f --- /dev/null +++ b/_data/README.md @@ -0,0 +1,70 @@ +# Site web des Briques du Web + + +## An [Eleventy](https://11ty.dev/) site + +*[drowstar.com](https://drowstar.com)* is statically generated from this source code with the [Eleventy](https://11ty.dev/) static site generator using [JavaScript templates (*.11ty.js)](https://11ty.dev/languages/javascript/). + +It's based on [eleventy-dot-js-blog](https://gitlab.com/reubenlillie/eleventy-dot-js-blog) started made by [Reuben L. Lillie](https://twitter.com/reubenlillie). + + +## Getting started + +Run a local copy of this site on your computer. + +Install [Node.js](https://nodejs.org/) on your machine (see [11ty documentation for version requirements](https://www.11ty.dev/docs/getting-started/)). + +Then enter the following commands into your terminal: + +### 1. Clone this repository and all its dependencies + +```cli +git clone git@gitlab.com:reubenlillie/eleventy-dot-js-blog.git my-blog-directory-name +``` + +### 2. Go to the working directory + +```cli +cd my-blog-directory-name +``` +Specifically take a look at the file named [`.eleventy.js`](https://gitlab.com/reubenlillie/eleventy-dot-js-blog/-/blob/master/.eleventy.js) to see if you want to [configure any Eleventy options differently](https://www.11ty.dev/docs/config/). + +### 3. Install the project dependencies with [NPM](https://www.npmjs.com/) + +```cli +npm install +``` + +### 4. Edit the `.js` files in the [`_data`](https://gitlab.com/reubenlillie/eleventy-dot-js-blog/-/blob/master/_data/site.js) directory with your site information + +### 5. Run Eleventy + +```cli +npx eleventy +``` + +Or build and host locally for local development + +```cli +npx eleventy --serve +``` + +Or build automatically when a template changes + +```cli +npx eleventy --watch +``` + +Or in debug mode + +```cli +DEBUG=* npx eleventy +``` + +## Publish your own copy + +The command `npm run build` will generate a copy of the site files in a `_site` directory, which you can deploy with any hosting service. + +[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com.com/LostinBrittany/drowstar-com) + +© 2021 by [Horacio Gonzalez](https://twitter.com/LostInBrittany) diff --git a/_data/author.js b/_data/author.js new file mode 100644 index 0000000..1ae0c9e --- /dev/null +++ b/_data/author.js @@ -0,0 +1,49 @@ +/** + * @file Contains global data about the site author + * @author Reuben L. Lillie + * @author Horacio Gonzalez + */ + +// Edit the values for the properties in this file to fit your site. +// You can add as many new properties as you want, +// but you shouldn’t remove any of the ones already included here +// without also editing the files where those properties are used. +// Otherwise, the site will probably break. + +/** + * Global author data module + * @module _data/author + * @see {@link https://www.11ty.dev/docs/data-global/ Global data files in 11ty} + */ +export default { + name: { + fullName: 'Horacio Gonzalez', + givenName: 'Horacio', + surname: 'Gonzalez' + }, + social: { + // Add or remove accounts for social media platforms + accounts: [ + { + name: 'GitHub', + url: 'https://github.com/LostInBrittany/' + }, + { + name: 'GitLab', + url: 'https://gitlab.com/LostInBrittany/' + }, + { + name: 'Instagram', + url: 'https://www.instagram.com/LostInBrittany/' + }, + { + name: 'LinkedIn', + url: 'https://linkedin.com/in/horaciogonzalez/' + }, + { + name: 'Twitter', + url: 'https://twitter.com/LostInBrittany/' + } + ] + } +} diff --git a/_data/colophon.js b/_data/colophon.js new file mode 100644 index 0000000..b35ac60 --- /dev/null +++ b/_data/colophon.js @@ -0,0 +1,25 @@ +/** + * @file Contains global data for the site colophon + * @author Reuben L. Lillie + * @author Horacio Gonzalez + */ + +// Edit the values for the properties in this file to fit your site. +// You can add as many new properties as you want, +// but you shouldn’t remove any of the ones already included here +// without also editing the files where those properties are used. +// Otherwise, the site will probably break. + +/** + * Global colophon data module + * @module _data/colophon + * @see {@link https://www.11ty.dev/docs/data-global/ Global data files in 11ty} + */ +export default { + fr: { + generator: '🏗️ Créé por @LostInBrittany', + languages: 'Code source écrit en 🍦 vanilla JavaScript, 🕸️ HTML semantique, 🎨 CSS progressivement améliorée, et 🧂 un soupçon de Markdown.', + git: '💝 Basé dans le eleventy-dot-js-blog starter pour 🕚 Eleventy, le générateur de sites statiques.', + host: '🚀 Hébérgé sur GitHub Pages' + } +} diff --git a/_data/colors.js b/_data/colors.js new file mode 100644 index 0000000..47a2a9a --- /dev/null +++ b/_data/colors.js @@ -0,0 +1,141 @@ +/** + * @file Contains global data for color values + * @author Reuben L. Lillie + * @author Horacio Gonzalez + */ + +// Edit the values for the properties in this file to fit your site. +// You can add as many new properties as you want, +// but you shouldn’t remove any of the ones already included here +// without also editing the files where those properties are used. +// Otherwise, the site will probably break. + +/** + * Global site data module + * @module _data/colors + * @see {@link https://www.11ty.dev/docs/data-global/ Global data files in 11ty} + */ +export default { + /* + * Colors generated around the named color, plum velvet + * @see {@link https://convertingcolors.com/hex-color-7D0552.html?search=Hex(7d0552) Converting Colors} + */ + grayscale: { + white: { + hex: '#fff', + rgb: '255,255,255' + }, + 100: { + hex: '#e6e6e6', + rgb: '230,230,230' + }, + 200: { + hex: '#ccc', + rgb: '204,204,204' + }, + 300: { + hex: '#b3b3b3', + rgb: '179,179,179' + }, + 400: { + hex: '#999', + rgb: '153,153,153' + }, + 500: { + hex: '#808080', + rgb: '128,128,128' + }, + 600: { + hex: '#666', + rgb: '102,102,102' + }, + 700: { + hex: '#323232', + rgb: '828282' + }, + 800: { + hex: '#333', + rgb: '515151' + }, + 900: { + hex: '#1a1a1a', + rgb: '26,26,26' + } + }, + main: { + 100: { + hex: '#fdceec', + rgb: '253,206,236' + }, + 200: { + hex: '#fb9dd9', + rgb: '251,157,217' + }, + 300: { + hex: '#f96cc7', + rgb: '249,108,199' + }, + 400: { + hex: '#f73bb4', + rgb: '247,59,180' + }, + 500: { + hex: '#f50aa1', + rgb: '245,10,161' + }, + 600: { + hex: '#c40881', + rgb: '196,8,129' + }, + 700: { + hex: '#7d0552', + rgb: '125,5,82' + }, + 800: { + hex: '#620440', + rgb: '984,4,64' + }, + 900: { + hex: '#310220', + rgb: '49,2,32' + } + }, + accent: { + 100: { + hex: '#decefc', + rgb: '222,206,253' + }, + 200: { + hex: '#be9dfb', + rgb: '190,157,251' + }, + 300: { + hex: '#9d6cf9', + rgb: '157,108,249' + }, + 400: { + hex: '#7d3bf7', + rgb: '125,59,247' + }, + 500: { + hex: '#5c0af5', + rgb: '92,10,245' + }, + 600: { + hex: '#4a08c4', + rgb: '74,8,196' + }, + 700: { + hex: '#2f057d', + rgb: '47,5,125' + }, + 800: { + hex: '#250462', + rgb: '37,4,98' + }, + 900: { + hex: '#120231', + rgb: '18,2,49' + } + } +} diff --git a/_data/copyright.js b/_data/copyright.js new file mode 100644 index 0000000..a4b0eb7 --- /dev/null +++ b/_data/copyright.js @@ -0,0 +1,28 @@ +/** + * @file Contains global copyright data + * @author Reuben L. Lillie + * @author Horacio Gonzalez + */ + +// Edit the values for the properties in this file to fit your site. +// You can add as many new properties as you want, +// but you shouldn’t remove any of the ones already included here +// without also editing the files where those properties are used. +// Otherwise, the site will probably break. + +/** + * Global copyright data module + * @module _data/copyright + * @see {@link https://www.11ty.dev/docs/data-global/ Global data files in 11ty} + * @see {@link https://creativecommons.org/ Creative Commons} + */ +export default { + // Use current year + year: new Date().getFullYear(), + holder: 'LostInBrittany', + license: { + abbr: 'CC BY-SA', + name: 'Creative Commons Attribution-ShareAlike 4.0 International license', + }, + url: 'https://creativecommons.org/licenses/by-sa/4.0/' +} diff --git a/_data/labels.js b/_data/labels.js new file mode 100644 index 0000000..cd32384 --- /dev/null +++ b/_data/labels.js @@ -0,0 +1,38 @@ +/** + * @file Contains global data about the chronicles + * @author Horacio Gonzalez + */ + +// Edit the values for the properties in this file to fit your site. +// You can add as many new properties as you want, +// but you shouldn’t remove any of the ones already included here +// without also editing the files where those properties are used. +// Otherwise, the site will probably break. + +/** + * Clobal data about the chronicles + * @module _data/chronicles + * @see {@link https://www.11ty.dev/docs/data-global/ Global data files in 11ty} + */ + export default { + meteo_du_web: { + name: "La Météo du Web", + emoji: "☀️", + }, + entretien: { + name: "L'Entretien", + emoji: "🎙️", + }, + focus_api: { + name: "Le Focus API", + emoji: "⁉️", + }, + weekly_project: { + name:"Le Projet de la Semaine", + emoji: "🛠️", + }, + anecdocte_historique: { + name: "L'Anecdote Historique", + emoji: "📜", + } +} diff --git a/_data/links.js b/_data/links.js new file mode 100644 index 0000000..d46785c --- /dev/null +++ b/_data/links.js @@ -0,0 +1,23 @@ +/** + * @file Contains global data about the links + * @author Horacio Gonzalez + */ + +// Edit the values for the properties in this file to fit your site. +// You can add as many new properties as you want, +// but you shouldn’t remove any of the ones already included here +// without also editing the files where those properties are used. +// Otherwise, the site will probably break. + +/** + * Clobal data about the chronicles + * @module _data/chronicles + * @see {@link https://www.11ty.dev/docs/data-global/ Global data files in 11ty} + */ + export default { + anchor: 'https://anchor.fm/les-rdv-des-speakers', + twitter: 'https://twitter.com/LesBriquesDuWeb', + youtube: 'https://www.youtube.com/watch?v=m-i8f-a6K4Y&list=PLEkzErZ5n2i610Wmi2tstCoTdhKyJafqY', + spotify: 'https://open.spotify.com/show/2OKbLLelv3Q2hVZsQnBW2u?si=QdRSoGPZRXqtmVNv3pa9ew', + apple_podcasts: 'https://podcasts.apple.com/nl/podcast/le-rendez-vous-des-speakers/id1559843293?l=en' +} diff --git a/_data/project.js b/_data/project.js new file mode 100644 index 0000000..319c967 --- /dev/null +++ b/_data/project.js @@ -0,0 +1,13 @@ +/** + * @file Exposes environment variables to templates + * @author Reuben L. Lillie + */ + +/** + * Uses Node.js’s `process.env` property + * @module _data/project + * @see {@link https://www.11ty.dev/docs/data-js/#example-exposing-environment-variables Environment variables in 11ty} + */ +export default { + environment: process.env.ELEVENTY_ENV +} diff --git a/_data/site.js b/_data/site.js new file mode 100644 index 0000000..a1ef609 --- /dev/null +++ b/_data/site.js @@ -0,0 +1,87 @@ +/** + * @file Contains global data for configuring the site + * @author Reuben L. Lillie + * @author Horacio Gonzalez + */ + +// Edit the values for the properties in this file to fit your site. +// You can add as many new properties as you want, +// but you shouldn’t remove any of the ones already included here +// without also editing the files where those properties are used. +// Otherwise, the site will probably break. + +/** + * Global site data module + * @module _data/site + * @see {@link https://www.11ty.dev/docs/data-global/ Global data files in 11ty} + */ +export default { + // The root for the site domain (without a trailing slash) + baseUrl: 'https://camping-speakers.fr', + pathPrefix: '', + // Uses this locale when one is not set in content/content.11tydata.js + defaultLocale: 'fr', + // Localized strings and other options for Spanish (es) + // To add a language, copy this object, then change the values + logo: { + url: 'img/logos/logo_color_text.png' + }, + fr: { + title: 'Le Camping des Speakers', + // French as used in France + locale: 'fr', + // The subtitle, slogan, or catchphrase for your site, + // used in _includes/shortcodes/site-header + tagline: "Conférence de Devs dans le Golfe du Morbihan", + when: "9-10 Juin 2022", + // Punctuation between a title and subtitle, + // used in _includes/shortcodes/title-tag + separator: ' - ', + // The link text for skip-to-content lins, used by screen readers + skipToContent: 'Aller au contenu', + // The link text to invite users to edit a page in the project Git repository + // Link path stored in package.json + editThisPage: '📝 Éditer la page', + // The paged navigation for larger archives of content + // used in _includes/shortcodes/pagination-nav + pagination: { + // The aria-label for a pagination navigation + navLabel: 'Pagination', + // The aria-label for pages within a pagination navigation + pageLabel: 'Page', + // The link text for the first page within a pagination navigation + first: '1', + // The aria-label for the first page within a pagination navigation + firstLabel: '1', + // The link text for the previous page within a pagination navigation + previous: 'Précédente', + // The link text for the next page within a pagination navigation + next: 'Suivante', + // The link text for the last page within a pagination navigation + last: 'Dernière', + // The aria-label for the last page within a pagination navigation + lastLabel: 'Dernière page' + }, + team: { + url: 'team', + }, + guests: { + url: 'guests', + }, + /* + * Options for displaying dates in this locale + * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString `toLocaleDateString()` on MDN} + */ + dateOptions: { + year: 'numeric', + month: 'long', + day: 'numeric', + timeZone: 'UTC' + }, + // Options for navigation elements + nav: { + // The `aria-label` to apply to the primary navigation + primary: 'primary navigation' + }, + }, +} diff --git a/_includes/README.md b/_includes/README.md new file mode 100644 index 0000000..b1730a9 --- /dev/null +++ b/_includes/README.md @@ -0,0 +1,5 @@ +# eleventy-dot-js-blog/\_includes + +In Eleventy, the [includes directory](https://www.11ty.dev/docs/config/#directory-for-includes) is meant for reusable layouts and other extentions. Templates can use these files, but the files themselves will not be processed by Eleventy as templates. + +The [`index.js`](https://gitlab.com/reubenlillie/eleventy-dot-js-blog/-/blob/master/_includes/index.js) file here is used to configure modules in this directory with Eleventy (in [`.eleventy.js`](https://gitlab.com/reubenlillie/eleventy-dot-js-blog/-/blob/master/.eleventy.js)). diff --git a/_includes/filters/README.md b/_includes/filters/README.md new file mode 100644 index 0000000..bda0e81 --- /dev/null +++ b/_includes/filters/README.md @@ -0,0 +1,5 @@ +# eleventy-dot-js-blog/\_includes/filters + +In Eleventy, [filters](https://www.11ty.dev/docs/filters/) can modify content before templates are processed. They are accessible in templates via the keyword `this`. + +The [`index.js`](https://gitlab.com/reubenlillie/eleventy-dot-js-blog/-/blob/master/_includes/filters/index.js) file here is used to configure filters in this directory with Eleventy (in [`.eleventy.js`](https://gitlab.com/reubenlillie/eleventy-dot-js-blog/-/blob/master/.eleventy.js), loaded in [`_includes/index.js`](https://gitlab.com/reubenlillie/eleventy-dot-js-blog/-/blob/master/_includes/index.js)). diff --git a/_includes/filters/file-to-string.js b/_includes/filters/file-to-string.js new file mode 100644 index 0000000..109ecf9 --- /dev/null +++ b/_includes/filters/file-to-string.js @@ -0,0 +1,28 @@ +/** + * @file Defines a filter to convert a file’s contents to a string + * @author Reuben L. Lillie + */ + +/* + *Import Node.js native fs module for interacting with the file system + */ +import { readFileSync } from 'fs' + +/** + * An Eleventy filter for stringifying a file + * @module _includes/filters/file-to-string + * @param {Object} eleventyConfig 11ty’s Config API + * @see {@link https://www.11ty.dev/docs/languages/javascript/#javascript-template-functions JavaScript template functions in 11ty} + */ +export default eleventyConfig => + + /** + * Converts a file’s contents to a string + * @param {String} file The path of the file to convert + * (relative to the input directory) + * @return {String} The file’s contents + * @example `${this.fileToString('css/inline.css')}` + */ + eleventyConfig.addFilter('fileToString', file => + readFileSync(`${file}`).toString() + ) diff --git a/_includes/filters/index.js b/_includes/filters/index.js new file mode 100644 index 0000000..03317ca --- /dev/null +++ b/_includes/filters/index.js @@ -0,0 +1,26 @@ +/** + * @file Imports filters and configures them with 11ty (.eleventy.js) + * @author Reuben L. Lillie + */ + +// Import filters to include +import fileToString from './file-to-string.js' +import minifyCSS from './minify-css.js' +import minifyJS from './minify-js.js' + +/** + * A loader module for filters + * @module _includes/filters + * @param {Object} eleventyConfig 11ty’s Config API + * @see {@link https://www.11ty.dev/docs/config/ Configuring 11ty} + * @see {@link https://www.11ty.dev/docs/filters/ Filters in 11ty} + */ +export default function (eleventyConfig) { + + // Function calls to filters to include + fileToString(eleventyConfig) + minifyCSS(eleventyConfig) + minifyJS(eleventyConfig) + + return +} diff --git a/_includes/filters/minify-css.js b/_includes/filters/minify-css.js new file mode 100644 index 0000000..3a29f50 --- /dev/null +++ b/_includes/filters/minify-css.js @@ -0,0 +1,37 @@ +/** + * @file Defines a filter to minify CSS inline + * @author Reuben L. Lillie + */ + +/* + * Import Jakup Pawlowicz’s Clean-CSS module + * @see {@link https://github.com/jakubpawlowicz/clean-css GitHub} + */ +import CleanCSS from 'clean-css' + +/** + * An Eleventy filter for minifying CSS inline + * @module _includes/filters/minify-css + * @param {Object} eleventyConfig 11ty’s Config API + * @see {@link https://www.11ty.dev/docs/languages/javascript/#javascript-template-functions JavaScript template functions in 11ty} + */ +export default eleventyConfig => + + /** + * Minifies CSS + * @param {String} stylesheet A raw stylesheet + * @return {String} The minified stylesheet + * @example `${this.minifyCSS($this.fileToString('css/inline.css'))}` + * @see {@link https://github.com/jakubpawlowicz/clean-css#minify-method clean-css on GitHub} + * @see {@link https://www.11ty.dev/docs/data-js/#example-exposing-environment-variables Environment variables in 11ty} + */ + eleventyConfig.addFilter('minifyCSS', stylesheet => { + + // Only minify stylesheets for production + if(process.env.ELEVENTY_ENV === 'production') { + var minified = new CleanCSS({}).minify(stylesheet).styles + return minified + } + + return stylesheet + }) diff --git a/_includes/filters/minify-js.js b/_includes/filters/minify-js.js new file mode 100644 index 0000000..f530616 --- /dev/null +++ b/_includes/filters/minify-js.js @@ -0,0 +1,41 @@ +/** + * @file Defines a filter to minify JavaScript inline + * @author Reuben L. Lillie + */ + +/* + * Import Terser module + * @see {@link https://github.com/terser-js/terser GitHub} + */ +import Terser from 'terser' + +/** + * An Eleventy filter for minifying JavaScript inline + * @module _includes/filters/minify-js + * @param {Object} eleventyConfig 11ty’s Config API + * @see {@link https://www.11ty.dev/docs/languages/javascript/#javascript-template-functions JavaScript template functions in 11ty} + */ +export default eleventyConfig => + + /** + * Minify JavaScript + * @param {String} script A JavaScript file’s contents + * @return {String} The minified script + * @example `${this.minifyJS($this.fileToString('/includes/assets/js/gratuitip.js'))}` + * See {@link https://www.11ty.dev/docs/quicktips/inline-js/ 11ty docs} + * @see {@link https://www.11ty.dev/docs/data-js/#example-exposing-environment-variables Environment variables in 11ty} + */ + eleventyConfig.addFilter('minifyJS', script => { + // Only minify scripts for production + if(process.env.ELEVENTY_ENV === 'production') { + var minified = Terser.minify(script) + if(minified.error) { + console.log('Terser error: ', minified.error) + return script + } + + return minified.script + } + + return script + }) diff --git a/_includes/index.js b/_includes/index.js new file mode 100644 index 0000000..39ceffc --- /dev/null +++ b/_includes/index.js @@ -0,0 +1,25 @@ +/** + * @file Imports modules and configures them with 11ty (.eleventy.js) + * @author Reuben L. Lillie + */ + +// Import modules to include +import filters from './filters/index.js' +import shortcodes from './shortcodes/index.js' +import transforms from './transforms/index.js' + +/** + * A loader module for includes + * @module _includes/index + * @param {Object} eleventyConfig 11ty’s Config API + * @see {@link https://www.11ty.dev/docs/config/ Configuring 11ty} + */ +export default function (eleventyConfig) { + + // Function calls to modules to include + filters(eleventyConfig) + shortcodes(eleventyConfig) + transforms(eleventyConfig) + + return +} diff --git a/_includes/layouts/README.md b/_includes/layouts/README.md new file mode 100644 index 0000000..ce488b9 --- /dev/null +++ b/_includes/layouts/README.md @@ -0,0 +1,15 @@ +# eleventy-dot-js-blog/\_includes/layouts + +In Eleventy, [layouts](https://www.11ty.dev/docs/layouts/) are reusable templates that can also be used to wrap other content. + +You can access layouts in templates ([and chain them with other layouts](https://www.11ty.dev/docs/layout-chaining/)) via the `layout` property in Eleventy’s `data` object. + +Eleventy supports a number of different [template languages](https://www.11ty.dev/docs/languages/). This project specifically leverages [JavaScript templates](https://www.11ty.dev/docs/languages/javascript/) (files ending in the `*.11ty.js` extension). Not only do JavaScript templates process the fastest, they are also the most flexible. Using `*.11ty.js` templates opens up the wider world of JavaScript and the Node.js ecosystem to your presentational layer. If you can imagine doing something on a website with JavaScript, you can probably achieve it with Eleventy! + +Other template languages may do the job. Some folks find them attractive because of their (sometimes) shorter syntax and because there are (at the time of this writing) more plentiful code samples in those languages floating around the Web. + +But template languages come at a cost. They inherently carry higher techinical debt—in addition to a basic understanding of JavaScript, you also have to become familiar with _that_ template language. Worse, you are often limited by what that template language is designed to do. In other words, using that template language makes you subject to the scope, opinions, and priorities of the maintainers for that language. By using `*.11ty.js` as often as possible, we can simultaneously lower that barrier to entry and reduce the overall cognitive overload when building and maintaining a project. It’s a way of showing kindness to yourself as well as to whomever may come to the codebase after you. + +Although humans have been using JavaScript to create these other template languages for “quite a while” (as far as measuring time in the computer-age is concerned), writing templates in vanilla JavaScript is still a rather novel concept. In fact, Eleventy—launched in December 2017—is at the frontier of this new–old way of creating content for the Web. + +A number of JavaScript frameworks (like React or Vue.js, among others) advertise writing templates in vanilla JavaScript as a major selling point. But Eleventy is unique: vanilla JavaScript templating works out of the box _without weighing down your codebase_ and _without burdening your users with any client-side JavaScript_. Eleventy is _just JavaScript_: clean, simple, fast, flexible, and limited only by your imagination. diff --git a/_includes/layouts/archive.11ty.js b/_includes/layouts/archive.11ty.js new file mode 100644 index 0000000..536ae26 --- /dev/null +++ b/_includes/layouts/archive.11ty.js @@ -0,0 +1,36 @@ +/** + * @file Defines the chained template for a collection archive page + * @author Reuben L. Lillie + * @author Horacio Gonzalez + * @see {@link https://www.11ty.dev/docs/layouts/#layout-chaining Layout chaining in 11ty} + */ + +/** + * Acts as front matter in JavaScript templates + * @see {@link https://www.11ty.dev/docs/languages/javascript/#optional-data-method Optional `data` in JavaScript templates in 11ty} + */ +export var data = { + layout: 'layouts/base' +} + +/** + * The content of the template + * @method + * @name render() + * @param {Object} data 11ty’s data object + * @return {String} The rendered template + * @see {@link https://www.11ty.dev/docs/pagination/ Pagination in 11ty} + */ +export function render(data) { + + return `
+
+

${data.title}

+
+ ${data.content} + ${this.archive(data, data.pagination.items)} +
+ ${this.paginationNav(data)} +
+
` +} diff --git a/_includes/layouts/base.11ty.js b/_includes/layouts/base.11ty.js new file mode 100644 index 0000000..7866280 --- /dev/null +++ b/_includes/layouts/base.11ty.js @@ -0,0 +1,29 @@ +/** + * @file Defines the base template + * @author Reuben L. Lillie + * @author Horacio Gonzalez + * @see {@link https://www.11ty.dev/docs/languages/javascript/#function JavaScript functions as templates in 11ty} + */ + +/** + * Base JavaScript Template module + * @module _includes/layouts/base + * @param {Object} data 11ty’s data object + * @return {String} The rendered template + * @see {@link https://www.11ty.dev/docs/data/ Using data in 11ty} + * @see {@link https://www.11ty.dev/docs/shortcodes/ Shortcodes in 11ty} + */ + export function render(data) { + var l10n = data.site[data.locale] + return ` + + ${this.headTag(data)} + + ${this.siteHeader(data)} +
+ ${data.content} +
+ ${this.siteFooter(data)} + + ` +} diff --git a/_includes/layouts/episodes.11ty.js b/_includes/layouts/episodes.11ty.js new file mode 100644 index 0000000..defa0e7 --- /dev/null +++ b/_includes/layouts/episodes.11ty.js @@ -0,0 +1,110 @@ +/** + * @file Defines the chained template for episodes + * @author Horacio Gonzalez + * @see {@link https://www.11ty.dev/docs/layouts/#layout-chaining Layout chaining in 11ty} + */ + +/** + * Acts as front matter in JavaScript templates + * @see {@link https://www.11ty.dev/docs/languages/javascript/#optional-data-method Optional `data` in JavaScript templates in 11ty} + */ + export var data = { + layout: 'layouts/base' +} +var util = require('util') +/** + * The content of the home page template + * @method + * @name render() + * @param {Object} data 11ty’s data object + * @return {String} The rendered template + * @see {@link https://www.11ty.dev/docs/pagination/ Pagination in 11ty} + */ +export function render(data) { + let teamMembers = + data.collections.team.map((item) => item.template.frontMatter.data); + + let guestList = + data.collections.guests.map((item) => item.template.frontMatter.data); + + let l10n = data.site[data.locale]; + + return ` +
+
+
+
+
+ ${data.name} +
+ +
+

${data.title}

+

${data.subtitle}

+
+
+ + ${data.references ? ` + + ` : ''} +
+ + +
+

Au programme de l'émission

+ +
+
+ + + ` +} diff --git a/_includes/layouts/guests.11ty.js b/_includes/layouts/guests.11ty.js new file mode 100644 index 0000000..2216ed1 --- /dev/null +++ b/_includes/layouts/guests.11ty.js @@ -0,0 +1,34 @@ +/** + * @file Defines the chained template for the guests page + * @author Horacio Gonzalez + * @see {@link https://www.11ty.dev/docs/layouts/#layout-chaining Layout chaining in 11ty} + */ + +/** + * Acts as front matter in JavaScript templates + * @see {@link https://www.11ty.dev/docs/languages/javascript/#optional-data-method Optional `data` in JavaScript templates in 11ty} + */ + export var data = { + layout: 'layouts/base' +} + +/** + * The content of the template + * @method + * @name render() + * @param {Object} data 11ty’s data object + * @return {String} The rendered template + * @see {@link https://www.11ty.dev/docs/pagination/ Pagination in 11ty} + */ +export function render(data) { + return `
+
+

${data.title}

+
+ ${data.content} + ${this.team(data, data.pagination.items)} +
+ ${this.paginationNav(data)} +
+
` +} diff --git a/_includes/layouts/home.11ty.js b/_includes/layouts/home.11ty.js new file mode 100644 index 0000000..b9740ae --- /dev/null +++ b/_includes/layouts/home.11ty.js @@ -0,0 +1,36 @@ +/** + * @file Defines the chained template for home page + * @author Reuben L. Lillie + * @author Horacio Gonzalez + * @see {@link https://www.11ty.dev/docs/layouts/#layout-chaining Layout chaining in 11ty} + */ + +/** + * Acts as front matter in JavaScript templates + * @see {@link https://www.11ty.dev/docs/languages/javascript/#optional-data-method Optional `data` in JavaScript templates in 11ty} + */ +export var data = { + layout: 'layouts/base' +} + +/** + * The content of the home page template + * @method + * @name render() + * @param {Object} data 11ty’s data object + * @return {String} The rendered template + * @see {@link https://www.11ty.dev/docs/pagination/ Pagination in 11ty} + */ +export function render(data) { + + let l10n = data.site[data.locale]; + return ` + ${this.jumbo(data)} + +
+

${l10n.tagline}

+

${l10n.when}

+
+ + ` +} diff --git a/_includes/layouts/page.11ty.js b/_includes/layouts/page.11ty.js new file mode 100644 index 0000000..b805926 --- /dev/null +++ b/_includes/layouts/page.11ty.js @@ -0,0 +1,30 @@ +/** + * @file Defines the chained template for a basic page + * @author Reuben L. Lillie + * @see {@link https://www.11ty.dev/docs/layouts/#layout-chaining Layout chaining in 11ty} + */ + +/** + * Acts as front matter in JavaScript templates + * @see {@link https://www.11ty.dev/docs/languages/javascript/#optional-data-method Optional `data` in JavaScript templates in 11ty} + */ +export var data = { + layout: 'layouts/base' +} + +/** + * The content of the page template + * @method + * @name render() + * @param {Object} data 11ty’s data object + * @return {String} The rendered template + * @see {@link https://www.11ty.dev/docs/shortcodes/ Shortcodes in 11ty} + */ +export function render(data) { + return `
+
+

${data.title}

+
+ ${data.content} +
` +} diff --git a/_includes/layouts/person.11ty.js b/_includes/layouts/person.11ty.js new file mode 100644 index 0000000..8476f26 --- /dev/null +++ b/_includes/layouts/person.11ty.js @@ -0,0 +1,46 @@ +/** + * @file Defines the chained template for a person page + * @author Horacio Gonzalez + * @see {@link https://www.11ty.dev/docs/layouts/#layout-chaining Layout chaining in 11ty} + */ + +/** + * Acts as front matter in JavaScript templates + * @see {@link https://www.11ty.dev/docs/languages/javascript/#optional-data-method Optional `data` in JavaScript templates in 11ty} + */ + export var data = { + layout: 'layouts/base' +} +var util = require('util') +/** + * The content of the person page template + * @method + * @name render() + * @param {Object} data 11ty’s data object + * @return {String} The rendered template + * @see {@link https://www.11ty.dev/docs/pagination/ Pagination in 11ty} + */ +export function render(data) { + return ` +
+
+ +
+
+

${data.name}

+

${data.company}

+
+
+ ${data.content} +
+ ${data.socials ? ` +
+ ${data.socials.map((social) => { + return this.socialIcons(social); + }).join(' ')} +
` : '' + } +
+ `; + +} \ No newline at end of file diff --git a/_includes/layouts/post.11ty.js b/_includes/layouts/post.11ty.js new file mode 100644 index 0000000..c447fc5 --- /dev/null +++ b/_includes/layouts/post.11ty.js @@ -0,0 +1,30 @@ +/** + * @file Defines the chained template for basic post content + * @author Reuben L. Lillie + * @see {@link https://www.11ty.dev/docs/layouts/#layout-chaining Layout chaining in 11ty} + */ + +/** + * Acts as front matter in JavaScript templates + * @see {@link https://www.11ty.dev/docs/languages/javascript/#optional-data-method Optional `data` in JavaScript templates in 11ty} + */ +export var data = { + layout: 'layouts/base' +} + +/** + * The content of the post template + * @method + * @name render() + * @param {Object} data 11ty’s data object + * @return {String} The rendered template + */ +export function render (data) { + return `
+
+

${data.title}

+ +
+ ${data.content} +
` +} diff --git a/_includes/layouts/team.11ty.js b/_includes/layouts/team.11ty.js new file mode 100644 index 0000000..7b8793b --- /dev/null +++ b/_includes/layouts/team.11ty.js @@ -0,0 +1,34 @@ +/** + * @file Defines the chained template for the team page + * @author Horacio Gonzalez + * @see {@link https://www.11ty.dev/docs/layouts/#layout-chaining Layout chaining in 11ty} + */ + +/** + * Acts as front matter in JavaScript templates + * @see {@link https://www.11ty.dev/docs/languages/javascript/#optional-data-method Optional `data` in JavaScript templates in 11ty} + */ + export var data = { + layout: 'layouts/base' +} + +/** + * The content of the template + * @method + * @name render() + * @param {Object} data 11ty’s data object + * @return {String} The rendered template + * @see {@link https://www.11ty.dev/docs/pagination/ Pagination in 11ty} + */ +export function render(data) { + return `
+
+

${data.title}

+
+ ${data.content} + ${this.team(data, data.pagination.items)} +
+ ${this.paginationNav(data)} +
+
` +} diff --git a/_includes/shortcodes/README.md b/_includes/shortcodes/README.md new file mode 100644 index 0000000..26831e8 --- /dev/null +++ b/_includes/shortcodes/README.md @@ -0,0 +1,5 @@ +# eleventy-dot-js-blog/\_includes/shortcodes + +In Eleventy, [shortcodes](https://www.11ty.dev/docs/shortcodes/) can be used to modify content. They are accessible in templates via the keyword `this`. + +The [`index.js`](https://gitlab.com/reubenlillie/eleventy-dot-js-blog/-/blob/master/_includes/shortcodes/index.js) file here is used to configure shortcodes in this directory with Eleventy (in [`.eleventy.js`](https://gitlab.com/reubenlillie/eleventy-dot-js-blog/-/blob/master/.eleventy.js), loaded in [`_includes/index.js`](https://gitlab.com/reubenlillie/eleventy-dot-js-blog/-/blob/master/_includes/index.js)). diff --git a/_includes/shortcodes/archive.js b/_includes/shortcodes/archive.js new file mode 100644 index 0000000..37e824f --- /dev/null +++ b/_includes/shortcodes/archive.js @@ -0,0 +1,53 @@ +/** + * @file Defines a shortcode for displaying an archive of content + * @author Reuben L. Lillie + * @see {@link https://www.11ty.dev/docs/languages/javascript/#javascript-template-functions JavaScript template functions in 11ty} + */ + +/** + * A JavaScript Template module for a `section` of `article`s + * @module _includes/shortcodes/archive + * @param {Object} eleventyConfig 11ty’s Config API + */ +export default eleventyConfig => + + /** + * A section of articles + * @method + * @name archive + * @param {Object} data 11ty’s data object + * @param {Array} arr The 11ty content objects to list + * @return {String} The rendered shortcode + * @example `${this.archive(data, data.pagination.items)}` + * @see {@link https://www.11ty.dev/docs/data/ Using data in 11ty} + */ + eleventyConfig.addShortcode('archive', function (data, arr) { + var l10n = data.site[data.locale] + return `
+ ${arr.map(item => + ``).join('')} +
` + }) diff --git a/_includes/shortcodes/author-meta.js b/_includes/shortcodes/author-meta.js new file mode 100644 index 0000000..dcad1cc --- /dev/null +++ b/_includes/shortcodes/author-meta.js @@ -0,0 +1,30 @@ +/** + * @file Defines a shortcode for the author metadata + * @author Reuben L. Lillie + * @see {@link https://www.11ty.dev/docs/languages/javascript/#javascript-template-functions JavaScript template functions in 11ty} + */ + +/** + * A JavaScript Template module for the author metadata + * @module _includes/shortcodes/author-meta + * @param {Object} eleventyConfig 11ty’s Config API + */ +export default eleventyConfig => + + /** + * HTML author metadata + * @method + * @name authorMeta + * @param {Object} data 11ty’s data object + * @return {String} The rendered shortcode + * @example `${this.authorMeta(data)}` + * @see {@link https://www.11ty.dev/docs/data/ Using data in 11ty} + */ + eleventyConfig.addShortcode('authorMeta', data => + `` + ) diff --git a/_includes/shortcodes/author.js b/_includes/shortcodes/author.js new file mode 100644 index 0000000..eb66da6 --- /dev/null +++ b/_includes/shortcodes/author.js @@ -0,0 +1,25 @@ +/** + * @file Defines a shortcode for displaying information about an author + * @author Reuben L. Lillie + * @see {@link https://www.11ty.dev/docs/languages/javascript/#javascript-template-functions JavaScript template functions in 11ty} + */ + +/** + * A JavaScript Template module for the content author information + * @module _includes/shortcodes/author + * @param {Object} eleventyConfig 11ty’s Config API + */ +export default eleventyConfig => + + /** + * Content author markup + * @method + * @name author + * @param {Object} 11ty’s data object + * @return {String} The rendered shortcode + * @example `${this.author(data)}` + * @see {@link https://www.11ty.dev/docs/data/ Using data in 11ty} + */ + eleventyConfig.addShortcode('author', data => + `${data.author.name.fullName}` + ) diff --git a/_includes/shortcodes/colophon.js b/_includes/shortcodes/colophon.js new file mode 100644 index 0000000..dcad7ef --- /dev/null +++ b/_includes/shortcodes/colophon.js @@ -0,0 +1,29 @@ +/** + * @file Defines a shortcode for the colophon markup + * @author Reuben L. Lillie + * @see {@link https://www.11ty.dev/docs/languages/javascript/#javascript-template-functions JavaScript template functions in 11ty} + */ + +/** + * A JavaScript Template module for the colophon + * @module _includes/shortcodes/colophon + * @param {Object} eleventyConfig 11ty’s Config API + */ +export default eleventyConfig => + + /** + * The colophon markup + * @method + * @name colophon + * @param {Object} data 11ty’s data object + * @return {String} The rendered shortcode + * @example `${this.colophon(data)}` + * @see {@link https://www.11ty.dev/docs/data/ Using data in 11ty} + */ + eleventyConfig.addShortcode('colophon', data => { + var l10n = data.colophon[data.locale] + return /* html */ ` + ${l10n.generator} ${l10n.host}
+ ${l10n.languages}
+ ${l10n.git}` + }) diff --git a/_includes/shortcodes/copyright-notice.js b/_includes/shortcodes/copyright-notice.js new file mode 100644 index 0000000..5d140ec --- /dev/null +++ b/_includes/shortcodes/copyright-notice.js @@ -0,0 +1,29 @@ +/** + * @file Defines a shortcode for the copyright notice markup + * @author Reuben L. Lillie + * @see {@link https://www.11ty.dev/docs/languages/javascript/#javascript-template-functions JavaScript template functions in 11ty} + */ + +/** + * A JavaScript Template module for the copyright notice + * @module _includes/shortcodes/copyright-notice + * @param {Object} eleventyConfig 11ty’s Config API + */ +export default eleventyConfig => + + /** + * Copyright notice markup + * @method + * @name copyrightNotice + * @param {Object} 11ty’s data object + * @return {String} The rendered shortcode + * @example `${this.copyrightNotice(data)}` + * @see {@link https://www.11ty.dev/docs/data/ Using data in 11ty} + */ + eleventyConfig.addShortcode('copyrightNotice', data => + `© ${data.copyright.year} + ${data.copyright.holder}. + + ${data.copyright.license.abbr}. + ` + ) diff --git a/_includes/shortcodes/css-root.js b/_includes/shortcodes/css-root.js new file mode 100644 index 0000000..899fee5 --- /dev/null +++ b/_includes/shortcodes/css-root.js @@ -0,0 +1,60 @@ +/** + * @file Defines a shortcode for inserting variable data into the CSS `:root` + * @author Reuben L. Lillie + * @author Horacio Gonzalez + * @see {@link https://www.11ty.dev/docs/languages/javascript/#javascript-template-functions JavaScript template functions in 11ty} + */ + +/** + * A JavaScript Template module for defining CSS `:root` custom properties + * @module _includes/shortcodes/cssRoot + * @param {Object} eleventyConfig 11ty’s Config API + */ +export default eleventyConfig => + + /** + * CSS `:root` custom properties + * @method + * @name cssRoot + * @param {Object} data 11ty’s data object + * @return {String} The rendered shortcode + * @example `${this.cssRoot(data)}` + * @see {@link https://www.11ty.dev/docs/data/ Using data in 11ty} + */ + eleventyConfig.addShortcode('cssRoot', data => + `:root { + /* Color Codes */ + --black: ${data.colors.grayscale[900].hex}; + --grayscale-100: ${data.colors.grayscale[100].hex}; + --grayscale-200: ${data.colors.grayscale[200].hex}; + --grayscale-400: ${data.colors.grayscale[400].hex}; + --grayscale-600: ${data.colors.grayscale[600].hex}; + --grayscale-800: ${data.colors.grayscale[800].hex}; + --white: ${data.colors.grayscale.white.hex}; + --redish: #800000; + /* Spaces */ + --space-1: .125rem; + --space-2: .25rem; + --space-3: .5rem; + --space-4: 1rem; + /* Named Properties */ + --background-color: var(white); + --text-color: var(--grayscale-800); + --gray: var(--grayscale-600); + --border: 2px dashed var(--gray); + --base-unit: 1em; + --header-background-color: var(--grayscale-800); + --header-text-color: var(--grayscale-100); + --toolbar-height: 5rem; + --jumbo-overlay-color: #b0e2fc; + --jumbo-text: var(--grayscale-100); + --jumbo-overlay-transition: 0.5s; + + } + @media (prefers-color-scheme: dark) { + :root { + --background-color: var(--black); + --gray: var(--grayscale-400); + --text-color: var(--white); + } + }`) diff --git a/_includes/shortcodes/description.js b/_includes/shortcodes/description.js new file mode 100644 index 0000000..21c71ec --- /dev/null +++ b/_includes/shortcodes/description.js @@ -0,0 +1,30 @@ +/** + * @file Defines a shortcode for the description metadata + * @author Reuben L. Lillie + * @see {@link https://www.11ty.dev/docs/languages/javascript/#javascript-template-functions JavaScript template functions in 11ty} + */ + +/** + * A JavaScript Template module for the description metadata + * @module _includes/shortcodes/description + * @param {Object} eleventyConfig 11ty’s Config API + */ +export default eleventyConfig => + + /** + * HTML description + * @method + * @name description + * @param {Object} data 11ty’s data object + * @return {String} The rendered shortcode + * @example `${this.description(data)}` + * @see {@link https://www.11ty.dev/docs/data/ Using data in 11ty} + */ + eleventyConfig.addShortcode('description', data => + `` + ) diff --git a/_includes/shortcodes/edit-this-page.js b/_includes/shortcodes/edit-this-page.js new file mode 100644 index 0000000..660702b --- /dev/null +++ b/_includes/shortcodes/edit-this-page.js @@ -0,0 +1,26 @@ +/** + * @file Defines a shortcode for an “Edit in Git” link + * @author Reuben L. Lillie + * @see {@link https://www.11ty.dev/docs/languages/javascript/#javascript-template-functions JavaScript template functions in 11ty} + */ + +/** + * A JavaScript Template module for “Edit in Git” link + * @module _includes/shortcodes/edit-this-page + * @param {Object} eleventyConfig 11ty’s Config API + */ +export default eleventyConfig => + + /** + * The link markup + * @method + * @name editThisPage + * @param {Object} data 11ty’s data object + * @return {String} The rendered shortcode + * @example `${this.editThisPage(data)}` + * @see {@link https://www.11ty.dev/docs/data/ Using data in 11ty} + * @see {@link https://www.11ty.dev/docs/quicktips/edit-on-github-links/ Add Edit in Git links with 11ty} + */ + eleventyConfig.addShortcode('editThisPage', data => + `${data.site[data.locale].editThisPage}` + ) diff --git a/_includes/shortcodes/external-css.js b/_includes/shortcodes/external-css.js new file mode 100644 index 0000000..d62087f --- /dev/null +++ b/_includes/shortcodes/external-css.js @@ -0,0 +1,44 @@ +/** + * @file Defines a shortcode for loading external stylesheets + * @author Reuben L. Lillie + * @see {@link https://www.11ty.dev/docs/languages/javascript/#javascript-template-functions JavaScript template functions in 11ty} + */ + +/** + * A JavaScript Template module for the external CSS `link` + * @module _includes/shortcodes/external-css + * @param {Object} eleventyConfig 11ty’s Config API + */ +export default eleventyConfig => + + /** + * Create one or more `link` references + * @method + * @name externalCSS + * @param {Object} data 11ty’s data object + * @return {String} The rendered shortcode + * @example `${this.externalCSS(data)}` + * @see {@link https://www.11ty.dev/docs/data/ Using data in 11ty} + */ + eleventyConfig.addShortcode('externalCSS', data => { + var stylesheets = [ + 'pages', + 'posts' + ] + var files = [] + var html = ''; + if (data.externalCSS !== undefined || data.tags !== undefined) { + if (Array.isArray(data.externalCSS)) { + files = [...data.externalCSS] + } + if (typeof data.externalCSS === 'string') { + files.push(data.externalCSS) + } + if (stylesheets.includes(data.tags[0])) { + files.push(data.tags[0]) + } + files.map(file => + html += ``) + } + return html + }) diff --git a/_includes/shortcodes/favicon.js b/_includes/shortcodes/favicon.js new file mode 100644 index 0000000..077bd6f --- /dev/null +++ b/_includes/shortcodes/favicon.js @@ -0,0 +1,33 @@ +/** + * @file Defines a shortcode to load a favicon for the user’s platform + * @author Reuben L. Lillie + * @author Horacio Gonzalez + */ + +/** + * A JavaScript Template module for favicons + * @module _includes/shortcode/favicon + * @param {Object} eleventyConfig 11ty’s Config API + * @see {@link https://www.11ty.dev/docs/filters/ 11ty docs} + */ +export default eleventyConfig => + + /** + * Load the appropriate favicon + * @method + * @name favicon + * @param {Object} data 11ty’s data object + * @return {String} The rendered shortcode + * @example `${this.favicon(data)}` + * @see {@link https://css-tricks.com/emojis-as-favicons/ “Emojis as Favicons” from _CSS-Tricks_} + * @see {@link https://realfavicongenerator.net/ Real Favicon Generator} + * @see {@link https://www.11ty.dev/docs/data/ Using data in 11ty} + */ + eleventyConfig.addShortcode('favicon', function (data) { + // You can only use one of these return statements at a time + // Comment the next line ⬇️ to disable emoji favicons + // return `` + // Uncomment the next line ⬇️ to enable favicons via the Real Favicon Generator + // return `${this.fileToString('favicons/html_code.html')}` + return /* html */ ``; + }) diff --git a/_includes/shortcodes/getting-started.js b/_includes/shortcodes/getting-started.js new file mode 100644 index 0000000..4d1e1ce --- /dev/null +++ b/_includes/shortcodes/getting-started.js @@ -0,0 +1,37 @@ +/** + * @file Defines a shortcode for displaying a `section` about getting started + * @author Reuben L. Lillie + * @see {@link https://www.11ty.dev/docs/languages/javascript/#javascript-template-functions JavaScript template functions in 11ty} + */ + +/** + * A JavaScript Template module for the content “Getting Started” information + * @module _includes/shortcodes/getting-started + * @param {Object} eleventyConfig 11ty’s Config API + */ +export default function (eleventyConfig) { + + /** + * “Getting Started” `section` markup + * @method + * @name gettingStarted + * @param {Object} 11ty’s data object + * @return {String} The rendered shortcode + * @example `${this.gettingStarted(data)}` + * @see {@link https://www.11ty.dev/docs/data/ Using data in 11ty} + */ + eleventyConfig.addShortcode('gettingStarted', function (data) { + return `
+

🎬 Get started!

+
    +
  • 📝 Edit ./_data/site.json with your site’s information
  • +
  • (Optional) 📝 Edit .eleventy.js with your configuration preferences
  • +
  • ❌ Delete this message from ./_includes/${data.layout}.11ty.js
  • +
+

… You could also 👉${this.fileToString('img/deploy-to-netlify-button.svg')}

+

ℹ️ More information on GitLab

+
` + }) + +} diff --git a/_includes/shortcodes/head-tag.js b/_includes/shortcodes/head-tag.js new file mode 100644 index 0000000..6a59ac2 --- /dev/null +++ b/_includes/shortcodes/head-tag.js @@ -0,0 +1,41 @@ +/** + * @file Defines a shortcode for the `` markup + * @author Reuben L. Lillie + * @see {@link https://www.11ty.dev/docs/languages/javascript/#javascript-template-functions JavaScript template functions in 11ty} + */ + +/** + * A JavaScript Template module for the `` + * @module _includes/shortcodes/head-tag + * @param {Object} eleventyConfig 11ty’s Config API + */ +export default eleventyConfig => + + /** + * HTML `` markup + * @method + * @name headTag + * @param {Object} data 11ty’s data object + * @return {String} The rendered shortcode + * @example `${this.headTag(data)}` + * @see {@link https://www.11ty.dev/docs/data/ Using data in 11ty} + */ + eleventyConfig.addShortcode('headTag', function (data) { + return ` + ${this.titleTag(data)} + + + + + + + ${this.authorMeta(data)} + ${this.description(data)} + ${this.favicon(data)} + ${this.socialMeta(data)} + + ${this.externalCSS(data)} + ` + }) diff --git a/_includes/shortcodes/index.js b/_includes/shortcodes/index.js new file mode 100644 index 0000000..111f19c --- /dev/null +++ b/_includes/shortcodes/index.js @@ -0,0 +1,66 @@ +/** + * @file Imports shortcodes and configures them with 11ty (.eleventy.js) + * @author Reuben L. Lillie + */ + +// Import shortcodes to include +import archive from './archive.js' +import author from './author.js' +import authorMeta from './author-meta.js' +import colophon from './colophon.js' +import copyrightNotice from './copyright-notice.js' +import cssRoot from './css-root.js' +import description from './description.js' +import editThisPage from './edit-this-page.js' +import externalCSS from './external-css.js' +import favicon from './favicon.js' +import gettingStarted from './getting-started.js' +import headTag from './head-tag.js' +import inlineCSS from './inline-css.js' +import jumbo from './jumbo.js' +import nav from './nav.js' +import pageDate from './page-date.js' +import paginationNav from './pagination-nav.js' +import siteFooter from './site-footer.js' +import siteHeader from './site-header.js' +import socialMeta from './social-meta.js' +import socialIcons from './social-icons.js' +import team from './team.js' +import titleTag from './title-tag.js' + +/** + * A loader module for shortcodes + * @module _includes/shortcodes + * @param {Object} eleventyConfig 11ty’s Config API + * @see {@link https://www.11ty.dev/docs/config/ Configuring 11ty} + * @see {@link https://www.11ty.dev/docs/shortcodes/ Shortcodes in 11ty} + */ +export default function (eleventyConfig) { + + // Function calls to shortcodes to include + archive(eleventyConfig) + author(eleventyConfig) + authorMeta(eleventyConfig) + colophon(eleventyConfig) + copyrightNotice(eleventyConfig) + cssRoot(eleventyConfig) + description(eleventyConfig) + editThisPage(eleventyConfig) + externalCSS(eleventyConfig) + favicon(eleventyConfig) + gettingStarted(eleventyConfig) + headTag(eleventyConfig) + inlineCSS(eleventyConfig) + jumbo(eleventyConfig) + nav(eleventyConfig) + pageDate(eleventyConfig) + paginationNav(eleventyConfig) + siteFooter(eleventyConfig) + siteHeader(eleventyConfig) + socialMeta(eleventyConfig) + socialIcons(eleventyConfig) + titleTag(eleventyConfig) + team(eleventyConfig) + + return +} diff --git a/_includes/shortcodes/inline-css.js b/_includes/shortcodes/inline-css.js new file mode 100644 index 0000000..b51708b --- /dev/null +++ b/_includes/shortcodes/inline-css.js @@ -0,0 +1,32 @@ +/** + * @file Defines a shortcode for loading inline stylesheets + * @author Reuben L. Lillie + */ + +/** + * A JavaScript Template module for the inline CSS `links` + * @module _includes/shortcodes/inline-css + * @param {Object} eleventyConfig 11ty’s Config API + */ +export default eleventyConfig => + + /** + * HTML `