aboutsummaryrefslogtreecommitdiffstats
path: root/generate.php
diff options
context:
space:
mode:
authorFrançois Kooman <fkooman@tuxed.net>2017-01-05 16:30:15 +0100
committerFrançois Kooman <fkooman@tuxed.net>2017-01-05 16:30:15 +0100
commitbdac5350008fb69f65bf0af62c32277b1e284b41 (patch)
treedf9d5363b7d76c9e686e8f89e69ec624438e830a /generate.php
parente8c53a9efd4699d628b379a715a96beb9a016de3 (diff)
downloadwww.tuxed.net-bdac5350008fb69f65bf0af62c32277b1e284b41.zip
www.tuxed.net-bdac5350008fb69f65bf0af62c32277b1e284b41.tar.gz
www.tuxed.net-bdac5350008fb69f65bf0af62c32277b1e284b41.tar.xz
add contact support
Diffstat (limited to 'generate.php')
-rw-r--r--generate.php20
1 files changed, 15 insertions, 5 deletions
diff --git a/generate.php b/generate.php
index ce903ba..432754f 100644
--- a/generate.php
+++ b/generate.php
@@ -12,13 +12,14 @@ $blogTitle = "François' Blog";
$blogDescription = 'Just another boring weblog.';
$blogUrl = 'https://www.tuxed.net/fkooman/blog/';
$blogAuthor = 'François Kooman';
+
$blogAuthorTwitter = 'fkooman';
$blogAuthorGitHub = 'fkooman';
$blogAuthorMail = 'fkooman@tuxed.net';
-
+$blogAuthorMailFingerprint = '6237 BAF1 418A 907D AA98 EAA7 9C5E DD64 5A57 1EB2';
$loader = new Twig_Loader_Filesystem($templateDir);
-$twig = new Twig_Environment($loader);
+$twig = new Twig_Environment($loader, ['strict_variables' => true]);
$blogPosts = [];
@@ -72,10 +73,21 @@ $indexPage = $twig->render(
'pageTitle' => 'Index',
'blogTitle' => $blogTitle,
'blogDescription' => $blogDescription,
+ 'blogAuthor' => $blogAuthor
+ ]
+);
+
+$contactPage = $twig->render(
+ 'contact.twig',
+ [
+ 'blogTitle' => $blogTitle,
+ 'blogDescription' => $blogDescription,
'blogAuthor' => $blogAuthor,
+ 'pageTitle' => 'Contact',
'blogAuthorMail' => $blogAuthorMail,
'blogAuthorTwitter' => $blogAuthorTwitter,
'blogAuthorGitHub' => $blogAuthorGitHub,
+ 'blogAuthorMailFingerprint' => $blogAuthorMailFingerprint,
]
);
@@ -88,15 +100,13 @@ foreach ($postsList as $post) {
'post' => $post,
'blogDescription' => $blogDescription,
'blogAuthor' => $blogAuthor,
- 'blogAuthorMail' => $blogAuthorMail,
- 'blogAuthorTwitter' => $blogAuthorTwitter,
- 'blogAuthorGitHub' => $blogAuthorGitHub,
]
);
file_put_contents($outputDir.'/'.$post['fileName'], $postPage);
}
file_put_contents($outputDir.'/index.html', $indexPage);
+file_put_contents($outputDir.'/contact.html', $contactPage);
// copy img
@mkdir($outputDir.'/img');