diff options
author | Süleyman Fərəcli <suleyman@farajli.net> | 2024-10-02 02:17:58 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-02 02:17:58 +0400 |
commit | a680ad63dcfedd0cf7f275c24dd8cd5d5e140590 (patch) | |
tree | 5f8d7361a3843b821110f22cbb6591d24bb7255d /build-page | |
parent | 6b591d208109719f72f5d60461937b686b7aafb1 (diff) | |
parent | f18cd7a7da3ee094807519093f06c54eae0c7991 (diff) |
Merge pull request #1 from sayMuFaSa/master
More readable build-page script
Diffstat (limited to 'build-page')
-rw-r--r-- | build-page | 27 |
1 files changed, 2 insertions, 25 deletions
@@ -1,7 +1,5 @@ #!/bin/sh -print_head() -{ cat << EOF <!DOCTYPE html> <html lang="en"> @@ -9,43 +7,22 @@ cat << EOF <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel='stylesheet' type='text/css' href="/style.css"> - <title>${1}</title> </head> <body> <a id="header-link" href="/home/index.html">Suleyman Farajli</a> <hr class="separator"> -EOF -} - -print_menu() -{ -cat << EOF <div class="menu"> <a class="menu_item" href="/home/index.html">Home/</a> <a class="menu_item" href="/software/software.html">Software/</a> <a class="menu_item" href="/wiki/wiki.html">Wiki/</a> <a class="menu_item right" href="https://git.farajli.net">Git</a> </div> -EOF -} - -print_copyleft() -{ -cat << EOF +$(sed '1 s/<!--.*-->//' ${1} | smu) <p id="copyleft"><br>copyleft (c) 2024 Suleyman Farajli</p> </body> </html> -EOF -} -filename="${1}" -title=$(cat "${filename}" | head -n1 | sed 's/<!-- Title: //; s/-->//') - -print_head "${title}" -print_menu -# Remove the title on the first line, if exists -sed '1 s/<!--.*-->//' ${filename} | smu -print_copyleft +EOF |