A static website for Electron Workshop, built with Eleventy (11ty) and Bootstrap. This site showcases initiatives, offerings, and community events.
- Node.js (version 18 or higher)
- npm (comes with Node.js)
-
Clone the repository:
git clone https://github.com/your-username/ew-website.git cd ew-website -
Install dependencies:
npm install
-
Start the development server:
npm run dev # or ./serve.shThis will start Eleventy in serve mode with live reload. The site will be available at
http://localhost:8080. -
Build the site for production:
npm run build # or ./build.shThis generates the static files in the
_sitedirectory.
- Local Build: Run
npm run buildto generate the site. - Netlify Deployment: The site is configured for Netlify with the following settings:
- Build command:
npx @11ty/eleventy && npx pagefind --site _site - Publish directory:
_site
- Build command:
- Pagefind is used for search functionality and is built automatically during the Netlify deploy process.
- Use semantic HTML and follow Bootstrap conventions.
- Write clean, readable Nunjucks templates.
- Ensure responsive design with Bootstrap classes.
- Test changes locally before submitting a pull request.
- Create a new branch for your changes:
git checkout -b feature/your-feature-name - Make your changes (code, templates, styles, etc.)
- Test locally with
npm run dev - Commit your changes:
git commit -m "Description of changes" - Push to your branch:
git push origin feature/your-feature-name - Open a pull request on GitHub
- For new pages: Create
.njkfiles insrc/and update navigation if needed. - For new data: Add JSON files in
src/_data/or update existing ones. - For styles: Edit
src/assets/css/styles.cssor add new CSS files. - For JavaScript: Add scripts in
src/assets/js/.
- Serverless functions are in
netlify/functions/. - Test functions locally using Netlify CLI if needed.
- Home Cards: Edit
src/_data/homeCards.jsonto update cards on the homepage. - Offerings: Modify
src/_data/offerings.jsonfor offerings section. - Initiatives: Update
src/_data/initiatives.jsonand related markdown files insrc/initiatives/. - Navbar: Change navigation links in
src/_data/navbar.json. - Site Info: Update global site data in
src/_data/site.json.
- Pages: Create new
.njktemplates insrc/and add routes via frontmatter. - Posts: Add markdown files in
src/posts/for blog-like content. - Images: Place images in
src/assets/images/and reference them in templates. - Events: Add
.icsfiles insrc/assets/events/for calendar events.
- Use clear, concise language.
- Ensure content is accessible and mobile-friendly.
- Test content changes locally to verify rendering.
- For markdown content, follow standard markdown syntax.
ew-website/
├── netlify.toml # Netlify configuration
├── package.json # Node.js dependencies and scripts
├── src/ # Source files
│ ├── _data/ # Data files (JSON/JS)
│ ├── _includes/ # Layouts and partials
│ ├── assets/ # CSS, JS, images
│ ├── posts/ # Blog posts
│ └── *.njk # Page templates
├── netlify/ # Serverless functions
│ └── functions/ # Function files
└── _site/ # Generated site (after build)
- Eleventy (11ty): Static site generator
- Nunjucks: Templating language
- Bootstrap: CSS framework
- Pagefind: Search functionality
- Netlify: Hosting and serverless functions
If you have questions or need help, please open an issue on GitHub or contact the maintainers.