From 5401b753618b36c772f48c0590246eceef404f13 Mon Sep 17 00:00:00 2001 From: giteaadmin Date: Thu, 7 Aug 2025 14:45:30 -0400 Subject: [PATCH] updated blog page --- src/blog.njk | 2 +- src/{posts => blog}/8.5.25.md | 3 ++- src/{posts => blog}/test.md | 20 ++++++++++++-------- 3 files changed, 15 insertions(+), 10 deletions(-) rename src/{posts => blog}/8.5.25.md (87%) rename src/{posts => blog}/test.md (93%) diff --git a/src/blog.njk b/src/blog.njk index 28df634..d109a4f 100644 --- a/src/blog.njk +++ b/src/blog.njk @@ -8,7 +8,7 @@ layout: "layout.njk"
{%- for post in collections.posts | reverse -%}
-

+

{{ post.data.title }}

diff --git a/src/posts/8.5.25.md b/src/blog/8.5.25.md similarity index 87% rename from src/posts/8.5.25.md rename to src/blog/8.5.25.md index e94271e..5a2b5d7 100644 --- a/src/posts/8.5.25.md +++ b/src/blog/8.5.25.md @@ -1,8 +1,9 @@ --- title: "My First Blog Post" -date: "2025-08-05" +date: "2025-08-06" layout: "post.njk" tags: "posts" +excerpt: Made using Eleventy! --- Welcome to my new blog! This is my very first post. This website was created using eleventy in a custom nodejs docker container, pretty cool huh?? Maybe I'll post the source code one here one day! diff --git a/src/posts/test.md b/src/blog/test.md similarity index 93% rename from src/posts/test.md rename to src/blog/test.md index 1f03703..dcb4cac 100644 --- a/src/posts/test.md +++ b/src/blog/test.md @@ -1,12 +1,11 @@ --- -title: "Second blog post" -date: "2025-08-06" +title: "Test page!" +date: "2025-08-07" layout: "post.njk" +tags: "posts" +excerpt: This post is a feature showcase of what you can do with Eleventy --- -## Purpose -This post is a feature showcase of what you can do with Eleventy - ## What is Eleventy? Eleventy (or 11ty) is a simpler static site generator. It's written in JavaScript and transforms a directory of templates of various types into a folder of plain HTML files. It's known for its flexibility, speed, and the fact that it doesn't ship any client-side JavaScript by default. @@ -54,11 +53,15 @@ You can extend Markdown's functionality with plugins. For example, with `markdow ## Templating and Data Eleventy can use data from JSON or JavaScript files. Imagine you have a `_data/users.json` file. -

[
+
+```json
+[
     { "name": "Alice", "role": "Developer" },
     { "name": "Bob", "role": "Designer" }
+    ...
 ]
-
+``` + You could then use a templating language like Nunjucks within your Markdown file to loop through this data: ### Team Members: @@ -85,7 +88,8 @@ Layouts allow you to wrap your content in a parent template. For example, this e In your Markdown file's front matter, you would specify the layout like this: ``` --- -layout: base.njk +layout: post.njk title: My Awesome Page --- Your Markdown content goes here... +``` \ No newline at end of file