[init] initial commit

This commit is contained in:
2023-06-05 23:04:30 +08:00
commit 66b1dd4d70
72 changed files with 10079 additions and 0 deletions

36
old/blog_update.sh Normal file
View File

@ -0,0 +1,36 @@
#!/bin/bash
#===================================================================
# Filename : jekyll.sh
# Function :
# Usage :
# Author : Manford Fan
# Date : 2021-08-29 13:10
# Version : Version 0.1
# Disclaimer : The author is NOT responsible for any loss caused
# by the user's own operations.
# And More : If you find there are some bugs in this script
# Or you have better ideas, please do contact me
# via E-mail -- mffan0922@163.com
#===================================================================
# update blog
echo `date`
rm -rf /opt/websites/blog
let numOfAvatar=`ls /opt/websites/nav/assets/images/logos/ | wc -l`
let randNumber=$RANDOM%$numOfAvatar
cp /opt/websites/nav/assets/images/logos/${randNumber}.jpg /opt/websites/homepage/assets/img/logo.jpg -rf
cp /opt/websites/nav/assets/images/logos/${randNumber}.jpg /opt/source-code/blog/img/avatar.jpg -rf
cp /opt/websites/nav/assets/images/logos/${randNumber}.jpg /opt/websites/nav/assets/images/logos/avatar.jpg -rf
jekyll b -s /opt/source-code/blog/ -d /opt/websites/blog/
# update bash
rm -rf /opt/websites/just-the-docs/bash
jekyll b -s /opt/source-code/document/bash -d /opt/websites/just-the-docs/bash
# update python
rm -rf /opt/websites/just-the-docs/python
jekyll b -s /opt/source-code/document/python -d /opt/websites/just-the-docs/python
chown -R www-data:www-data /opt/websites