You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h2>Why are static website generators useful?</h2>
3028
+
<p><ahref="/static-content.html">Static content files</a> such as HTML, CSS, JavaScript
3029
+
can be served from a content delivery network (CDN) for high scale and low
3030
+
cost. If a statically generated website is hit by high concurrent traffic
3031
+
it will be easily served by the CDN without dropped connections. </p>
3032
+
<p>For example, when
3033
+
<ahref="https://news.ycombinator.com/item?id=7985692">Full Stack Python was on the top of Hacker News</a>
3034
+
for a weekend, <ahref="https://pages.github.com/">GitHub Pages</a> was used as a CDN
3035
+
to serve the site and didn't have any issues even with close to 400
3036
+
concurrent connections at a time, as shown in the following Google Analytics
3037
+
screenshot captured during that traffic burst.</p>
3038
+
<p><imgsrc="theme/img/hacker-news-traffic.jpg" width="100%" alt="Example of how static websites scale with a CDN based on Full Stack Python on Hacker News front page traffic." class="technical-diagram"></a></p>
3039
+
<h2>How do static website generators work?</h2>
3028
3040
<p>Static site generators allow a user to create HTML files by writing in a
3029
-
markup language and coding template files. HTML does not need to be
3030
-
maintained by hand other than what is in the template files.</p>
3041
+
markup language and coding template files. The static site generator then
3042
+
combines the markup language and templates to produce HTML. The output HTML
3043
+
does not need to be maintained by hand because it is regenerated every time
3044
+
the markup or templates are modified.</p>
3031
3045
<p>For example, as shown in the diagram below, the Pelican static site
3032
3046
generator can take in reStructuredText files and Jinja2 template files
3033
3047
as input then combine them to output a set of static HTML files.</p>
@@ -7142,6 +7156,11 @@ <h1>Change Log</h1>
7142
7156
the
7143
7157
<ahref="https://github.com/makaimc/fullstackpython.github.com/commits/gh-pages">source repository's commit log</a> on GitHub.</p>
7144
7158
<h2>2015</h2>
7159
+
<h3>November</h3>
7160
+
<ul>
7161
+
<li>Updated the <ahref="/static-site-generator.html">static site generators</a> page
7162
+
with a better explanation of why they are useful.</li>
7163
+
</ul>
7145
7164
<h3>October</h3>
7146
7165
<ul>
7147
7166
<li>Starting a <ahref="/microservices.html">microservices</a> page with some basic
Copy file name to clipboardExpand all lines: source/content/pages/04-web-development/16-static-site-generator.markdown
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,11 +15,28 @@ files. The HTML files can be hosted and served by a
15
15
without any additional dependencies such as a
16
16
[WSGI server](/wsgi-server.html).
17
17
18
+
## Why are static website generators useful?
19
+
[Static content files](/static-content.html) such as HTML, CSS, JavaScript
20
+
can be served from a content delivery network (CDN) for high scale and low
21
+
cost. If a statically generated website is hit by high concurrent traffic
22
+
it will be easily served by the CDN without dropped connections.
18
23
19
-
## Why are static site generators useful?
24
+
For example, when
25
+
[Full Stack Python was on the top of Hacker News](https://news.ycombinator.com/item?id=7985692)
26
+
for a weekend, [GitHub Pages](https://pages.github.com/) was used as a CDN
27
+
to serve the site and didn't have any issues even with close to 400
28
+
concurrent connections at a time, as shown in the following Google Analytics
29
+
screenshot captured during that traffic burst.
30
+
31
+
<imgsrc="theme/img/hacker-news-traffic.jpg"width="100%"alt="Example of how static websites scale with a CDN based on Full Stack Python on Hacker News front page traffic."class="technical-diagram"></a>
32
+
33
+
34
+
## How do static website generators work?
20
35
Static site generators allow a user to create HTML files by writing in a
21
-
markup language and coding template files. HTML does not need to be
22
-
maintained by hand other than what is in the template files.
36
+
markup language and coding template files. The static site generator then
37
+
combines the markup language and templates to produce HTML. The output HTML
38
+
does not need to be maintained by hand because it is regenerated every time
39
+
the markup or templates are modified.
23
40
24
41
For example, as shown in the diagram below, the Pelican static site
25
42
generator can take in reStructuredText files and Jinja2 template files
<h2>Why are static website generators useful?</h2>
44
+
<p><ahref="/static-content.html">Static content files</a> such as HTML, CSS, JavaScript
45
+
can be served from a content delivery network (CDN) for high scale and low
46
+
cost. If a statically generated website is hit by high concurrent traffic
47
+
it will be easily served by the CDN without dropped connections. </p>
48
+
<p>For example, when
49
+
<ahref="https://news.ycombinator.com/item?id=7985692">Full Stack Python was on the top of Hacker News</a>
50
+
for a weekend, <ahref="https://pages.github.com/">GitHub Pages</a> was used as a CDN
51
+
to serve the site and didn't have any issues even with close to 400
52
+
concurrent connections at a time, as shown in the following Google Analytics
53
+
screenshot captured during that traffic burst.</p>
54
+
<p><imgsrc="theme/img/hacker-news-traffic.jpg" width="100%" alt="Example of how static websites scale with a CDN based on Full Stack Python on Hacker News front page traffic." class="technical-diagram"></a></p>
55
+
<h2>How do static website generators work?</h2>
44
56
<p>Static site generators allow a user to create HTML files by writing in a
45
-
markup language and coding template files. HTML does not need to be
46
-
maintained by hand other than what is in the template files.</p>
57
+
markup language and coding template files. The static site generator then
58
+
combines the markup language and templates to produce HTML. The output HTML
59
+
does not need to be maintained by hand because it is regenerated every time
60
+
the markup or templates are modified.</p>
47
61
<p>For example, as shown in the diagram below, the Pelican static site
48
62
generator can take in reStructuredText files and Jinja2 template files
49
63
as input then combine them to output a set of static HTML files.</p>
0 commit comments