Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove docpad thumbnails and generate homepage #233

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions 11ty-source/_layouts/home.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">

{% 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" %}
<body>

{% 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"%}
<script src="/11ty-bundle.js"></script>

</body>

</html>

2 changes: 1 addition & 1 deletion 11ty-source/demos/Filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
title: "Filters"
layout: demo
source: "Effects/Filters"
tags: ['homepage_demo']
tags: homepage_demo
targets: "html5"
---
2 changes: 1 addition & 1 deletion 11ty-source/demos/Flappybalt.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ layout: demo
width: 480
height: 720
source: "Arcade/Flappybalt"
tags: ['homepage_demo']
tags: homepage_demo
targets: "html5"
---

Expand Down
2 changes: 1 addition & 1 deletion 11ty-source/demos/FlxNape.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "FlxNape"
layout: demo
source: "Features/FlxNape"
tags: ['homepage_demo']
tags: homepage_demo
targets: "html5"
---

Expand Down
2 changes: 1 addition & 1 deletion 11ty-source/demos/FlxSpine.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "FlxSpine"
layout: demo
source: "Editors/FlxSpine"
tags: ['homepage_demo']
tags: homepage_demo
targets: "html5"
---

Expand Down
2 changes: 1 addition & 1 deletion 11ty-source/demos/MinimalistTD.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "MinimalistTD"
layout: demo
source: "Arcade/MinimalistTD"
tags: ['homepage_demo']
tags: homepage_demo
targets: "html5"
---

Expand Down
2 changes: 1 addition & 1 deletion 11ty-source/demos/Mode.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Mode"
layout: demo
tags: ['homepage_demo']
tags: homepage_demo
source: "Platformers/Mode"
targets: "html5"
---
Expand Down
16 changes: 8 additions & 8 deletions src/documents/index.html.eco → 11ty-source/index.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ title: 'Home'
<div class="container">
<div class="home-header home-section">

<a href="documentation/about" class="home-big-logo" title="About HaxeFlixel">
<img src="images/haxeflixel.svg" width="200" alt="HaxeFlixel Logo">
<a href="/documentation/about" class="home-big-logo" title="About HaxeFlixel">
<img src="/images/haxeflixel.svg" width="200" alt="HaxeFlixel Logo">
</a>

<h1>HaxeFlixel</h1>
Expand Down Expand Up @@ -79,15 +79,15 @@ title: 'Home'

<div class="demos-home home-section">

<p class="lead-line-large">Browse and learn from our <a href="/demos"><%= @getCollection('demos').length %> demos</a>:</h3></p>
<p class="lead-line-large">Browse and learn from our <a href="/demos">{{ collections.demo-item.length }} demos</a>:</h3></p>

<% for demo in @getCollection('homepage_demos').toJSON(): %>
{% for demo in collections.homepage_demo %}
<a href="<%= demo.url %>" property="dc:title">

<a href="<%= demo.url %>" property="dc:title">
<img src="<%= @getThumbnail("/images/demos/#{demo.title}.png", "zoomcrop", { w:160, h:160 }) %>" alt="#{demo.title}" title = "<%= demo.title %>" />
{% capture imgURL %}src/files/images/demos/{{ demo.data.title }}.png{% endcapture %}
{% image imgURL, "#{{demo.data.title}}", 160, 160 %}
</a>

<% end %>
{% endfor %}

</div>

Expand Down
24 changes: 6 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down Expand Up @@ -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:

```
Expand Down Expand Up @@ -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:
```
---
Expand All @@ -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.
Expand All @@ -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.
3 changes: 0 additions & 3 deletions docpad.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,6 @@ docpadConfig = {
markedOptions:
gfm: true

thumbnails:
imageMagick: true

repocloner:
repos: [
{
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
18 changes: 0 additions & 18 deletions src/layouts/home.html.eco

This file was deleted.

Loading