PHP Changes

master
root 2 years ago
parent be9436dac5
commit 9846e01c2e

@ -29,6 +29,12 @@ I'm taking advantage of the fact I can make a folder, put a _posts folder under
Post images or external resources ***ARE NOT*** stored in this repository. You think I'm crazy?
## Use of PHP
Despite being a static site generator; pickmy.org has usually had some form of random text line on it's pages since it's inception. To this effect I have specified permalinks on everything using a new format so Jekyll outputs .php files.
taglines.txt is not the same one used on the site. That one is stored externally and symlinked when the site is built.
## compose.sh
Compose.sh is a bash script becuase I'm lazy. It creates a file populated with front matter:
@ -37,6 +43,7 @@ Compose.sh is a bash script becuase I'm lazy. It creates a file populated with f
---
title:
date:
permalink:
exceprt_seperator:
---
```
@ -48,3 +55,5 @@ user@host:~/blogsite$ ./compose.sh blog Post Title Here
```
It's the blog category followed by the title. You don't have to enclose the title, the script automatically assumes every word after the first is the title.
Permalink is set to output .php extensions under /category/year/MON/day-title.php - modify how you need.

@ -1,9 +0,0 @@
---
title: newtest
layout: post
date: 2022-08-30 00:23:51
permalink: /blog/2022/AUG/30-newtest.php
excerpt_separator: <!--more-->
---
This is a test of the new changes to the composer.

@ -0,0 +1,9 @@
---
title: PHP Added
layout: post
date: 2022-08-30 00:40:15
permalink: /blog/2022/AUG/30-php-added.php
excerpt_separator: <!--more-->
---
Since it's very early days, pickmy.org has always had some form of simple random text generation on the page. So in breaking with the entire idea of making a static site; I implemented a bunch of changes so this thing uses a little PHP. Just a little. As a treat.

@ -17,6 +17,7 @@ shift 1
# Read everything else as title.
title=$@
t=${title,,}
t=${t// /-}
fd=$(date +'%Y/%^b/%d')
# Let's write the front matter to our temp file.
printf -- "---\ntitle: $title\nlayout: post\ndate: $pd $pt\npermalink: /$category/$fd-$t.php\nexcerpt_separator: <!--more-->\n---\n\n" >> $file
@ -26,4 +27,4 @@ nano + $file
# Move the file to category/_posts replacing spaces with hyphen
mv $file $category/_posts/$pd-${t// /-}.md
# Display some output to verify it's done.
printf "\nPost $title created in $category: $category/_posts/$pd-${t// /-}.md\n\n"
printf "\nPost $title created in $category: $category/_posts/$pd-$t.md\n\n"

@ -1,24 +1,6 @@
Give Fohdeesha Free Arby's
Thanks again Hogie.
more fat, more preservatives
the best website no one reads
the corner of the internet
dd if=/dev/random of=/www/pickmy.org
rm -r /www/pickmy.org
/www/taglines: File Not Found
spoiler alert: your shitbox doesn't need one.
you are a fluke of the universe
eastbound and down
never imitated, never in demand
sssh. i'm hacking the theme.
boycott shampoo! demand real poo!
spoiler alert: shit happens
self-hosted for my pleasure
..-. ..- -.-. -.- -.-- --- ..-
kanye likes fishsticks
error 0xID10T: reader
kernel panic: bit-bucket full
kernel panic: location 0xD15C0
system error: refill magic smoke
because it sounded sexier than .net
i've had three pfizer shots. when does my dick get 5g?
these are example taglines
one per line
if you see these, you screwed up
you need to check your symlinks
oops. placeholder text
fix your script idiot

Loading…
Cancel
Save