Code Monkey home page Code Monkey logo

pack11ty's Introduction

GitHub stars Follow @nhoizey@mamot.fr

Pack11ty is an heavily opinionated Eleventy starter (aka "template project").

If you're in a hurry, try one of these quick options:

Deploy to Netlify Deploy to Vercel Remix on Glitch

There are many other options for installation/deployment.

Feel free to use it, enhance it, and share your ideas/comments with issues, or (even better) pull requests.

Key features

A plugin

The Pack11ty plugin (eleventy-plugin-pack11ty) provides many features out of the box, which you can enjoy on any Eleventy project:

  • Collections built automatically from root folders, with pagination for yearly and monthly archives
  • Navigation configuration
  • JavaScript and Sass/CSS assets optimized for performance
    • inline critical JavaScript and CSS
    • external and asynchronous additional JavaScript and CSS, with hashes for cache busting
    • JavaScript, CSS and HTML built separately
    • Dev mode with live reload
  • Responsive images built from simple Markdown and presets
  • Enhanced Markdown thanks to an extensive set of Markdown-it plugins for better contribution: footnotes, attributes, headings anchors, abbreviations, containers
  • A set of Eleventy filters and shortcodes are provided, including an enhanced slugify
  • A simple and responsible way to share YouTube videos

A template repository

Additionnaly, the Pack11ty template repository (pack11ty) helps starting a new project from scratch with even more nice features:

  • Responsive Layout without any Media Query, thanks to CSS Flexible Box Layout (Flexbox) and layouts from Every Layout
  • A default configuration for responsive images
  • PWA for performance, installation and offline support
    • Service Worker with pre-caching of UI assets, auto caching of visited pages and offline fallback
    • Manifest for PWA installation
  • Indieweb
    • Support for receiving Webmentions
    • Atom feed for all collections combined
  • More default containers: success, warning, error
  • Etc.

Would you like to know more?

Read the full documentation on pack11ty.dev!

Do you have different needs?

No problem, there are many other Eleventy starters available.

pack11ty's People

Contributors

d2s avatar dependabot[bot] avatar kodiakhq[bot] avatar nhoizey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pack11ty's Issues

EleventyConfigError` was thrown, Must use import to load ES Module@sindresorhus/slugify/index.js

I get the following error when I try and run your site.
`Eleventy fatal error: (more in DEBUG output)

Error in your Eleventy config file '/Users/thor3/Documents/pack11ty/.eleventy.js'.

EleventyConfigError was thrown

