Added title list option + recode for gsl new

This commit is contained in:
Cyrille L 2022-04-12 17:56:54 +02:00
parent 0e5c836986
commit 9d75cb670f
5 changed files with 293 additions and 130 deletions

View File

@ -1,5 +1,5 @@
Package: egsl Package: egsl
Version: 0.0.15 Version: 0.0.16
Section: custom Section: custom
Priority: optional Priority: optional
Architecture: all Architecture: all

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# Version: 0.0.15 # Version: 0.0.16
# file: gsl # file: gsl
# Folder: /usr/local/bin # Folder: /usr/local/bin
# By echolib # By echolib
@ -81,6 +81,8 @@ case "$1" in
&& cd "$gsl_dir_user_posts" \ && cd "$gsl_dir_user_posts" \
&& gsl author add && gsl author add
echo
gsl log -s -w
exit exit
;; ;;
@ -465,8 +467,9 @@ if [[ "$gsl_checker_war" ]];then
gsl__logs_show gsl__logs_show
fi fi
if [[ "$gsl_checker_war" ]];then if [[ "$gsl_checker_err" ]];then
echo echo
gsl_logs_err=true gsl_logs_err=true
gsl__logs_show gsl__logs_show
exit 1
fi fi

View File

@ -11,7 +11,7 @@
# #
#======================================================================= #=======================================================================
gsl__new_website() { gsl__new_website() {
gsl_if_file "$gsl_dir_helps/gsl_infos_new_website" source gsl__if_file "$gsl_dir_helps/gsl_infos_new_website" read
clear clear
cat $gsl_dir_helps/gsl_infos_new_website cat $gsl_dir_helps/gsl_infos_new_website
@ -20,19 +20,6 @@ printf '\n%s\n%s\n%s\n' \
"# Cancel with empty field" \ "# Cancel with empty field" \
"# You will be asked to confirm at the end" "# You will be asked to confirm at the end"
#=======================================================================
# Webserver URI
#=======================================================================
echo -e "\n# Webserver: /var/www (Or maybe elsewhere...)"
read -erp \
": Webserver URI ? " \
gsl_set_server
[[ ${gsl_set_server: -1} == "/" ]] \
&& gsl_set_server=${gsl_set_server::-1}
gsl__check_settings $gsl_set_server || return
#======================================================================= #=======================================================================
# Domain URL # Domain URL
#======================================================================= #=======================================================================
@ -68,23 +55,65 @@ esac
gsl_set_ndd=`awk -F"." '{print $(NF-1)"."$NF}' <<< $gsl_set_ndd` gsl_set_ndd=`awk -F"." '{print $(NF-1)"."$NF}' <<< $gsl_set_ndd`
gsl_set_file_ndd="$gsl_set_ndd.conf" gsl_set_file_ndd="$gsl_set_ndd.conf"
[[ -d "$gsl_dir_user_domains/$gsl_set_ndd" ]] \ [[ -f "$gsl_dir_user_domains/$gsl_set_ndd/$gsl_set_file_ndd" ]] \
&& gsl_profile="HOME: $gsl_dir_user_domains/$gsl_set_ndd" \ && gsl_profile="$gsl_dir_user_domains/$gsl_set_ndd/$gsl_set_file_ndd" \
&& gsl_set_user_conf="Y" && gsl_set_user_conf="Y"
[[ -d "$gsl_dir_global_domains/$gsl_set_ndd" ]] \ [[ -f "$gsl_dir_global_domains/$gsl_set_ndd/$gsl_set_file_ndd" ]] \
&& gsl_profile="System: $gsl_dir_global_domains/$gsl_set_ndd" \ && gsl_profile="$gsl_dir_global_domains/$gsl_set_ndd/$gsl_set_file_ndd" \
&& gsl_set_user_conf="N" && gsl_set_user_conf="N"
if [[ "$gsl_profile" ]];then if [[ "$gsl_profile" ]];then
echo "! A Profile exists in your $gsl_profile" gsl__logs_print \
read -rp ": Continue (Y|*)" gsl_continue "$gsl_log_w" \
"New" \
"Profile" \
"Found configuration from $gsl_set_ndd" \
"$gsl_profile"
echo -e "\n! A Profile exists: $gsl_profile"
read -rp ": Continue (Y|*) " gsl_continue
case "$gsl_continue" in case "$gsl_continue" in
Y|y) true ;; Y|y)
*) gsl__check_settings $blank || return source "$gsl_profile" && \
gsl__logs_print \
"$gsl_log_i" \
"New" \
"Profile" \
"Load configuration from $gsl_set_ndd" \
"$gsl_profile"
gsl_profile_exists=true
;;
*)
return
;;
esac esac
fi fi
#=======================================================================
# Webserver URI
#=======================================================================
[[ $gsl_profile_exists ]] \
&& echo -e "\n# Webserver registred: $gsl_site_server" \
|| echo -e "\n# Webserver: /var/www (Or maybe elsewhere...)"
read -erp \
": Webserver URI ? " \
gsl_set_server
[[ ${gsl_set_server: -1} == "/" ]] \
&& gsl_set_server=${gsl_set_server::-1}
if [[ $gsl_profile_exists ]];then
if ! [[ "$gsl_set_server" ]];then
[[ "$gsl_site_server" ]] \
&& gsl_set_server="$gsl_site_server" \
|| gsl__check_settings $gsl_set_server || return
fi
else
gsl__check_settings $gsl_set_server || return
fi
#======================================================================= #=======================================================================
# Personal use or global use ? # Personal use or global use ?
#======================================================================= #=======================================================================
@ -94,16 +123,17 @@ if ! [[ "$gsl_set_user_conf" ]];then
": Home Use (y/n) ? " \ ": Home Use (y/n) ? " \
gsl_set_user_conf gsl_set_user_conf
fi fi
case "$gsl_set_user_conf" in case "$gsl_set_user_conf" in
y|Y) y|Y)
gsl_save_dir_ndd="$gsl_dir_user_domains/$gsl_set_ndd" gsl_save_dir_ndd="$gsl_dir_user_domains/$gsl_set_ndd"
gsl_save_conf_ndd="$gsl_save_dir_ndd/$gsl_set_file_ndd" gsl_save_conf_ndd="$gsl_save_dir_ndd/$gsl_set_file_ndd"
gsl_ask="# Save to $gsl_save_conf_ndd ? " gsl_ask="# Save to $gsl_save_conf_ndd (y|*) ? "
;; ;;
n|N) n|N)
gsl_save_dir_ndd="$gsl_dir_global_domains/$gsl_set_ndd" gsl_save_dir_ndd="$gsl_dir_global_domains/$gsl_set_ndd"
gsl_save_conf_ndd="$gsl_save_dir_ndd/$gsl_set_file_ndd" gsl_save_conf_ndd="$gsl_save_dir_ndd/$gsl_set_file_ndd"
gsl_ask="# Save to $gsl_save_conf_ndd" gsl_ask="# Save to $gsl_save_conf_ndd (y|*) ? "
;; ;;
*) echo "! Abandon... Maybe next time" && return ;; *) echo "! Abandon... Maybe next time" && return ;;
esac esac
@ -111,106 +141,253 @@ esac
#======================================================================= #=======================================================================
# Website Title # Website Title
#======================================================================= #=======================================================================
echo -e "\n# Title: My Compagny (or My beautiful website)" [[ $gsl_profile_exists ]] \
&& echo -e "\n# Title registred: $gsl_site_title" \
|| echo -e "\n# Title: My Compagny (or My beautiful website)"
read -rp \ read -rp \
": Website Title ? " \ ": Website Title ? " \
gsl_set_title gsl_set_title
gsl__check_settings $gsl_set_title || return if [[ $gsl_profile_exists ]];then
if ! [[ "$gsl_set_title" ]];then
[[ "$gsl_site_title" ]] \
&& gsl_set_title="$gsl_site_title" \
|| gsl__check_settings $gsl_set_title || return
fi
else
gsl__check_settings $gsl_set_title || return
fi
#======================================================================= #=======================================================================
# Website Description # Website Description
#======================================================================= #=======================================================================
echo -e "\n# Description: writings about this website" [[ $gsl_profile_exists ]] \
&& echo -e "\n# Description registred: $gsl_site_about" \
|| echo -e "\n# Description: writings about this website"
read -rp \ read -rp \
": Website Description ? " \ ": Website Description ? " \
gsl_set_about gsl_set_about
gsl__check_settings $gsl_set_about || return if [[ $gsl_profile_exists ]];then
if ! [[ "$gsl_set_about" ]];then
[[ "$gsl_site_about" ]] \
&& gsl_set_about="$gsl_site_about" \
|| gsl__check_settings $gsl_set_about || return
fi
else
gsl__check_settings $gsl_set_about || return
fi
#======================================================================= #=======================================================================
# Contact Mail # Contact Mail
#======================================================================= #=======================================================================
echo -e "\n# Mail: contact@example.com" [[ $gsl_profile_exists ]] \
&& echo -e "\n# Mail registred: $gsl_site_mail" \
|| echo -e "\n# Mail: contact@example.com"
read -rp \ read -rp \
": Contact Mail ? " \ ": Contact Mail ? " \
gsl_set_mail gsl_set_mail
gsl__check_settings $gsl_set_mail || return if [[ $gsl_profile_exists ]];then
if ! [[ "$gsl_set_mail" ]];then
[[ "$gsl_site_mail" ]] \
&& gsl_set_mail="$gsl_site_mail" \
|| gsl__check_settings $gsl_set_mail || return
fi
else
gsl__check_settings $gsl_set_mail || return
fi
#======================================================================= #=======================================================================
# Website Keywords # Website Keywords
#======================================================================= #=======================================================================
echo -e "\n# GENERIC pages Keywords: geek stuff,free (comma separated)" if [[ $gsl_profile_exists ]];then
printf '\n%s\n %s\n' \
"# GENERIC pages Keywords registred: $gsl_site_keys" \
"! Will be used on each post !"
else
printf '\n%s\n %s\n' \
"# GENERIC pages Keywords: geek stuff,free (comma separated)" \
"! Will be used on each post !"
fi
read -rp \ read -rp \
": Website Keywords for all Pages ? " \ ": Website Keywords for all Pages ? " \
gsl_set_keys gsl_set_keys
gsl__check_settings $gsl_set_keys || return if [[ $gsl_profile_exists ]];then
if ! [[ "$gsl_set_keys" ]];then
[[ "$gsl_site_keys" ]] \
&& gsl_set_keys="$gsl_site_keys" \
|| gsl__check_settings $gsl_set_keys || return
fi
else
gsl__check_settings $gsl_set_keys || return
fi
#======================================================================= #=======================================================================
# Language # Language
#======================================================================= #=======================================================================
echo -e "\n# Language: fr (or en-GB...)" [[ $gsl_profile_exists ]] \
&& echo -e "\n# Language registred: $gsl_site_lang" \
|| echo -e "\n# Language: fr (or en-GB...)"
read -rp \ read -rp \
": Website Lang ? " \ ": Website Lang ? " \
gsl_set_lang gsl_set_lang
gsl__check_settings $gsl_set_lang || return if [[ $gsl_profile_exists ]];then
if ! [[ "$gsl_set_lang" ]];then
[[ "$gsl_site_lang" ]] \
&& gsl_set_lang="$gsl_site_lang" \
|| gsl__check_settings $gsl_set_lang || return
fi
else
gsl__check_settings $gsl_set_lang || return
fi
#======================================================================= #=======================================================================
# Copyright # Copyright
#======================================================================= #=======================================================================
echo -e "\n# Copyright: 2022 TITLE CC-BY-SA" [[ $gsl_profile_exists ]] \
&& echo -e "\n# Copyright registred: $gsl_site_cr" \
|| echo -e "\n# Copyright: 2022 TITLE CC-BY-SA"
read -rp \ read -rp \
": Website Copyright ? " \ ": Website Copyright ? " \
gsl_set_cr gsl_set_cr
gsl__check_settings $gsl_set_cr || return if [[ $gsl_profile_exists ]];then
if ! [[ "$gsl_set_cr" ]];then
[[ "$gsl_site_cr" ]] \
&& gsl_set_cr="$gsl_site_cr" \
|| gsl__check_settings $gsl_set_cr || return
fi
else
gsl__check_settings $gsl_set_cr || return
fi
#======================================================================= #=======================================================================
# Website Logo # Website Logo
#======================================================================= #=======================================================================
printf '\n%s\n %s\n' \ if [[ $gsl_profile_exists ]];then
printf '\n%s\n %s\n' \
"# logo registred: $gsl_site_logo" \
"Put it in $gsl_save_dir_ndd/templates/"
else
printf '\n%s\n %s\n' \
"# logo: my-logo.png" \ "# logo: my-logo.png" \
"(Put it in $gsl_save_dir_ndd/templates/)" "Put it in $gsl_save_dir_ndd/templates/"
fi
read -rp \ read -rp \
": Website logo file NAME ? " \ ": Website logo file NAME ? " \
gsl_set_logo gsl_set_logo
gsl__check_settings $gsl_set_logo || return if [[ $gsl_profile_exists ]];then
if ! [[ "$gsl_set_logo" ]];then
[[ "$gsl_site_logo" ]] \
&& gsl_set_logo="$gsl_site_logo" \
|| gsl__check_settings $gsl_set_logo || return
fi
else
gsl__check_settings $gsl_set_logo || return
fi
#=======================================================================
# Last Posts listing name header
#=======================================================================
if [[ $gsl_profile_exists ]];then
printf '\n%s\n %s\n' \
"# Title List Name registred: $gsl_site_listname" \
"Title List to show before last posts"
else
printf '\n%s\n %s\n' \
"# Title List Name: My Last Posts" \
"Title List to show before last posts"
fi
read -rp \
": Title List Name ? " \
gsl_set_listname
if [[ $gsl_profile_exists ]];then
if ! [[ "$gsl_set_listname" ]];then
[[ "$gsl_site_listname" ]] \
&& gsl_set_listname="$gsl_site_listname" \
|| gsl__check_settings $gsl_set_listname || return
fi
else
gsl__check_settings $gsl_set_listname || return
fi
#======================================================================= #=======================================================================
# CSS Acronym # CSS Acronym
#======================================================================= #=======================================================================
printf '\n%s\n %s\n' \ if [[ $gsl_profile_exists ]];then
printf '\n%s\n %s\n' \
"# CSS (short) Acronym registred: $gsl_site_css" \
"Will create specific HTML classes like ${gsl_site_css}_paragraph"
else
printf '\n%s\n %s\n' \
"# CSS (short) Acronym: myweb !No need to end with _" \ "# CSS (short) Acronym: myweb !No need to end with _" \
"(Will create specific classes like myweb_paragraph)" "Will create specific HTML classes like myweb_paragraph"
fi
read -rp \ read -rp \
": CSS Acronym ? " \ ": CSS Acronym ? " \
gsl_set_css gsl_set_css
gsl__check_settings $gsl_set_css || return if [[ $gsl_profile_exists ]];then
if ! [[ "$gsl_set_css" ]];then
[[ "$gsl_site_css" ]] \
&& gsl_set_css="$gsl_site_css" \
|| gsl__check_settings $gsl_set_css || return
fi
else
gsl__check_settings $gsl_set_css || return
fi
#======================================================================= #=======================================================================
# Author Reference # Author Reference
#======================================================================= #=======================================================================
printf '\n%s\n %s\n' \ if [[ $gsl_profile_exists ]];then
printf '\n%s\n %s\n' \
"# Author/Compagny URL Profile registred: $gsl_site_auth_url" \
"Used for meta rel='me'"
else
printf '\n%s\n %s\n' \
"# Author/Compagny URL Profile: https://..." \ "# Author/Compagny URL Profile: https://..." \
"(Used for meta rel='me')" "Used for meta rel='me'"
fi
read -rp \ read -rp \
": Author URL Profile ? " \ ": Author URL Profile ? " \
gsl_set_auth_url gsl_set_auth_url
gsl__check_settings $gsl_set_auth_url || return if [[ $gsl_profile_exists ]];then
if ! [[ "$gsl_set_auth_url" ]];then
[[ "$gsl_site_auth_url" ]] \
&& gsl_set_auth_url="$gsl_site_auth_url" \
|| gsl__check_settings $gsl_set_auth_url || return
fi
else
gsl__check_settings $gsl_set_auth_url || return
fi
#======================================================================= #=======================================================================
# Folder for Posts # Folder for Posts
#======================================================================= #=======================================================================
printf '\n%s\n %s\n %s\n' \ printf '\n%s\n %s\n %s\n' \
"# You can set here a folder for your writings' Posts" \ "# You can set here a folder for your writings' Posts" \
"or manually do it later or add another one later" \ "Leave Empty to manually do it later (see help)" \
"Autocompletion /NEWFOLDER (name of choice)" "Autocompletion /NEWFOLDER (name of choice)"
read -erp \ read -erp \
": Where will you add your files' [post].gsl ? " \ ": Where will you add your files' [post].gsl ? " \
gsl_dir_user_posts gsl_dir_user_posts
@ -219,7 +396,7 @@ read -erp \
# Show Resume # Show Resume
#======================================================================= #=======================================================================
clear clear
printf '%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n' \ printf '%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n' \
"# New Website configurations..." \ "# New Website configurations..." \
": Webserver|$gsl_set_server" \ ": Webserver|$gsl_set_server" \
": URL|$gsl_set_url" \ ": URL|$gsl_set_url" \
@ -231,95 +408,67 @@ printf '%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n' \
": Language|$gsl_set_lang" \ ": Language|$gsl_set_lang" \
": Copyright|$gsl_set_cr" \ ": Copyright|$gsl_set_cr" \
": Logo File|$gsl_set_logo" \ ": Logo File|$gsl_set_logo" \
": Title List|$gsl_set_listname" \
": CSS Acro|$gsl_set_css" \ ": CSS Acro|$gsl_set_css" \
": Author URL|$gsl_set_auth_url" \ ": Author URL|$gsl_set_auth_url" \
": User folder writings' Posts|$gsl_dir_user_posts" \ ": User folder writings' Posts|$gsl_dir_user_posts" \
| column -t -s'|' | column -t -s'|'
#======================================================================= #=======================================================================
# Ask to Confirm # Ask to Confirm
#======================================================================= #=======================================================================
echo echo
if [[ -d "$gsl_save_dir_ndd" ]];then read -rp "$gsl_ask " gsl_set_confirm
printf '%s\n%s\n' \
"! A profile already exists in $gsl_save_dir_ndd" \
"- Remove (A)LL Directories: $gsl_save_dir_ndd" \
"- Remove (F)ile configurations : $gsl_save_conf_ndd" \
"- Any other key to cancel" && \
gsl__logs_print \
"$gsl_log_w" \
"Found" \
"Profile" \
"Configuration from $gsl_set_ndd" \
"$gsl_save_conf_ndd"
read -rp "! Remove (A|F|*) ? " \
gsl_ask_remove
case "$gsl_ask_remove" in
A)
rm -rf "$gsl_save_dir_ndd" && \
gsl__logs_print \
"$gsl_log_i" \
"Remove" \
"Folders" \
"Configuration from $gsl_set_ndd" \
"$gsl_save_dir_ndd"
;;
F)
rm -f "$gsl_save_conf_ndd" && \
gsl__logs_print \
"$gsl_log_i" \
"Remove" \
"File" \
"Configuration from $gsl_set_ndd" \
"$gsl_save_conf_ndd"
gsl_set_confirm="Y"
;;
*) echo "# Canceled";return ;;
esac
fi
! [[ "$gsl_set_confirm" ]] \
&& read -rp "$gsl_ask ?" gsl_set_confirm
case "$gsl_set_confirm" in case "$gsl_set_confirm" in
y|Y) y|Y)
gsl__logs_print \
"$gsl_log_w" \
"New" \
"Profile" \
"Confirmed configuration from $gsl_set_ndd" \
"$gsl_save_conf_ndd"
if ! [[ -d "$gsl_save_dir_ndd" ]];then if ! [[ -d "$gsl_save_dir_ndd" ]];then
mkdir -p "$gsl_save_dir_ndd" && \ mkdir -p "$gsl_save_dir_ndd" && \
gsl__logs_print \ gsl__logs_print \
"$gsl_log_i" \ "$gsl_log_i" \
"Create" \ "New" \
"Folder" \ "Profile" \
"Configuration from $gsl_set_ndd" \ "Create Folder configuration for $gsl_set_ndd" \
"$gsl_save_dir_ndd/" "$gsl_save_dir_ndd/"
fi
# Create et set a folder for writings' posts
if [[ $gsl_dir_user_posts ]];then
mkdir -p "$gsl_dir_user_posts" && \ mkdir -p "$gsl_dir_user_posts" && \
gsl__logs_print \ gsl__logs_print \
"$gsl_log_i" \ "$gsl_log_i" \
"Create" \ "New" \
"Folder" \ "Profile" \
"User Posts from $gsl_set_ndd" \ "Create Folder Posts for $gsl_set_ndd" \
"$gsl_dir_user_posts/" "$gsl_dir_user_posts/"
touch "$gsl_dir_user_posts/gsl.$gsl_set_ndd" && \ touch "$gsl_dir_user_posts/gsl.$gsl_set_ndd" && \
gsl__logs_print \ gsl__logs_print \
"$gsl_log_i" \ "$gsl_log_i" \
"Create" \ "New" \
"File" \ "Profile" \
"gsl.$gsl_set_ndd" \ "Folder set with gsl.$gsl_set_ndd" \
"$gsl_dir_user_posts/" "$gsl_dir_user_posts/"
fi fi
;; ;;
*) *)
gsl__new_website && return return
;; ;;
esac esac
#======================================================================= #=======================================================================
# Save config # Save config
#======================================================================= #=======================================================================
printf '%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n' \ printf '%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n' \
"gsl_site_server=\"$gsl_set_server\"" \ "gsl_site_server=\"$gsl_set_server\"" \
"gsl_site_url=\"$gsl_set_url\"" \ "gsl_site_url=\"$gsl_set_url\"" \
"gsl_site_ndd=\"$gsl_set_ndd\"" \ "gsl_site_ndd=\"$gsl_set_ndd\"" \
@ -330,17 +479,24 @@ printf '%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n' \
"gsl_site_lang=\"$gsl_set_lang\"" \ "gsl_site_lang=\"$gsl_set_lang\"" \
"gsl_site_cr=\"$gsl_set_cr\"" \ "gsl_site_cr=\"$gsl_set_cr\"" \
"gsl_site_logo=\"$gsl_set_logo\"" \ "gsl_site_logo=\"$gsl_set_logo\"" \
"gsl_site_listname=\"$gsl_set_listname\"" \
"gsl_site_css=\"$gsl_set_css\"" \ "gsl_site_css=\"$gsl_set_css\"" \
"gsl_site_auth_url=\"$gsl_set_auth_url\"" \ "gsl_site_auth_url=\"$gsl_set_auth_url\"" \
> "$gsl_save_conf_ndd" > "$gsl_save_conf_ndd" && \
gsl__logs_print \
"$gsl_log_w" \
"New" \
"Profile" \
"Write configuration for $gsl_set_ndd" \
"$gsl_save_conf_ndd"
if ! [[ `grep "$gsl_save_dir_ndd" "$gsl_file_db_domains"` ]];then if ! [[ `grep "$gsl_save_dir_ndd" "$gsl_file_db_domains"` ]];then
echo "$gsl_save_dir_ndd" >> "$gsl_file_db_domains" && \ echo "$gsl_save_dir_ndd" >> "$gsl_file_db_domains" && \
gsl__logs_print \ gsl__logs_print \
"$gsl_log_i" \ "$gsl_log_w" \
"Create" \ "New" \
"File" \ "Profile" \
"Configuration from $gsl_set_ndd" \ "Add $gsl_save_dir_ndd to DB for $gsl_set_ndd" \
"$gsl_file_db_domains" "$gsl_file_db_domains"
fi fi
} }

