From 9846e01c2ebe675c61f0a90892a5908fba564502 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 30 Aug 2022 00:41:34 +0000 Subject: [PATCH] PHP Changes --- README.md | 9 +++++++++ blog/_posts/2022-08-30-newtest.md | 9 --------- blog/_posts/2022-08-30-php-added.md | 9 +++++++++ compose.sh | 3 ++- taglines.txt | 30 ++++++----------------------- 5 files changed, 26 insertions(+), 34 deletions(-) delete mode 100644 blog/_posts/2022-08-30-newtest.md create mode 100644 blog/_posts/2022-08-30-php-added.md diff --git a/README.md b/README.md index 252da5c..0bcbef9 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/blog/_posts/2022-08-30-newtest.md b/blog/_posts/2022-08-30-newtest.md deleted file mode 100644 index 34d7b27..0000000 --- a/blog/_posts/2022-08-30-newtest.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: newtest -layout: post -date: 2022-08-30 00:23:51 -permalink: /blog/2022/AUG/30-newtest.php -excerpt_separator: ---- - -This is a test of the new changes to the composer. diff --git a/blog/_posts/2022-08-30-php-added.md b/blog/_posts/2022-08-30-php-added.md new file mode 100644 index 0000000..9bb89b2 --- /dev/null +++ b/blog/_posts/2022-08-30-php-added.md @@ -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: +--- + +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. diff --git a/compose.sh b/compose.sh index 390a089..e4be974 100755 --- a/compose.sh +++ b/compose.sh @@ -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: \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" diff --git a/taglines.txt b/taglines.txt index 796e1cb..45b60d1 100644 --- a/taglines.txt +++ b/taglines.txt @@ -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