commit fde6b2c33910fca8dbfa3f56683bf9cd10691bce parent 1184e3fe45942cb472f1bd3447e37f9d6ed6cd28 Author: Beau Hilton <beau.hilton@vumc.org> Date: Thu, 5 Aug 2021 12:52:09 -0500 auto title renaming Diffstat:
M | _header.html | | | 8 | ++++++++ |
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/_header.html b/_header.html @@ -4,6 +4,14 @@ <link rel="alternate" type="application/atom+xml" href="/rss.xml"> <link rel="stylesheet" href="/style.css"> <link rel="icon" href="https://git.beauhilton.com/logo.png"> +<title id="title">.</title> +<script type="text/javascript"> + var url = window.location.pathname; // gets the pathname of the file + var str = url.substring(url.lastIndexOf('/')+1); // removes everything before the filename + str = str.substring(0, str.length - 5); // removes the extension + var filename = str.replace(/%20/g, " "); // if the filename has multiple words separated by spaces, browsers do not like that and replace each space with a %20. This replace %20 with a space. + document.getElementById("title").innerHTML = filename; +</script> </head> <meta charset="utf-8"> <body id="home">