From 72a01826b5fe2cb1e05d236fb1a63b3b4d9bdd50 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 22 Feb 2024 16:19:11 -0500 Subject: [PATCH] remove docpad thumbnails and generate homepage --- 11ty-source/_layouts/home.liquid | 25 +++++++++++++++++++ 11ty-source/demos/Filters.md | 2 +- 11ty-source/demos/Flappybalt.md | 2 +- 11ty-source/demos/FlxNape.md | 2 +- 11ty-source/demos/FlxSpine.md | 2 +- 11ty-source/demos/MinimalistTD.md | 2 +- 11ty-source/demos/Mode.md | 2 +- .../index.liquid | 16 ++++++------ README.md | 24 +++++------------- docpad.coffee | 3 --- package.json | 1 - src/layouts/home.html.eco | 18 ------------- 12 files changed, 45 insertions(+), 54 deletions(-) create mode 100644 11ty-source/_layouts/home.liquid rename src/documents/index.html.eco => 11ty-source/index.liquid (90%) delete mode 100644 src/layouts/home.html.eco diff --git a/11ty-source/_layouts/home.liquid b/11ty-source/_layouts/home.liquid new file mode 100644 index 000000000..b4b7a3906 --- /dev/null +++ b/11ty-source/_layouts/home.liquid @@ -0,0 +1,25 @@ + + + +{% comment %} <%- @partial('head.html.eco', {title:@getPreparedTitle()}, {description:@getPreparedDescription()}, {keywords:@getPreparedKeywords()}, {author:@site.author or ''}, {styles:@getBlock("styles").add(["/styles/style.css", "/vendor/highlightjs/styles/an-old-hope.min.css"]).toHTML()} ) %> {% endcomment %} +{% renderFile "./11ty-source/_layouts/partials/head.liquid" %} + + +{% renderFile "./11ty-source/_layouts/partials/header-menu.liquid" %} + + + {% comment %} Make sure each class renders it's title {% endcomment %} + {{ content }} + + +{% renderFile "./11ty-source/_layouts/partials/footer.html" %} + +{% comment %} <%- @getBlock('scripts').add(@site.scripts).toHTML() %> {% endcomment %} + +{%renderFile "./11ty-source/cdn-scripts.liquid"%} + + + + + + diff --git a/11ty-source/demos/Filters.md b/11ty-source/demos/Filters.md index 2476c1fb9..e1bded573 100644 --- a/11ty-source/demos/Filters.md +++ b/11ty-source/demos/Filters.md @@ -2,6 +2,6 @@ title: "Filters" layout: demo source: "Effects/Filters" -tags: ['homepage_demo'] +tags: homepage_demo targets: "html5" --- \ No newline at end of file diff --git a/11ty-source/demos/Flappybalt.md b/11ty-source/demos/Flappybalt.md index 6efc9d84b..5964e39a1 100644 --- a/11ty-source/demos/Flappybalt.md +++ b/11ty-source/demos/Flappybalt.md @@ -4,7 +4,7 @@ layout: demo width: 480 height: 720 source: "Arcade/Flappybalt" -tags: ['homepage_demo'] +tags: homepage_demo targets: "html5" --- diff --git a/11ty-source/demos/FlxNape.md b/11ty-source/demos/FlxNape.md index 6c3e76550..81262ce18 100644 --- a/11ty-source/demos/FlxNape.md +++ b/11ty-source/demos/FlxNape.md @@ -2,7 +2,7 @@ title: "FlxNape" layout: demo source: "Features/FlxNape" -tags: ['homepage_demo'] +tags: homepage_demo targets: "html5" --- diff --git a/11ty-source/demos/FlxSpine.md b/11ty-source/demos/FlxSpine.md index 75f500747..799a6eafc 100644 --- a/11ty-source/demos/FlxSpine.md +++ b/11ty-source/demos/FlxSpine.md @@ -2,7 +2,7 @@ title: "FlxSpine" layout: demo source: "Editors/FlxSpine" -tags: ['homepage_demo'] +tags: homepage_demo targets: "html5" --- diff --git a/11ty-source/demos/MinimalistTD.md b/11ty-source/demos/MinimalistTD.md index ca1451f36..93c9520a9 100644 --- a/11ty-source/demos/MinimalistTD.md +++ b/11ty-source/demos/MinimalistTD.md @@ -2,7 +2,7 @@ title: "MinimalistTD" layout: demo source: "Arcade/MinimalistTD" -tags: ['homepage_demo'] +tags: homepage_demo targets: "html5" --- diff --git a/11ty-source/demos/Mode.md b/11ty-source/demos/Mode.md index 9130f116b..750ddb31a 100644 --- a/11ty-source/demos/Mode.md +++ b/11ty-source/demos/Mode.md @@ -1,7 +1,7 @@ --- title: "Mode" layout: demo -tags: ['homepage_demo'] +tags: homepage_demo source: "Platformers/Mode" targets: "html5" --- diff --git a/src/documents/index.html.eco b/11ty-source/index.liquid similarity index 90% rename from src/documents/index.html.eco rename to 11ty-source/index.liquid index 097ccb927..08718a584 100644 --- a/src/documents/index.html.eco +++ b/11ty-source/index.liquid @@ -6,8 +6,8 @@ title: 'Home'
-

