#!/bin/bash
#author: Lruihaocd ..
read -p "Please enter the article name: " postName
if[ -z $postName];thenecho"The article name is required!"elseread -p "Will there be pictures in this article? [y/n]..." choice
if[$choice="y"];then hugo new posts/$postName/index.md
else hugo new posts/$postName.md
fifi
hugo_server.sh
1
2
cd ..
hugo server --disableFastRender
hugo_builder.sh
1
2
cd ..
hugo --minify
public_async.sh
1
2
3
4
cd ..
git submodule update --remote
git add public
git commit -m "Feat: Update public module commit id"
#!/bin/bash
#author: Lruihaoecho"Please enter the serial number to work"echo"--------------------------------------"echo"1. post generator"echo"2. hugo server"echo"3. hugo build"echo"4. public async"echo"5. auto push"echo"--------------------------------------"echo"Press Ctrl+C to stop"read num
case$num in
1) sh post_generator.sh
;; 2) sh hugo_server.sh
;; 3) sh hugo_builder.sh
;; 4) sh public_async.sh
;; 5) sh auto_push.sh
;; *)echo"There is no such serial number";;esacecho"Press any key to continue..."read x
clear
sh hugo_main.sh