-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jiangyuan Li
authored and
Jiangyuan Li
committed
Nov 23, 2024
1 parent
5978856
commit 31460f1
Showing
13 changed files
with
84 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/venv/ | ||
/venv/ | ||
/build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
from app import app # Import your Flask app from app.py | ||
from flask_frozen import Freezer | ||
from app import app | ||
|
||
freezer = Freezer(app) | ||
|
||
if __name__ == '__main__': | ||
freezer.freeze() # This will generate the static files | ||
if __name__ == "__main__": | ||
freezer.freeze() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h1>My First Post</h1> | ||
<p id="dev-cal-2">This is the content of my first blog post. It's awesome!</p> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{% extends "layout.html" %} | ||
|
||
{% block content %} | ||
<h1>Welcome to My Blog</h1> | ||
|
||
<div class="blog-posts"> | ||
{% for post in posts %} | ||
<article class="blog-post"> | ||
<h2>{{ post.title }}</h2> | ||
<div class="post-content"> | ||
{{ post.content | safe }} | ||
</div> | ||
</article> | ||
{% endfor %} | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
{% extends "layout.html" %} | ||
|
||
{% block title %}Home - My Frozen Flask App{% endblock %} | ||
{% block title %}Jerry's blog...{% endblock %} | ||
|
||
{% block content %} | ||
<h2>Welcome to the Homepage!</h2> | ||
<p>This is the content specific to the homepage.</p> | ||
<h2>Jerry's blog</h2> | ||
<p id="dev-cal-2">This is the content specific to the homepage.</p> | ||
<p id="dev-cal-2">This is the content specific to the homepage.</p> | ||
<p id="dev-cal-2">This is the content specific to the homepage.</p> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% extends "layout.html" %} | ||
|
||
{% block title %} | ||
{{ title }} - My Blog | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<h1>{{ title }}</h1> | ||
|
||
<div class="post-content"> | ||
{{ content | safe }} | ||
</div> | ||
|
||
<a href="{{ url_for('blog') }}">Back to Blog</a> | ||
{% endblock %} |