Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
harrymkt committed Sep 1, 2024
1 parent 9cb83c0 commit 9e2f84b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Deploy Cobalt

on:
push:
paths: [""Source/**", "_cobalt.yml"]
branches: [main]

workflow_dispatch:
jobs:
build-and-deploy:
runs-on: windows-latest
Expand Down
12 changes: 12 additions & 0 deletions Source/_layouts/post.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
<h1>{{ page.title }}</h1>
<p>Author: {{page.data.author}}</p>
<p>Published on: {{ page.published_date | date: "%A, %B %d %Y at %r" }}, GMT+6:30</p>
{% 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 %}
{% endcase %}
<p>Reading time: {{ phrase }}</p>
<br>

{{ page.content }}
Expand Down

0 comments on commit 9e2f84b

Please sign in to comment.