✅ A multilingual, clean, green 11ty starter theme.
A multilingual, clean, green, 11ty starter theme. elva provides solid foundations for your next web project and a built in CMS (Front Matter CMS) for managing content. Try the demo!
Features include:
npm run cli)dist/api/search.json). Any content tagged _search will appear in the search index/elva/filters/*)Hello, {{name}} and plurals e.g. {{ count }} item(s)Make a directory and navigate to it:
mkdir my-site-name
cd my-site-nameClone this repository:
git clone https://github.com/scottsweb/elva.git .Install dependencies:
npm installRun Eleventy for site development. View the site at http://localhost:8080:
npm run devGenerate a production-ready build to the dist folder:
npm run build:prodYou can set the environment variable NODE_ENV=production in your hosting control panel too and use npm run build as before.
To use Front Matter CMS, install VSCodium or Visual Studio Code and enable the extension (if it doesn't enable automatically). It will open each time you launch your project.
For next steps, see the documentation.
.eleventy.js you'll see some dynamic settings for url, isProduction and isStaging (under Global Settings). Make sure these environment variables are set in staging and production and tweak as necessarynpm run cli, under the languages sub-menu/content/assets/img/ /themes/default/css/), layouts (/themes/default/_layouts/) and includes (/theme/default/_includes/)... or duplicate the default theme using npm run cli setup new-theme. You can also manually set the theme in /content/_data/settings.json to the name of your theme folder. We also have support changing this in the cli npm run cli setup theme./themes/{theme}/_layouts/opengraph-preview.njk)/elva/config/image.js.frontmatter/frontmatter.json / .frontmatter/config/content/pagefodlers/*.json to add Front Matter CMS supportYou can use the CLI to manage languages and content directly from the command line. Start with npm run cli. The CLI defaults to an interactive menu, but you can also use shortcuts for common tasks.
npm run cli setup site - Setup the basic site settings for a new projectnpm run cli setup theme - Choose the theme you wish to usenpm run cli setup new-theme - Create a new theme by duplicating the default themenpm run cli setup delete-default-content - Delete all the default content that ships with elvanpm run cli language add - Add a new languagenpm run cli language remove - Remove an existing languagenpm run cli language list - List all languagesnpm run cli language default - Change the default languagenpm run cli content add - Add new contentnpm run cli content remove - Remove existing contentnpm run cli content import - Import content from WordPress etcnpm run cli content regenerate - Regenerate all open graph imagesnpm run cli blogroll list - List all blogroll entriesnpm run cli blogroll add - Add a new blogroll entrynpm run cli blogroll remove - Remove blogroll entriesnpm run cli collections list - List all collectionsnpm run cli collections add - Add a new collectionnpm run cli collections remove - Remove a collectionnpm run cli collections edit - Edit a collectionnpm run cli sync-collections - Sync the collection.11tydata.js template to all collectionsnpm run cli translations add - Add a new translationnpm run cli translations remove - Remove a translationnpm run cli translations sync - Sync missing keys from the default language to other localesWith 4, you'll find a a new command line interface (documented above). This should make getting started and managing languages much easier. There is also a new search index you can use to build a custom search component, an example can be seen on the 404 page.
As of version 3.0 of elva, there are now separate folders for /themes, your sites /content and elva related stuff /elva. The idea is to make upgrades of elva simpler by seperating frequently changed things (the theme and content) from the guts of the project. Hopefully this is helpful, but please open an issue if you would like to see further improvements made.
No open issues yet, or sync has not completed.