1
0

Merge pull request 'Fixes' (#31) from dev into master

Reviewed-on: fofrweb/com_pkmples.cz#31
This commit is contained in:
Filip Rojek 2023-12-18 05:47:26 +01:00
commit d14da83315
5 changed files with 36 additions and 0 deletions

View File

@ -23,6 +23,9 @@ jobs:
run: | run: |
zola build zola build
- name: Remove unwanted pages
run: bash ./delete_pages.sh
- name: Set Destination Folder if MASTER - name: Set Destination Folder if MASTER
if: ${{ github.ref == 'refs/heads/master' }} if: ${{ github.ref == 'refs/heads/master' }}
run: echo "DEST_FOLDER=/srv/www/cz/pkmples/www" >> $GITHUB_ENV run: echo "DEST_FOLDER=/srv/www/cz/pkmples/www" >> $GITHUB_ENV

View File

@ -15,6 +15,7 @@ build_search_index = false
# Whether to do syntax highlighting # Whether to do syntax highlighting
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola # Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
highlight_code = false highlight_code = false
external_links_target_blank = true
[extra] [extra]
# Put all your custom variables here # Put all your custom variables here

20
delete_pages.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
content_dir="./content"
public_dir="./public"
cp "$sitemap_file" "$temp_sitemap_file"
for file in "$content_dir"/*; do
file_name=$(basename "$file")
folder_name="${file_name%.*}"
folder_name_dashed=$(echo "$folder_name" | tr '_' '-')
folder_path="$public_dir/$folder_name_dashed"
if [ -d "$folder_path" ]; then
rm -r "$folder_path"
echo "Removed: $folder_path"
else
echo "Folder not found: $folder_path"
fi
done

4
templates/robots.txt Normal file
View File

@ -0,0 +1,4 @@
User-agent: *
Disallow:
Allow: /
Sitemap: https://www.pkmples.cz/sitemap.xml

8
templates/sitemap.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.pkmples.cz/</loc>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
</urlset>