File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,11 +32,19 @@ def process_dir(top_dir):
3232 print ('cannot create file %s %s' % (index_path , e ))
3333 return
3434
35+ path_top_dir_parents = path_top_dir .parents
36+ path_format = "/ <a style='text-decoration: underline;' href='https://dorianb.net/talks/'>Talks</a> "
37+ for parent in reversed (path_top_dir_parents ):
38+ if parent .name != "" :
39+ path_format += f"/<a style='text-decoration: underline;' href='https://dorianb.net/talks/{ parent } '>{ parent .name } </a>"
40+ path_format += f"/<a style='text-decoration: underline;' href='https://dorianb.net/talks/{ path_top_dir } '>{ path_top_dir .name } </a>"
41+
3542 index_file .write ("""<!DOCTYPE html>
3643<html>
3744<head>
3845 <meta charset="utf-8">
3946 <meta name="viewport" content="width=device-width, initial-scale=1.0">
47+ <title>Dorian B. Talks</title>
4048 <style>
4149 * { padding: 0; margin: 0; }
4250 body {
@@ -397,7 +405,7 @@ def process_dir(top_dir):
397405
398406<header>
399407 <h1>"""
400- f'{ path_top_dir . name } '
408+ f'{ path_format } '
401409 """</h1>
402410 </header>
403411 <main>
You can’t perform that action at this time.
0 commit comments