mirror of
https://github.com/ff4500/utilities.git
synced 2026-07-01 11:47:04 -05:00
script updates
This commit is contained in:
BIN
images/news_md/news_articles/_templates/template.psd
Normal file
BIN
images/news_md/news_articles/_templates/template.psd
Normal file
Binary file not shown.
38
images/news_md/news_articles/news/.md
Normal file
38
images/news_md/news_articles/news/.md
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
layout: news-post
|
||||||
|
|
||||||
|
title: ""
|
||||||
|
header: ""
|
||||||
|
|
||||||
|
date:
|
||||||
|
categories: []
|
||||||
|
|
||||||
|
is_external_link: false
|
||||||
|
publication: ""
|
||||||
|
externallink: ""
|
||||||
|
|
||||||
|
background_color: "" # Hex color - ex: #fc4c02
|
||||||
|
|
||||||
|
featured: false
|
||||||
|
featured_sm: false
|
||||||
|
highlighted: false
|
||||||
|
|
||||||
|
featured_image: /assets/images/posts/zzz/processed/zzz-image_feature
|
||||||
|
featured_sm_image: /assets/images/posts/zzz/processed/zzz-image_feature_sm
|
||||||
|
highlighted_image: /assets/images/posts/zzz/processed/zzz-image_highlight
|
||||||
|
neu_image_extension: 'jpg'
|
||||||
|
|
||||||
|
jumbotron_image: /assets/images/posts/zzz/processed/zzz-jumbotron
|
||||||
|
background_image: /assets/images/posts/zzz/processed/zzz-background
|
||||||
|
thumbnail_image: /assets/images/posts/zzz/processed/zzz-thumbnail
|
||||||
|
image_extension: 'jpg'
|
||||||
|
|
||||||
|
image: # Facebook feature image
|
||||||
|
path: /assets/images/posts/zzz/processed/zzz-featured-facebook.jpg
|
||||||
|
width: 960
|
||||||
|
height: 540
|
||||||
|
|
||||||
|
blurb: ""
|
||||||
|
|
||||||
|
published: true
|
||||||
|
---
|
||||||
@@ -7,13 +7,10 @@ template_dir="${base_dir}/_templates"
|
|||||||
user_parameter="$1"
|
user_parameter="$1"
|
||||||
p="${user_parameter}"
|
p="${user_parameter}"
|
||||||
|
|
||||||
if [ ! -z "$p" ]; then
|
# if [ ! -z "$p" ]; then
|
||||||
article_dir="${news_dir}/${p}"
|
# article_dir="${news_dir}/${p}"
|
||||||
echo "${article_dir}"
|
# echo "${article_dir}"
|
||||||
else
|
# fi
|
||||||
article_dir="${news_dir}/zzz" #${article_dir_cli}"
|
|
||||||
echo "${article_dir}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mk_news() {
|
mk_news() {
|
||||||
if [ ! -d "${base_dir}" ]; then
|
if [ ! -d "${base_dir}" ]; then
|
||||||
@@ -33,8 +30,14 @@ mk_news() {
|
|||||||
|
|
||||||
mk_folder() {
|
mk_folder() {
|
||||||
if [ ! -z "$p" ]; then
|
if [ ! -z "$p" ]; then
|
||||||
mkdir "${news_dir}/${p}"
|
article_dir="${news_dir}/${p}"
|
||||||
#echo "$p"
|
#echo "${article_dir}"
|
||||||
|
if [ -d "${article_dir}" ]; then
|
||||||
|
echo -e "${p} already exists - please enter a different name."
|
||||||
|
else
|
||||||
|
mkdir "${article_dir}"
|
||||||
|
#echo -e "Made your folder. Go check it out."
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
while read -ep "Enter the name of the article to create: " file_dir; do
|
while read -ep "Enter the name of the article to create: " file_dir; do
|
||||||
if [ -d "${news_dir}/${file_dir}" ]; then
|
if [ -d "${news_dir}/${file_dir}" ]; then
|
||||||
@@ -49,10 +52,15 @@ mk_folder() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cp_templates() {
|
cp_templates() {
|
||||||
cp "${template_dir}/news_template.md" "${news_dir}/${file_dir}/${file_dir}.md"
|
if [ ! -z "$p" ]; then
|
||||||
cp "${template_dir}/template.psd" "${news_dir}/${file_dir}/${file_dir}_template.psd"
|
cp "${template_dir}/news_template.md" "${article_dir}/${p}.md"
|
||||||
|
cp "${template_dir}/template.psd" "${article_dir}/${p}_template.psd"
|
||||||
|
else
|
||||||
|
cp "${template_dir}/news_template.md" "${news_dir}/${file_dir}/${file_dir}.md"
|
||||||
|
cp "${template_dir}/template.psd" "${news_dir}/${file_dir}/${file_dir}_template.psd"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#mk_news
|
mk_news
|
||||||
#mk_folder
|
mk_folder
|
||||||
#cp_templates
|
cp_templates
|
||||||
Reference in New Issue
Block a user