百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
E

elva

> 编程语言
开源

✅ 一个多语言、简洁、绿色的 11ty 开始主题。

99 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

✅ 一个多语言、简洁、绿色的 11ty 开始主题。

elva

  • Status: ✅ Active
  • Contributors: @scott
  • Description: A multilingual, clean, green 11ty starter theme.
  • Author: Scott Evans
  • Author URI: https://scott.ee

About

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:

Performance things

  • Optimised CSS, JS and HTML
  • Responsive images that support lazy loading and modern formats (avif, webp)
  • Critical CSS using 11ty bundle
  • Support for the Photon CDN (can be turned on via settings)

Accessibility things

  • Multilingual
  • Dark / light mode
  • Skip link and ARIA hints

Standards things

  • RSS feed with XSLT styles
  • JSON feeds
  • Sitemap
  • Web manifest for PWAs
  • humans.txt
  • robots.txt
  • Discourage AI bots

Other things

  • A CLI for managing languages, setup and common tasks (npm run cli)
  • Search API (see dist/api/search.json). Any content tagged _search will appear in the search index
  • Front Matter CMS
  • Open graph image generation (dev server must be running)
  • Draft support
  • Syntax highlighting
  • Simplified embeds for YouTube, Vimeo etc
  • Plenty of helpful filters and functions (see /elva/filters/*)
  • Alpine.js
  • Eleventy Fetch
  • Eleventy Navigation

Still to come:

  • A fancy default theme
  • Fix: Make the random filter choose the same article for both languages
  • Accessible tooltip component
  • Images — Size presets (full width, half etc that set the sizes attribute automatically)
  • Profile verification / .well-known support for the Fediverse and Nostr (1)
  • Language redirect based on browser setting (1)
  • Cleaner language selector
  • Pagination examples
  • Allow for variable substitution in translations e.g. Hello, {{name}} and plurals e.g. {{ count }} item(s)
  • Front Matter CMS — Fix previews when customising the post/page slug (1, 2)
  • Front Matter CMS — More helpful scripts
  • twtxt feeds (1)

Getting Started

Make a directory and navigate to it:

bash
mkdir my-site-name
cd my-site-name

Clone this repository:

bash
git clone https://github.com/scottsweb/elva.git .

Install dependencies:

bash
npm install

Run Eleventy for site development. View the site at http://localhost:8080:

bash
npm run dev

Generate a production-ready build to the dist folder:

bash
npm run build:prod

You 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.

Personalisation Checklist

  • In .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 necessary
  • Configure your site settings
  • Configure site languages via the CLI npm run cli, under the languages sub-menu
  • Set your own default images, icons and favicon by replacing the images in /content/assets/img/
  • Add your content — it's easiest to do this with Front Matter CMS which exposes all front matter in the UI
  • Add additional translations using the CLI
  • Design your site by customising the CSS (/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.
  • Setup a custom template for your open graph images (/themes/{theme}/_layouts/opengraph-preview.njk)

Optional

  • Set your preferred image sizes and formats in /elva/config/image.js
  • If you add more front matter, you may wish to edit .frontmatter/frontmatter.json / .frontmatter/config/content/pagefodlers/*.json to add Front Matter CMS support
  • Use Eleventy Fetch to grab some API data
  • If you enable Photon CDN support familiarise yourself with these limitations
  • Enable build caching for your host

CLI

You 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.

Command Shortcuts

Setup Commands

  • npm run cli setup site - Setup the basic site settings for a new project
  • npm run cli setup theme - Choose the theme you wish to use
  • npm run cli setup new-theme - Create a new theme by duplicating the default theme
  • npm run cli setup delete-default-content - Delete all the default content that ships with elva

Language Commands

  • npm run cli language add - Add a new language
  • npm run cli language remove - Remove an existing language
  • npm run cli language list - List all languages
  • npm run cli language default - Change the default language

Content Commands

  • npm run cli content add - Add new content
  • npm run cli content remove - Remove existing content
  • npm run cli content import - Import content from WordPress etc
  • npm run cli content regenerate - Regenerate all open graph images

Blogroll Commands

  • npm run cli blogroll list - List all blogroll entries
  • npm run cli blogroll add - Add a new blogroll entry
  • npm run cli blogroll remove - Remove blogroll entries

Collections Commands

  • npm run cli collections list - List all collections
  • npm run cli collections add - Add a new collection
  • npm run cli collections remove - Remove a collection
  • npm run cli collections edit - Edit a collection
  • npm run cli sync-collections - Sync the collection.11tydata.js template to all collections

Translation Commands

  • npm run cli translations add - Add a new translation
  • npm run cli translations remove - Remove a translation
  • npm run cli translations sync - Sync missing keys from the default language to other locales

Updates

4.0.0

With 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.

3.0.0

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.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言