Skip to content

Commit af9a897

Browse files
committed
working on static site generator page
1 parent e7ddf0b commit af9a897

File tree

4 files changed

+68
-19
lines changed

4 files changed

+68
-19
lines changed

all.html

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3022,13 +3022,13 @@ <h1>Static Site Generator</h1>
30223022
files. The HTML files can be hosted and served by a
30233023
<a href="/web-server.html">web server</a> or
30243024
<a href="/static-content.html">content delivery network (CDN)</a>
3025-
without any additional dependencies such as a
3025+
<em>without</em> any additional dependencies such as a
30263026
<a href="/wsgi-server.html">WSGI server</a>.</p>
3027-
<h2>Why are static website generators useful?</h2>
3028-
<p><a href="/static-content.html">Static content files</a> such as HTML, CSS, JavaScript
3027+
<h2>Why are static site generators useful?</h2>
3028+
<p><a href="/static-content.html">Static content files</a> such as HTML, CSS and JavaScript
30293029
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>
3030+
cost. If a statically generated website is hit by high concurrent traffic it
3031+
will be easily served by the CDN without dropped connections. </p>
30323032
<p>For example, when
30333033
<a href="https://news.ycombinator.com/item?id=7985692">Full Stack Python was on the top of Hacker News</a>
30343034
for a weekend, <a href="https://pages.github.com/">GitHub Pages</a> was used as a CDN
@@ -3046,7 +3046,22 @@ <h2>How do static website generators work?</h2>
30463046
generator can take in reStructuredText files and Jinja2 template files
30473047
as input then combine them to output a set of static HTML files.</p>
30483048
<p><img src="theme/img/pelican-flow.jpg" width="100%" alt="Example of how static site generators work with a markup language and templates." class="technical-diagram"></a></p>
3049-
<h2>Python static site generators</h2>
3049+
<h2>What's the downside to using static site generators?</h2>
3050+
<p>The major downside is that the code is not dynamic, so you won't be able to
3051+
do many seemingly-necessary tasks provided by running an application created
3052+
with a traditional <a href="/web-frameworks.html">web framework</a>. Any content that
3053+
is typically powered by a database, such as comments, sessions and user data
3054+
can only be done through third party services. For example, if you want to
3055+
have comments on a static website you'd need to
3056+
<a href="https://disqus.com/">embed Disqus's form</a> and be completely reliant upon
3057+
their service.</p>
3058+
<p>Many web applications simply cannot be built with only a static site generator.
3059+
However, a static website generator can create part of a site that will be
3060+
served up by a web server while other pages are handled by the WSGI server.
3061+
If done right, those web applications have the potential to scale better than
3062+
if every page is rendered by the WSGI server. The complexity may or may not be
3063+
worth it for your specific application.</p>
3064+
<h2>Python static site generator implementations</h2>
30503065
<p>Numerous static website generators exist in many different languages. The
30513066
ones listed here are primarily coded in Python.</p>
30523067
<ul>

feeds/all.atom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<feed xmlns="http://www.w3.org/2005/Atom"><title>Matt Makai</title><link href="http://www.fullstackpython.com/" rel="alternate"></link><link href="http://www.fullstackpython.com/feeds/all.atom.xml" rel="self"></link><id>http://www.fullstackpython.com/</id><updated>2015-11-03T14:42:38Z</updated></feed>
2+
<feed xmlns="http://www.w3.org/2005/Atom"><title>Matt Makai</title><link href="http://www.fullstackpython.com/" rel="alternate"></link><link href="http://www.fullstackpython.com/feeds/all.atom.xml" rel="self"></link><id>http://www.fullstackpython.com/</id><updated>2015-11-04T16:44:54Z</updated></feed>

source/content/pages/04-web-development/16-static-site-generator.markdown

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ or reStructuredText, with a templating engine such as
1212
files. The HTML files can be hosted and served by a
1313
[web server](/web-server.html) or
1414
[content delivery network (CDN)](/static-content.html)
15-
without any additional dependencies such as a
15+
*without* any additional dependencies such as a
1616
[WSGI server](/wsgi-server.html).
1717

