This repository has been archived on 2025-03-28. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coryd.dev-eleventy/src/pages/stats.html
2023-12-28 08:28:31 -08:00

22 lines
No EOL
1.3 KiB
HTML

---
title: Statistics
layout: default
permalink: /stats.html
---
<p>My first post was published on <strong class="highlight-text">{{ collections.postStats.firstPostDate | dateToReadableDate }}</strong> and my most recent one was published on <strong class="highlight-text">{{ collections.postStats.lastPostDate | dateToReadableDate }}</strong>. I've published <strong class="highlight-text">{{ collections.postStats.postCount }} posts</strong> containing <strong class="highlight-text">{{ collections.postStats.totalWordCount }} words</strong> and <strong class="highlight-text">{{ collections.postStats.totalCodeBlockCount }} code samples</strong>.</p>
<p>Posts have, on average, <strong class="highlight-text">{{ collections.postStats.avgWordCount | round }} words</strong> and a gap of <strong class="highlight-text">{{ collections.postStats.avgDays | round }} days</strong> between them.</p>
<h2>Popular posts</h2>
<ol>
{% assign posts = collections.posts | getPopularPosts: analytics %}
{% for post in posts limit: 10 %}
<li>
<a href="{{post.url}}" title="{{ post.data.title | escape}}">
{{ post.data.title }}
</a>
</li>
{% endfor %}
</ol>
<h3>Posts by year</h3>
{% render "partials/post-graph.liquid", postYears: collections.postStats.years %}
<h4>Post distribution graphs</h4>
{%- postGraph collections.posts -%}