Must use import to load ES Module: /Users/thor3/Documents/pack11ty/node_modules/@sindresorhus/slugify/index.js
require() of ES modules is not supported.
require() of /Users/thor3/Documents/pack11ty/node_modules/@sindresorhus/slugify/index.js from /Users/thor3/Documents/pack11ty/src/_11ty/_utils/slugify.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/thor3/Documents/pack11ty/node_modules/@sindresorhus/slugify/package.json.`

Changing the version of @sindresorhus/slugify/ to 1.1.0 in package.json fixes the issue.

I was not sure how to make a pull request since I have never made one before.

Problem displaying Screenshot in news post

I am having trouble displaying the screenshot on this page, https://pack11ty.dev/news/2020/04/14/layout-and-design/

I noticed the URL had an error. It showed https://res.cloudinary.com/paulportfolio/image/fetch/q_auto,f_auto,w_1600,c_limit/https://gifted-hermann-0987c3.netlify.app//news/2020/04/14/layout-and-design/pack11ty-screenshot.png
, note the 2 forward slashes after app not just 1 like it should be, so I removed the trailing slash in the package.json URL, and the URL now seems correct, https://res.cloudinary.com/paulportfolio/image/fetch/q_auto,f_auto,w_1600,c_limit/https://gifted-hermann-0987c3.netlify.app/news/2020/04/14/layout-and-design/pack11ty-screenshot.png
but the image does not show. I also removed your NHO from the Cloudinary URL in images-responsiver-config.js and put my own in.

What am I doing wrong? The image shows up fine when I run it locally.

Error while executing

hello and thanks for making pack11ty, can't wait to use it.

  • i'm having an issue installing pack11ty
  • both "deploy to netlfiy" and local builds fail
  • both netlfiy and local seem to be having issues with missing folders

locally "npm install" rendors the following error message

  • npm ERR! Error while executing:
  • npm ERR! /usr/bin/git ls-remote -h -t ssh://[email protected]/11ty/eleventy.git
  • npm ERR! xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  • npm ERR! exited with error code: 1

screenshot of some early warning signs too
pack11ty-error

Workbox config not valid

I get an error when I try and build your site.
The error is:

Your configuration is invalid:
{
  "globDirectory": "_site",
  "globPatterns": [
    "./css/additional.*.css",
    "./js/additional-*.*.js",
    "./",
    "./offline-fallback.html",
    "./manifest.webmanifest",
    "./images/logo-192px.png"
  ],
  "dontCacheBustURLsMatching": {},
  "swSrc": "_site/service-worker.js",
  "swDest": "_site/service-worker.js",
  "mode" [1]: "production"
}

[1] "mode" is not allowed
    at runBuildCommand (/Users/thor2/Documents/ideal-waffle-pack11tyjan01/node_modules/workbox-cli/build/app.js:52:19)

So, I removed the "mode" [1]: "production" line from workbox.config.js and things work fine now.

Does that do any harm?

Thanks
Paul

Eleventy:EleventyErrorHandler Problem writing Eleventy templates: +0ms

I get an error when I try to run your template. I am not a developer but I managed to find a Debug command in the package.json.

Here is the error section:
Eleventy:EleventyErrorHandler Problem writing Eleventy templates: +0ms
Eleventy:EleventyErrorHandler data.page.inputPath.match is not a function
Eleventy:EleventyErrorHandler
Eleventy:EleventyErrorHandler TypeError was thrown: +1ms
Eleventy:EleventyErrorHandler (error stack): TypeError: data.page.inputPath.match is not a function
Eleventy:EleventyErrorHandler at type (/Users/thor2/Documents/test2-pack11ty/src/src.11tydata.js:6:37)
Eleventy:EleventyErrorHandler at layout (/Users/thor2/Documents/test2-pack11ty/src/src.11tydata.js:21:23)
Eleventy:EleventyErrorHandler at ComputedDataProxy.findVarsUsed (/Users/thor2/Documents/test2-pack11ty/node_modules/@11ty/eleventy/src/ComputedDataProxy.js:53:11)
Eleventy:EleventyErrorHandler at ComputedData.getVarOrder (/Users/thor2/Documents/test2-pack11ty/node_modules/@11ty/eleventy/src/ComputedData.js:55:34)
Eleventy:EleventyErrorHandler at processTicksAndRejections (internal/process/task_queues.js:97:5)
Eleventy:EleventyErrorHandler at async ComputedData.setupData (/Users/thor2/Documents/test2-pack11ty/node_modules/@11ty/eleventy/src/ComputedData.js:73:17)
Eleventy:EleventyErrorHandler at async Template.augmentFinalData (/Users/thor2/Documents/test2-pack11ty/node_modules/@11ty/eleventy/src/Template.js:422:5)
Eleventy:EleventyErrorHandler at async Template.getTemplates (/Users/thor2/Documents/test2-pack11ty/node_modules/@11ty/eleventy/src/Template.js:438:7)
Eleventy:EleventyErrorHandler at async TemplateMap.initDependencyMap (/Users/thor2/Documents/test2-pack11ty/node_modules/@11ty/eleventy/src/TemplateMap.js:246:22)
Eleventy:EleventyErrorHandler at async TemplateMap.cache (/Users/thor2/Documents/test2-pack11ty/node_modules/@11ty/eleventy/src/TemplateMap.js:279:5) +0ms

Does this mean anything to you?

Thanks for your help.
Paul

missing home meta description (getting a google lighthouse penalty)

  • love this starter
  • thanks for making it available
  • i noticed when admiring the google lighthouse scores there was a minor matter with the seo score
  • as per the google lighthouse details: "Document does not have a meta description. Description text is empty."
  • i would submit a pull request fix but i don't quite understand the logic with pack11ty's site/global data? most 11ty themes/starter seem to use a site.json file for global but it looks like pack11ty is taking a different approach? (though it's 1:30am where i am atm, so maybe i'm just too tired to see it?)

Add documentation about SEO and opengraph features

  • <title> and <meta property="og:title" content="…" />generation
  • <meta name="description" content="…" /> and <meta property="og:description" content="…" /> generation
  • <meta property="og:image" content="…" /> generation

Use full Sass instead of just some PostCSS features?

Currently standing on one foot with just a few PostCSS features (scss syntax, imports, nesting, simple variables and hashes), it might be interesting to move to true Sass.

node-sass + postcss?

Use node-sass for Sass compilation, but keep using PostCSS for hashes?

https://github.com/ianrose/deventy/blob/master/package.json#L11

Gulp?

If so, how to deal with hashes, not native in node-sass CLI? Build with gulp and add gulp-rev?

If we add gulp, why not move JS build to gulp too? 🤷‍♂️

Rollup?

Using Rollup to build CSS seems counter intuitive, as it looks like you can't build just CSS, it has to be injected in some JS build.

But having both JS and CSS (Sass) built with the same tool might me better for DX.

Language attribution

defaultLang: 'en',
Read: RFC 5646 Body language attribute of en May suffices, it’s better to add the attributes flag like: en_GB And example would be: “cheerio!” Whereas in en_US might be, “sup bro?”. Language semantics lexicon. I think the better part of valor is to add a nunjucks comment to supply secondary territory of given language attribute.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.