Skip to content

Commit

Permalink
fix: Archetypes
Browse files Browse the repository at this point in the history
Fixes: #78
  • Loading branch information
hmajid2301 committed Mar 1, 2023
1 parent 64545a7 commit f5adc72
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 8 deletions.
4 changes: 1 addition & 3 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ tasks:

new_post:
cmds:
- hugo new --kind post-bundle posts/{{now | date "2006-01-02"}}-{{.ARTICLE_NAME}}
env:
ARTICLE_NAME: foo
- script/add {{.CLI_ARGS}}

new_talk:
cmds:
Expand Down
8 changes: 3 additions & 5 deletions archetypes/post-bundle/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: {{ replace .Name "-" " " | title }}
title: {{ slicestr (replace .Name "-" " ") 11 | title }}
date: {{ dateFormat "2006-01-02" .Date }}
canonicalUrl: {{ site.BaseURL }}posts/{{ replace .Name "-" " " | title }}/
draft: true
tags:
-
canonicalUrl: https://haseebmajid.dev/posts/{{.Name}}
tags: []
---
11 changes: 11 additions & 0 deletions scripts/add
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

TITLE=${1:-}

TITLE_SLUG="$(echo -n "$TITLE" | sed -e 's/[^[:alnum:]]/-/g' | tr -s '-' | tr A-Z a-z)"
DATE="$(date +"%F")"
SLUG="$DATE-$TITLE_SLUG"

# git checkout -b "$SLUG"
hugo new --kind post-bundle posts/$SLUG

Binary file added static/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/cover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/favicon.ico
Binary file not shown.
Binary file added static/fonts/iconfont/iconfont.ttf
Binary file not shown.
19 changes: 19 additions & 0 deletions static/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

0 comments on commit f5adc72

Please sign in to comment.