diff --git a/web/_cobalt.yml b/web/_cobalt.yml index 9120a787..b7f6ff06 100644 --- a/web/_cobalt.yml +++ b/web/_cobalt.yml @@ -22,3 +22,6 @@ posts: dir: blog rss: blog.xml jsonfeed: blog.json + publish_date_in_filename: false + default: + permalink: /{{parent}}/{{name}} \ No newline at end of file diff --git a/web/src/_includes/header.liquid b/web/src/_includes/header.liquid index 2b6b5313..cc1a830f 100644 --- a/web/src/_includes/header.liquid +++ b/web/src/_includes/header.liquid @@ -5,7 +5,10 @@ {% if page.published_date -%} {{ page.title }} – {{ collections.posts.title }} {%- else -%} -{{ page.title }} – {{ site.title }} +{% capture page_title %} +{{ page.title}}{% if paginator and paginator.index > 1 %} (page {{ paginator.index }}){%endif%} – {{ site.title }} +{% endcapture %} +{{ page_title }} {%- endif %} + Skip to content diff --git a/web/src/_layouts/post.liquid b/web/src/_layouts/post.liquid index 93ebefeb..8432d934 100644 --- a/web/src/_layouts/post.liquid +++ b/web/src/_layouts/post.liquid @@ -1,6 +1,18 @@ {% include "header.liquid" %}

{{ page.title }}

-

on {{ page.published_date | date: "%A, %B %d %Y at %r" }}

+

Published on

+{% assign reading_wpm = 200 %} +{% assign word_count = page.content | split: " " | size %} +{% assign reading_time = word_count | divided_by: reading_wpm %} +{% case reading_time %} +{% when 0 %} +{% assign phrase = "less than a minute." %} +{% when 1 %} +{% assign phrase = "about a minute." %} +{% else %} +{% assign phrase = " minutes." | prepend: reading_time | prepend: "about " %} +{% endcase %} +

Contains {{ word_count }} words, with an estimated reading time of {{ phrase }}

{{ page.content }} diff --git a/web/src/blog.md b/web/src/blog.md index b9b3e53a..e75bb98a 100644 --- a/web/src/blog.md +++ b/web/src/blog.md @@ -1,19 +1,54 @@ --- layout: default.liquid -title: Blog +title: The NVGT blog +description: The NVGT blog is where developers and contributors to the engine can post helpful tips about it's use, news and updates, insites about development, or anything else that doesn't fit very well in the documentation or in other areas of this site. It is a very minamilistic blogging setup using a static site generator and is meant for informational purposes only. permalink: /blog +pagination: + include: All + per_page: 5 + permalink_suffix: "./{{num}}/" + order: Desc + sort_by: ["published_date"] --- +# {{ page.title }} +{{ page.description }} -# {{ collections.posts.title }} -{{ collections.posts.description }} - -[RSS](/{{ collections.posts.rss }}) +[RSS](/blog.xml) ## posts -{% for post in collections.posts.pages %} -### [{{ post.title }}](/{{ post.permalink }}) -on {{ post.published_date | date: "%A, %B %d %Y at %r" }} +{% for post in paginator.pages %} +{% assign posttitle = post.title %} +{% if post.description and post.description != "" %} +{% assign posttitle = posttitle | append: " (" | append: post.description | append: ")" %} +{% endif %} +### [{{posttitle}}](/{{post.permalink}}) +Published on + +{{post.excerpt | strip_html}} + +{%endfor%} + +{%if paginator.previous_index or paginator.next_index%} + +{%endif%} \ No newline at end of file diff --git a/web/src/blog/2024-06-03-48-hours-post-launch-updates.md b/web/src/blog/48-hours-post-launch-updates.md similarity index 100% rename from web/src/blog/2024-06-03-48-hours-post-launch-updates.md rename to web/src/blog/48-hours-post-launch-updates.md diff --git a/web/src/blog/2024-04-10-initial-test.md b/web/src/blog/initial-test.md similarity index 100% rename from web/src/blog/2024-04-10-initial-test.md rename to web/src/blog/initial-test.md diff --git a/web/src/blog/2024-05-31-slowly-going-live.md b/web/src/blog/slowly-going-live.md similarity index 100% rename from web/src/blog/2024-05-31-slowly-going-live.md rename to web/src/blog/slowly-going-live.md diff --git a/web/src/downloads/index.lphp b/web/src/downloads/index.lphp index d22b1d2f..86560fca 100644 --- a/web/src/downloads/index.lphp +++ b/web/src/downloads/index.lphp @@ -23,7 +23,7 @@ function size2string($bytes) { // This function prints the information for a given version, again still a bit hacky. function echo_version($ver) { echo "

" . $ver . "

\n"; - echo "

Released on " . date("l, F jS, Y \a\\t h:i:s A", filemtime("nvgt_" . $ver . ".exe")) . " UTC.

\n"; + echo "

Released on .

\n"; $files = glob("nvgt_" . $ver . "*"); echo "