Skip to content

Commit e468d5f

Browse files
committed
static site code
1 parent 6262742 commit e468d5f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2205
-0
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
PY?=python3
2+
PELICAN?=pelican
3+
PELICANOPTS=
4+
5+
BASEDIR=$(CURDIR)
6+
INPUTDIR=$(BASEDIR)/content
7+
OUTPUTDIR=$(BASEDIR)/output
8+
CONFFILE=$(BASEDIR)/pelicanconf.py
9+
PUBLISHCONF=$(BASEDIR)/publishconf.py
10+
11+
12+
DEBUG ?= 0
13+
ifeq ($(DEBUG), 1)
14+
PELICANOPTS += -D
15+
endif
16+
17+
RELATIVE ?= 0
18+
ifeq ($(RELATIVE), 1)
19+
PELICANOPTS += --relative-urls
20+
endif
21+
22+
help:
23+
@echo 'Makefile for a pelican Web site '
24+
@echo ' '
25+
@echo 'Usage: '
26+
@echo ' make html (re)generate the web site '
27+
@echo ' make clean remove the generated files '
28+
@echo ' make regenerate regenerate files upon modification '
29+
@echo ' make publish generate using production settings '
30+
@echo ' make serve [PORT=8000] serve site at http://localhost:8000'
31+
@echo ' make serve-global [SERVER=0.0.0.0] serve (as root) to $(SERVER):80 '
32+
@echo ' make devserver [PORT=8000] serve and regenerate together '
33+
@echo ' make ssh_upload upload the web site via SSH '
34+
@echo ' make rsync_upload upload the web site via rsync+ssh '
35+
@echo ' '
36+
@echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html '
37+
@echo 'Set the RELATIVE variable to 1 to enable relative urls '
38+
@echo ' '
39+
40+
html:
41+
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
42+
43+
clean:
44+
[ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR)
45+
46+
regenerate:
47+
$(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
48+
49+
serve:
50+
ifdef PORT
51+
$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT)
52+
else
53+
$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
54+
endif
55+
56+
serve-global:
57+
ifdef SERVER
58+
$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -b $(SERVER)
59+
else
60+
$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -b 0.0.0.0
61+
endif
62+
63+
64+
devserver:
65+
ifdef PORT
66+
$(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT)
67+
else
68+
$(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
69+
endif
70+
71+
publish:
72+
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
73+
74+
75+
.PHONY: html help clean regenerate serve serve-global devserver stopserver publish
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Title: Let's get this party started!
2+
Date: 2019-03-31 22:00
3+
Category: Python
4+
Tags: 100daysofweb, Python, Awesomeness
5+
Slug: first_post
6+
Authors: Julian
7+
Summary: This is a summary of the first post written for our Pelican Blog. We're using this for the 100daysofweb course.
8+
9+
##Big heading for a big day!
10+
11+
This is the first paragrah of our article - huzzah!
12+
13+
We're writing this is in Markdown format so we can use two * symbols to indicate a **bold** formatted block of text.
14+
15+
16+
###A slightly smaller header...
17+
18+
We can also use a single * around a block of text to indicate an *italicised* word.
19+
20+
21+
###Let's throw an image in here
22+
23+
![PyBites Logo]({static}/images/pb-logo.png)
24+
25+
THE END! (Cool story bro!)
33.5 KB
Loading
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Title: About
2+
3+
#About Page!
4+
5+
##This is a page about me
6+
7+
I made this site to demonstrate static site generators
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<!DOCTYPE html>
2+
<html lang="english">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>100daysweb-site</title>
6+
<link rel="stylesheet" href="/theme/css/main.css" />
7+
</head>
8+
9+
<body id="index" class="home">
10+
<header id="banner" class="body">
11+
<h1><a href="/">100daysweb-site </a></h1>
12+
<nav><ul>
13+
<li><a href="/pages/about.html">About</a></li>
14+
<li><a href="/category/python.html">Python</a></li>
15+
</ul></nav>
16+
</header><!-- /#banner -->
17+
<section id="content" class="body">
18+
<h1>Archives for 100daysweb-site</h1>
19+
20+
<dl>
21+
<dt>Sun 31 March 2019</dt>
22+
<dd><a href="/first_post.html">Let's get this party started!</a></dd>
23+
</dl>
24+
</section>
25+
<section id="extras" class="body">
26+
<div class="blogroll">
27+
<h2>links</h2>
28+
<ul>
29+
<li><a href="http://getpelican.com/">Pelican</a></li>
30+
<li><a href="http://python.org/">Python.org</a></li>
31+
<li><a href="http://jinja.pocoo.org/">Jinja2</a></li>
32+
<li><a href="#">You can modify those links in your config file</a></li>
33+
</ul>
34+
</div><!-- /.blogroll -->
35+
<div class="social">
36+
<h2>social</h2>
37+
<ul>
38+
39+
<li><a href="#">You can add links in your config file</a></li>
40+
<li><a href="#">Another social link</a></li>
41+
</ul>
42+
</div><!-- /.social -->
43+
</section><!-- /#extras -->
44+
45+
<footer id="contentinfo" class="body">
46+
<address id="about" class="vcard body">
47+
Proudly powered by <a href="http://getpelican.com/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
48+
</address><!-- /#about -->
49+
50+
<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
51+
</footer><!-- /#contentinfo -->
52+
53+
</body>
54+
</html>
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<!DOCTYPE html>
2+
<html lang="english">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>100daysweb-site - Julian</title>
6+
<link rel="stylesheet" href="/theme/css/main.css" />
7+
</head>
8+
9+
<body id="index" class="home">
10+
<header id="banner" class="body">
11+
<h1><a href="/">100daysweb-site </a></h1>
12+
<nav><ul>
13+
<li><a href="/pages/about.html">About</a></li>
14+
<li><a href="/category/python.html">Python</a></li>
15+
</ul></nav>
16+
</header><!-- /#banner -->
17+
18+
<aside id="featured" class="body">
19+
<article>
20+
<h1 class="entry-title"><a href="/first_post.html">Let's get this party started!</a></h1>
21+
<footer class="post-info">
22+
<abbr class="published" title="2019-03-31T22:00:00+11:00">
23+
Published: Sun 31 March 2019
24+
</abbr>
25+
26+
<address class="vcard author">
27+
By <a class="url fn" href="/author/julian.html">Julian</a>
28+
</address>
29+
<p>In <a href="/category/python.html">Python</a>.</p>
30+
<p>tags: <a href="/tag/100daysofweb.html">100daysofweb</a> <a href="/tag/python.html">Python</a> <a href="/tag/awesomeness.html">Awesomeness</a> </p>
31+
</footer><!-- /.post-info --><h2>Big heading for a big day!</h2>
32+
<p>This is the first paragrah of our article - huzzah!</p>
33+
<p>We're writing this is in Markdown format so we can use two * symbols to indicate a <strong>bold</strong> formatted block of text.</p>
34+
<h3>A slightly smaller header...</h3>
35+
<p>We can also use a single * around a block of text to indicate an <em>italicised</em> word.</p>
36+
<h3>Let's throw an image in here</h3>
37+
<p><img alt="PyBites Logo" src="/images/pb-logo.png"></p>
38+
<p>THE END! (Cool story bro!)</p> </article>
39+
</aside><!-- /#featured -->
40+
<section id="extras" class="body">
41+
<div class="blogroll">
42+
<h2>links</h2>
43+
<ul>
44+
<li><a href="http://getpelican.com/">Pelican</a></li>
45+
<li><a href="http://python.org/">Python.org</a></li>
46+
<li><a href="http://jinja.pocoo.org/">Jinja2</a></li>
47+
<li><a href="#">You can modify those links in your config file</a></li>
48+
</ul>
49+
</div><!-- /.blogroll -->
50+
<div class="social">
51+
<h2>social</h2>
52+
<ul>
53+
54+
<li><a href="#">You can add links in your config file</a></li>
55+
<li><a href="#">Another social link</a></li>
56+
</ul>
57+
</div><!-- /.social -->
58+
</section><!-- /#extras -->
59+
60+
<footer id="contentinfo" class="body">
61+
<address id="about" class="vcard body">
62+
Proudly powered by <a href="http://getpelican.com/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
63+
</address><!-- /#about -->
64+
65+
<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
66+
</footer><!-- /#contentinfo -->
67+
68+
</body>
69+
</html>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<!DOCTYPE html>
2+
<html lang="english">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>100daysweb-site - Authors</title>
6+
<link rel="stylesheet" href="/theme/css/main.css" />
7+
</head>
8+
9+
<body id="index" class="home">
10+
<header id="banner" class="body">
11+
<h1><a href="/">100daysweb-site </a></h1>
12+
<nav><ul>
13+
<li><a href="/pages/about.html">About</a></li>
14+
<li><a href="/category/python.html">Python</a></li>
15+
</ul></nav>
16+
</header><!-- /#banner -->
17+
18+
<section id="content" class="body">
19+
<h1>Authors on 100daysweb-site</h1>
20+
<ul>
21+
<li><a href="/author/julian.html">Julian</a> (1)</li>
22+
</ul>
23+
</section>
24+
25+
<section id="extras" class="body">
26+
<div class="blogroll">
27+
<h2>links</h2>
28+
<ul>
29+
<li><a href="http://getpelican.com/">Pelican</a></li>
30+
<li><a href="http://python.org/">Python.org</a></li>
31+
<li><a href="http://jinja.pocoo.org/">Jinja2</a></li>
32+
<li><a href="#">You can modify those links in your config file</a></li>
33+
</ul>
34+
</div><!-- /.blogroll -->
35+
<div class="social">
36+
<h2>social</h2>
37+
<ul>
38+
39+
<li><a href="#">You can add links in your config file</a></li>
40+
<li><a href="#">Another social link</a></li>
41+
</ul>
42+
</div><!-- /.social -->
43+
</section><!-- /#extras -->
44+
45+
<footer id="contentinfo" class="body">
46+
<address id="about" class="vcard body">
47+
Proudly powered by <a href="http://getpelican.com/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
48+
</address><!-- /#about -->
49+
50+
<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
51+
</footer><!-- /#contentinfo -->
52+
53+
</body>
54+
</html>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<!DOCTYPE html>
2+
<html lang="english">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>100daysweb-site - Categories</title>
6+
<link rel="stylesheet" href="/theme/css/main.css" />
7+
</head>
8+
9+
<body id="index" class="home">
10+
<header id="banner" class="body">
11+
<h1><a href="/">100daysweb-site </a></h1>
12+
<nav><ul>
13+
<li><a href="/pages/about.html">About</a></li>
14+
<li><a href="/category/python.html">Python</a></li>
15+
</ul></nav>
16+
</header><!-- /#banner -->
17+
<h1>Categories on 100daysweb-site</h1>
18+
<ul>
19+
<li><a href="/category/python.html">Python</a> (1)</li>
20+
</ul>
21+
<section id="extras" class="body">
22+
<div class="blogroll">
23+
<h2>links</h2>
24+
<ul>
25+
<li><a href="http://getpelican.com/">Pelican</a></li>
26+
<li><a href="http://python.org/">Python.org</a></li>
27+
<li><a href="http://jinja.pocoo.org/">Jinja2</a></li>
28+
<li><a href="#">You can modify those links in your config file</a></li>
29+
</ul>
30+
</div><!-- /.blogroll -->
31+
<div class="social">
32+
<h2>social</h2>
33+
<ul>
34+
35+
<li><a href="#">You can add links in your config file</a></li>
36+
<li><a href="#">Another social link</a></li>
37+
</ul>
38+
</div><!-- /.social -->
39+
</section><!-- /#extras -->
40+
41+
<footer id="contentinfo" class="body">
42+
<address id="about" class="vcard body">
43+
Proudly powered by <a href="http://getpelican.com/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
44+
</address><!-- /#about -->
45+
46+
<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
47+
</footer><!-- /#contentinfo -->
48+
49+
</body>
50+
</html>

0 commit comments

Comments
 (0)