HaxeFlixel

@@ -79,15 +79,15 @@ title: 'Home'
-

Browse and learn from our <%= @getCollection('demos').length %> demos:

+

Browse and learn from our {{ collections.demo-item.length }} demos:

- <% for demo in @getCollection('homepage_demos').toJSON(): %> + {% for demo in collections.homepage_demo %} + - - " alt="#{demo.title}" title = "<%= demo.title %>" /> + {% capture imgURL %}src/files/images/demos/{{ demo.data.title }}.png{% endcapture %} + {% image imgURL, "#{{demo.data.title}}", 160, 160 %} - - <% end %> + {% endfor %}
diff --git a/README.md b/README.md index cf2dca888..e72572da9 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This is the source of [haxeflixel.com](https://haxeflixel.com/). It was orgiginally made with [DocPad](https://docpad.bevry.me/), but it's in a transition to [11ty](https://www.11ty.dev/). -You can compile this website yourself with a local install of DocPad, pull requests are welcome. +You can compile this website yourself with an install of DocPad, pull requests are welcome. 1. [Install DocPad](https://docpad.bevry.me/start/install) @@ -21,7 +21,7 @@ You can compile this website yourself with a local install of DocPad, pull reque git clone https://github.com/HaxeFlixel/haxeflixel.com.git cd haxeflixel.com ``` - To install dependencies and run docpad, run the following commands: + To install dependencies and build the site, run the following commands: ```batch npm install @@ -53,8 +53,8 @@ please review the readme there for more info on updating the haxeflixel.com/docu ### How to add a demo -1. Create a `.html.md` file in -[`/src/documents/demos`](https://github.com/HaxeFlixel/haxeflixel.com/tree/master/src/documents/demos) +1. Create a `.md` file in +[`/11ty-source/demos`](https://github.com/HaxeFlixel/haxeflixel.com/tree/deev/11ty-source/demos) following this example: ``` @@ -82,14 +82,10 @@ that contains the demo. 2. Add a screenshot of the demo named `Demo-Name.png` to [`/src/files/demos/images`](https://github.com/HaxeFlixel/haxeflixel.com/tree/master/src/files/demos/images). -3. Add the actual swf file of the demo named `Demo-Name.swf` to -[`/src/files/demos/swf`](https://github.com/HaxeFlixel/haxeflixel.com/tree/master/src/files/demos/swf). -Should be compiled with `FLX_NO_DEBUG` (to show the flixel splash screen) and in release mode if possible! - ### How to add a Showcase game 1. Create a `.md` file in -[`/src/documents/showcase`](https://github.com/HaxeFlixel/haxeflixel.com/tree/master/src/documents/showcase) +[`/11ty-source/showcase`](https://github.com/HaxeFlixel/haxeflixel.com/tree/dev/11ty-source/showcase) following this example: ``` --- @@ -104,7 +100,7 @@ following this example: date: "2022-02-01" --- - Note that `date` is currently unused but will eventually be used to sort, dates should use US format of month-day-20XX + Dates should use YYYY-MM-DD Note that by adding a URL to one of the supported targets, the icon will automatically become coloured on the [showcase page](https://haxeflixel.com/showcase) and link to that URL. @@ -116,11 +112,3 @@ They are resized and cropped to 500x260, so it's best to use the same ratio. Showcases that are not officially released yet are only accepted in special cases. The same is true for games from game jams. ---- - -## Compile the live site - -haxeflixel.com is being hosted from a [static build of docpad](https://docpad.bevry.me/start/deploy). To update the site -run the `compile.sh` or `compile.bat` which uses `docpad generate --env static`. - -Note that although both the `run` and `compile` scripts update the `out` folder they are different commands and -`run` will not create everything the server needs. diff --git a/docpad.coffee b/docpad.coffee index 9322eb5e4..1d76b1096 100644 --- a/docpad.coffee +++ b/docpad.coffee @@ -202,9 +202,6 @@ docpadConfig = { markedOptions: gfm: true - thumbnails: - imageMagick: true - repocloner: repos: [ { diff --git a/package.json b/package.json index 269629edc..988add385 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ "docpad-plugin-partials": "2.12.0", "docpad-plugin-repocloner": "2.3.1", "docpad-plugin-services": "2.7.0", - "docpad-plugin-thumbnails": "2.1.2", "remove-markdown": "github:stiang/remove-markdown#main", "sharp": "^0.33.2" }, diff --git a/src/layouts/home.html.eco b/src/layouts/home.html.eco deleted file mode 100644 index af9f9be00..000000000 --- a/src/layouts/home.html.eco +++ /dev/null @@ -1,18 +0,0 @@ - - - -<%- @partial('head.html.eco', {title:@getPreparedTitle()}, {description:@getPreparedDescription()}, {keywords:@getPreparedKeywords()}, {author:@site.author or ''}, {styles:@getBlock('styles').add(@site.styles or []).toHTML()} ) %> - - - -<%- @partial('header-menu.html.eco') %> - -<%- @content %> - -<%- @partial('footer.html') %> - -<%- @getBlock('scripts').add(@site.scripts).toHTML() %> - - - -