This repository has been archived on 2025-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
coryd.dev-eleventy/src/pages/secondary/stats.html

26 lines
No EOL
1.6 KiB
HTML

---
title: Statistics
layout: default
description: 'Post stats and other information about my site.'
permalink: /stats.html
---
<h2 class="page-header">{{ title }}</h2>
<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>
<p><strong>Top tags</strong></p>
{% render "partials/widgets/tags.liquid", tags:collections.tagsSortedByCount %}
<p><strong>Popular posts</strong></p>
<ol class="link-list">
{% 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>
<p><strong>Posts by year</strong></p>
{% render "partials/widgets/post-graph.liquid", postYears: collections.postStats.years %}
<p><strong>Post distribution graphs</strong></p>
{%- postGraph collections.posts -%}