18-
## Why are static website generators useful?
19-
[Static content files](/static-content.html) such as HTML, CSS, JavaScript
18+
19+
## Why are static site generators useful?
20+
[Static content files](/static-content.html) such as HTML, CSS and JavaScript
2021
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.
22+
cost. If a statically generated website is hit by high concurrent traffic it
23+
will be easily served by the CDN without dropped connections.
2324

2425
For example, when
2526
[Full Stack Python was on the top of Hacker News](https://news.ycombinator.com/item?id=7985692)
@@ -45,7 +46,25 @@ as input then combine them to output a set of static HTML files.
4546
<img src="theme/img/pelican-flow.jpg" width="100%" alt="Example of how static site generators work with a markup language and templates." class="technical-diagram"></a>
4647

4748

48-
## Python static site generators
49+
## What's the downside to using static site generators?
50+
The major downside is that the code is not dynamic, so you won't be able to
51+
do many seemingly-necessary tasks provided by running an application created
52+
with a traditional [web framework](/web-frameworks.html). Any content that
53+
is typically powered by a database, such as comments, sessions and user data
54+
can only be done through third party services. For example, if you want to
55+
have comments on a static website you'd need to
56+
[embed Disqus's form](https://disqus.com/) and be completely reliant upon
57+
their service.
58+
59+
Many web applications simply cannot be built with only a static site generator.
60+
However, a static website generator can create part of a site that will be
61+
served up by a web server while other pages are handled by the WSGI server.
62+
If done right, those web applications have the potential to scale better than
63+
if every page is rendered by the WSGI server. The complexity may or may not be
64+
worth it for your specific application.
65+
66+
67+
## Python static site generator implementations
4968
Numerous static website generators exist in many different languages. The
5069
ones listed here are primarily coded in Python.
5170

static-site-generator.html

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ <h1>Static Site Generator</h1>
3838
files. The HTML files can be hosted and served by a
3939
<a href="/web-server.html">web server</a> or
4040
<a href="/static-content.html">content delivery network (CDN)</a>
41-
without any additional dependencies such as a
41+
<em>without</em> any additional dependencies such as a
4242
<a href="/wsgi-server.html">WSGI server</a>.</p>
43-
<h2>Why are static website generators useful?</h2>
44-
<p><a href="/static-content.html">Static content files</a> such as HTML, CSS, JavaScript
43+
<h2>Why are static site generators useful?</h2>
44+
<p><a href="/static-content.html">Static content files</a> such as HTML, CSS and JavaScript
4545
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>
46+
cost. If a statically generated website is hit by high concurrent traffic it
47+
will be easily served by the CDN without dropped connections. </p>
4848
<p>For example, when
4949
<a href="https://news.ycombinator.com/item?id=7985692">Full Stack Python was on the top of Hacker News</a>
5050
for a weekend, <a href="https://pages.github.com/">GitHub Pages</a> was used as a CDN
@@ -62,7 +62,22 @@ <h2>How do static website generators work?</h2>
6262
generator can take in reStructuredText files and Jinja2 template files
6363
as input then combine them to output a set of static HTML files.</p>
6464
<p><img src="theme/img/pelican-flow.jpg" width="100%" alt="Example of how static site generators work with a markup language and templates." class="technical-diagram"></a></p>
65-
<h2>Python static site generators</h2>
65+
<h2>What's the downside to using static site generators?</h2>
66+
<p>The major downside is that the code is not dynamic, so you won't be able to
67+
do many seemingly-necessary tasks provided by running an application created
68+
with a traditional <a href="/web-frameworks.html">web framework</a>. Any content that
69+
is typically powered by a database, such as comments, sessions and user data
70+
can only be done through third party services. For example, if you want to
71+
have comments on a static website you'd need to
72+
<a href="https://disqus.com/">embed Disqus's form</a> and be completely reliant upon
73+
their service.</p>
74+
<p>Many web applications simply cannot be built with only a static site generator.
75+
However, a static website generator can create part of a site that will be
76+
served up by a web server while other pages are handled by the WSGI server.
77+
If done right, those web applications have the potential to scale better than
78+
if every page is rendered by the WSGI server. The complexity may or may not be
79+
worth it for your specific application.</p>
80+
<h2>Python static site generator implementations</h2>
6681
<p>Numerous static website generators exist in many different languages. The
6782
ones listed here are primarily coded in Python.</p>
6883
<ul>

0 commit comments

Comments
 (0)