Skip to content

Commit 26f2d0e

Browse files
author
hthiagarajan
committed
Fix: Ensure static files are properly served
1 parent 74e1b5c commit 26f2d0e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

build.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ def main():
5757
build_page('experience.html', 'experience.rst', '_site/experience/index.html')
5858

5959
# Copy static files
60-
shutil.copytree('static', '_site/static', dirs_exist_ok=True)
60+
if os.path.exists('static'):
61+
shutil.copytree('static', '_site/static', dirs_exist_ok=True)
62+
print("Static files copied successfully")
63+
else:
64+
print("Warning: static directory not found")
6165

6266
if __name__ == '__main__':
6367
main()

templates/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>Dr. Hariharan Thiagarajan - {% block title %}{% endblock %}</title>
77
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
8-
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
8+
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css', _scheme='https') }}">
99
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
1010
</head>
1111
<body>

0 commit comments

Comments
 (0)