|
@@ -3,17 +3,7 @@
|
|
|
|
|
|
|
|
We used to use **Jekyll** as our static site generator, but we decided to switch to Eleventy because of its flexibility and ease of use. We also wanted to use a tool that is more widely used and supported, which is why we decided to switch to Eleventy.
|
|
We used to use **Jekyll** as our static site generator, but we decided to switch to Eleventy because of its flexibility and ease of use. We also wanted to use a tool that is more widely used and supported, which is why we decided to switch to Eleventy.
|
|
|
|
|
|
|
|
-# Table of Contents
|
|
|
|
|
-- [Packages and Dependencies](#packages-and-dependencies)
|
|
|
|
|
-- [Configuration](#configuration)
|
|
|
|
|
-- [Global Data](#global-data)
|
|
|
|
|
-- [Folder Structure](#folder-structure)
|
|
|
|
|
-- [Layouts](#layouts)
|
|
|
|
|
-- [Includes](#includes)
|
|
|
|
|
-- [Advanced Topics](#advanced-topics)
|
|
|
|
|
- - [Creating Custom Shortcodes and Includes](#creating-custom-shortcodes-and-includes)
|
|
|
|
|
-
|
|
|
|
|
-# Packages and Dependencies
|
|
|
|
|
|
|
+## Packages and Dependencies
|
|
|
Eleventy is a **Node.js** application. Please follow our [installation](installation.md) guide to install Node.js and all the required dependencies.
|
|
Eleventy is a **Node.js** application. Please follow our [installation](installation.md) guide to install Node.js and all the required dependencies.
|
|
|
|
|
|
|
|
Packages we currently use:
|
|
Packages we currently use:
|
|
@@ -31,7 +21,7 @@ Packages we currently use:
|
|
|
- `markdown-it-table-of-contents` - Table of contents plugin for markdown-it, used mainly in blog posts as `[[TOC]]`
|
|
- `markdown-it-table-of-contents` - Table of contents plugin for markdown-it, used mainly in blog posts as `[[TOC]]`
|
|
|
- `sass` - Sass compiler for our `/css/*.scss` files
|
|
- `sass` - Sass compiler for our `/css/*.scss` files
|
|
|
|
|
|
|
|
-# Configuration
|
|
|
|
|
|
|
+## Configuration
|
|
|
The Eleventy configuration is located in the `.eleventy.js` file at the root of the project. This file contains all the configuration settings for the Eleventy build process. As it is a JavaScript file, you can utilize all JavaScript features and syntax within it.
|
|
The Eleventy configuration is located in the `.eleventy.js` file at the root of the project. This file contains all the configuration settings for the Eleventy build process. As it is a JavaScript file, you can utilize all JavaScript features and syntax within it.
|
|
|
|
|
|
|
|
**What do you find in this file?**
|
|
**What do you find in this file?**
|
|
@@ -44,7 +34,7 @@ The Eleventy configuration is located in the `.eleventy.js` file at the root of
|
|
|
|
|
|
|
|
The file is well-commented and should be self-explanatory. If you need to add a new configuration, please follow the existing structure and include a comment to explain the new configuration.
|
|
The file is well-commented and should be self-explanatory. If you need to add a new configuration, please follow the existing structure and include a comment to explain the new configuration.
|
|
|
|
|
|
|
|
-# Global Data
|
|
|
|
|
|
|
+## Global Data
|
|
|
|
|
|
|
|
Global data is located in the `/_data` folder. It contains all the global data that is accessible in all the templates. Currently, we have these JSON files:
|
|
Global data is located in the `/_data` folder. It contains all the global data that is accessible in all the templates. Currently, we have these JSON files:
|
|
|
|
|
|
|
@@ -61,7 +51,7 @@ Our `site.json` file contains these main properties, with only some listed below
|
|
|
- `authors` - Contains all the authors used in the blog posts
|
|
- `authors` - Contains all the authors used in the blog posts
|
|
|
- repeated data - like `csharp-version`, `dotnet-version`, `download-version` which are used in multiple places on the website and are updated with every release
|
|
- repeated data - like `csharp-version`, `dotnet-version`, `download-version` which are used in multiple places on the website and are updated with every release
|
|
|
|
|
|
|
|
-# Folder Structure
|
|
|
|
|
|
|
+## Folder Structure
|
|
|
|
|
|
|
|
The folder structure is crucial for Eleventy, as it determines the output of the build process. The folder structure is organized as follows:
|
|
The folder structure is crucial for Eleventy, as it determines the output of the build process. The folder structure is organized as follows:
|
|
|
|
|
|
|
@@ -82,7 +72,7 @@ The folder structure is crucial for Eleventy, as it determines the output of the
|
|
|
- `/posts/2014-2021` - Old blog posts which are merged to the same output folder as `/posts`
|
|
- `/posts/2014-2021` - Old blog posts which are merged to the same output folder as `/posts`
|
|
|
- this folder is only for convenience to easily access new posts
|
|
- this folder is only for convenience to easily access new posts
|
|
|
|
|
|
|
|
-**Files**
|
|
|
|
|
|
|
+### Files
|
|
|
|
|
|
|
|
- `/posts/posts.json` - Blog post defaults so they don't have to be repeated in the front matter
|
|
- `/posts/posts.json` - Blog post defaults so they don't have to be repeated in the front matter
|
|
|
- `*.html` - HTML content pages
|
|
- `*.html` - HTML content pages
|
|
@@ -93,7 +83,7 @@ The folder structure is crucial for Eleventy, as it determines the output of the
|
|
|
- `.eleventyignore` - Lists files and folders not to be processed by Eleventy
|
|
- `.eleventyignore` - Lists files and folders not to be processed by Eleventy
|
|
|
- `package.json` - Eleventy project metadata used by `npm`
|
|
- `package.json` - Eleventy project metadata used by `npm`
|
|
|
|
|
|
|
|
-**Non Eleventy files:**
|
|
|
|
|
|
|
+### Non Eleventy files
|
|
|
|
|
|
|
|
- `.nojekyll` - Special file for GitHub Pages
|
|
- `.nojekyll` - Special file for GitHub Pages
|
|
|
- `CNAME` - Custom domain for GitHub Pages
|
|
- `CNAME` - Custom domain for GitHub Pages
|
|
@@ -106,11 +96,10 @@ The folder structure is crucial for Eleventy, as it determines the output of the
|
|
|
- `web.config` - Configuration file for IIS deployment
|
|
- `web.config` - Configuration file for IIS deployment
|
|
|
- `web.Release.config` - Configuration file for Windows ASP.NET Core deployment
|
|
- `web.Release.config` - Configuration file for Windows ASP.NET Core deployment
|
|
|
|
|
|
|
|
|
|
+> [!NOTE]
|
|
|
|
|
+> This project includes Visual Studio solution and files so you can edit the files from the Visual Studio project.
|
|
|
|
|
|
|
|
-**Note:** This project includes ASP.NET Core solution and files, as they can be used seamlessly with Eleventy. Read more about this in our [Installation](installation.md#asp-net-core.md) section.
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-# Layouts
|
|
|
|
|
|
|
+## Layouts
|
|
|
|
|
|
|
|
All the layouts are located in the `/_layouts` folder. The `default` layout is the main layout page and is used by all the other layouts.
|
|
All the layouts are located in the `/_layouts` folder. The `default` layout is the main layout page and is used by all the other layouts.
|
|
|
|
|
|
|
@@ -119,15 +108,15 @@ All the layouts are located in the `/_layouts` folder. The `default` layout is t
|
|
|
- `page` - Used by most of the pages
|
|
- `page` - Used by most of the pages
|
|
|
- `post` - Used by blog posts
|
|
- `post` - Used by blog posts
|
|
|
|
|
|
|
|
-# Includes
|
|
|
|
|
|
|
+## Includes
|
|
|
|
|
|
|
|
All the includes are located in the `/_includes` folder. The includes are reusable code snippets that can be included in multiple pages.
|
|
All the includes are located in the `/_includes` folder. The includes are reusable code snippets that can be included in multiple pages.
|
|
|
|
|
|
|
|
Some includes are used solely by the layouts, while others are used by the content pages.
|
|
Some includes are used solely by the layouts, while others are used by the content pages.
|
|
|
|
|
|
|
|
-# Advanced Topics
|
|
|
|
|
|
|
+## Advanced Topics
|
|
|
|
|
|
|
|
-## Creating Custom Shortcodes and Includes
|
|
|
|
|
|
|
+### Creating Custom Shortcodes and Includes
|
|
|
|
|
|
|
|
If you need to create a custom shortcode or include, please follow the existing structure and [include a comment](content.md#shortcodes-and-includes) to explain the new shortcode or include.
|
|
If you need to create a custom shortcode or include, please follow the existing structure and [include a comment](content.md#shortcodes-and-includes) to explain the new shortcode or include.
|
|
|
|
|
|
|
@@ -135,6 +124,6 @@ The shortcodes are defined in the `.eleventy.js` file, while the includes are lo
|
|
|
|
|
|
|
|
You can explore the existing shortcodes and includes to get a better understanding of how they work and how to create new ones.
|
|
You can explore the existing shortcodes and includes to get a better understanding of how they work and how to create new ones.
|
|
|
|
|
|
|
|
-## Performance Optimization
|
|
|
|
|
|
|
+### Performance Optimization
|
|
|
|
|
|
|
|
-ToDo: Remove this section if not needed
|
|
|
|
|
|
|
+ToDo: Remove this section if not needed
|