View File

@ -260,7 +260,7 @@ cat << EOPAGE > "$gsl_srv_wip_page"
<aside id="${gsl_site_css}_sidebar"> <aside id="${gsl_site_css}_sidebar">
<div class="${gsl_site_css}_wrapper" role="navigation"> <div class="${gsl_site_css}_wrapper" role="navigation">
<nav id="${gsl_site_css}_latest-posts"> <nav id="${gsl_site_css}_latest-posts">
<h1 class="${gsl_site_css}_latest-posts">Derniers articles</h1> <h1 class="${gsl_site_css}_latest-posts">$gsl_site_listname</h1>
<ul aria-label="Liste d'Articles"> <ul aria-label="Liste d'Articles">
<!--# include file="$gsl_uri/templates/last-posts-list.html" --> <!--# include file="$gsl_uri/templates/last-posts-list.html" -->
</ul> </ul>

View File

@ -208,10 +208,10 @@ if (( "$gsl_count_links" > 0 ));then
gsl_url_status=` gsl_url_status=`
timeout 2 curl -o /dev/null --silent --head --write-out \ timeout 2 curl -o /dev/null --silent --head --write-out \
'%{http_code}' \ '%{http_code}' \
"$gsl_post_hf_2" 2>/dev/null || echo "408"` "$gsl_post_hf_2" 2>/dev/null || gsl_url_status=408`
case "$gsl_url_status" in case "$gsl_url_status" in
0*|1*|2*|3*) 1*|2*|3*)
gsl__logs_print \ gsl__logs_print \
"$gsl_log_i" \ "$gsl_log_i" \
"Post" \ "Post" \
@ -226,7 +226,11 @@ if (( "$gsl_count_links" > 0 ));then
"$gsl_log_h_link" \ "$gsl_log_h_link" \
"Offline:$gsl_url_status ${gsl_post_hf_2:0:40}..." \ "Offline:$gsl_url_status ${gsl_post_hf_2:0:40}..." \
"${PWD}/$gsl_post" "${PWD}/$gsl_post"
# Decomment below if you want the offline link avoiding convertion
#gsl_checker_err=true
gsl_checker_war=true gsl_checker_war=true
return
;; ;;
esac esac
@ -237,7 +241,7 @@ if (( "$gsl_count_links" > 0 ));then
else else
gsl__logs_print \ gsl__logs_print \
"$gsl_log_i" \ "$gsl_log_e" \
"Post" \ "Post" \
"$gsl_log_c_link" \ "$gsl_log_c_link" \
"Unused: _$gsl_post_hf_1" \ "Unused: _$gsl_post_hf_1" \