diff options
Diffstat (limited to 'modules/blog')
-rw-r--r-- | modules/blog/files/footers/about.md | 11 | ||||
-rw-r--r-- | modules/blog/files/footers/contact.md | 12 | ||||
-rw-r--r-- | modules/blog/files/footers/legal.md | 28 | ||||
-rw-r--r-- | modules/blog/files/footers/qna.md | 13 | ||||
-rw-r--r-- | modules/blog/files/special-files.ini | 0 | ||||
-rw-r--r-- | modules/blog/manifests/init.pp | 42 | ||||
-rw-r--r-- | modules/blog/manifests/instance.pp | 99 | ||||
-rw-r--r-- | modules/blog/templates/settings.php.epp | 13 | ||||
-rw-r--r-- | modules/blog/templates/special-files.ini.epp | 16 |
9 files changed, 0 insertions, 234 deletions
diff --git a/modules/blog/files/footers/about.md b/modules/blog/files/footers/about.md deleted file mode 100644 index ffec622..0000000 --- a/modules/blog/files/footers/about.md +++ /dev/null @@ -1,11 +0,0 @@ -#About - -This is a blog and website written and maintained by Hugo Hornquist (me). - -I will primarily post computer related information, and mostly in Swedish. -Some entries might however be written in English to allow for a temporary larger audience. -The about pages are written in English for that reason (Hello! Non Swedes!). - ---- - -A (hopefully) up to date version of the source code for the website is available [here](//github.com/HugoNikanor/website-blog-2). However, be aware that any blog entries, the four files in the bottom bar as well as some other parts of the website are not included in that repository. diff --git a/modules/blog/files/footers/contact.md b/modules/blog/files/footers/contact.md deleted file mode 100644 index 651fec4..0000000 --- a/modules/blog/files/footers/contact.md +++ /dev/null @@ -1,12 +0,0 @@ -#Contact - -There are many ways to contact me, and most of them serve different purposes. - -All regular blog entries should have a comment field where you are more than welcome to write your thoughts. I do however reserve the full right to moderate the comments, and remove comments of an unacceptable nature (you are however free to disagree with me). - -I have an email address for other general contact at <hugo.hornquist@gmail.com>. - -A Twitter account is also present for twittery stuff. [@hugonikanor](//twitter.com/hugonikanor) - -Feel free to contact me in another way if you find out how, I can't however guarantee that I will answer your queries regardless of communications method. - diff --git a/modules/blog/files/footers/legal.md b/modules/blog/files/footers/legal.md deleted file mode 100644 index 87966c7..0000000 --- a/modules/blog/files/footers/legal.md +++ /dev/null @@ -1,28 +0,0 @@ -#Legal - -Website built by Hugo Hornquist (me), however, some parts are made by other people with their permission. - -###[Parsedown](//parsedown.org) -Parsedown is used for tracing the markdown files the entries are written in into proper html. -It is used under the MIT License, readable [here](https://raw.githubusercontent.com/erusev/parsedown/master/LICENSE.txt) - -###[imgur](//imgur.com) -Most images are hosted by imgur. You can read the appropriate terms of service [here](//imgur.com/tos). - -### [RSS Logo](//www.mozilla.org/en-US/foundation/feed-icon-guidelines/) -This is my public statement that I try to follow these guidelines. - ---- - -##Disclaimer - -Any text on this website is subject to change at any time. Everything that I write is in some way shape or form connected to me. Please refrain from being majorly offended by my opinions and remember that I have moderation capabilities. - ---- - -Upon pressing the following button you agree to give your soul to whatever form of devil you believe in. If a deity of required sort isn't available then you instead surrender your legally owned land to the former communist state. - -<form action=""> -<input type="button" name="btn" value="I accept" onclick="alert('You have made a terrible choice')"></input> -</form> -<br> diff --git a/modules/blog/files/footers/qna.md b/modules/blog/files/footers/qna.md deleted file mode 100644 index baa611a..0000000 --- a/modules/blog/files/footers/qna.md +++ /dev/null @@ -1,13 +0,0 @@ -#Questions and Answers - -**Q: Who are you?** -A: *Who knows, but I have a blog that you can read [here](https://www.youtube.com/watch?v=dQw4w9WgXcQ).* - -**Q: What comment system are you using?** -A: *My own comment system, available [here](//github.com/hugonikanor/website-comment-system)* - -**Q: Do you have an RSS feed?** -A: *[I do now!](./rss.php)* - -##Have a question? -If you have a question of your own you would like to see answered, [contact me](./?filename=contact.md). diff --git a/modules/blog/files/special-files.ini b/modules/blog/files/special-files.ini deleted file mode 100644 index e69de29..0000000 --- a/modules/blog/files/special-files.ini +++ /dev/null diff --git a/modules/blog/manifests/init.pp b/modules/blog/manifests/init.pp deleted file mode 100644 index 1ecce39..0000000 --- a/modules/blog/manifests/init.pp +++ /dev/null @@ -1,42 +0,0 @@ -class blog ( - String $blog_root, - Hash[String,Hash] $blogs = {}, - Optional[String] $domain = undef, - Optional[Array[String]] $domain_aliases = undef, -) { - create_resources(blog::instance, $blogs) - - if $domain { - $default = { - access_log => 'absent', - error_log => 'absent', - ssl => true, - ssl_cert => "/etc/letsencrypt/live/${certname}/fullchain.pem", - ssl_key => "/etc/letsencrypt/live/${certname}/privkey.pem", - use_default_location => false, - } - $domain_conf = { - server_name => [ $domain, ], - index_files => [ 'index.php', 'index.html', 'index.htm', ], - www_root => $blog::blog_root, - } - - $main_conf = { - "${safe_title} - server" => $default + $domain_conf, - } - - create_resources(nginx::resource::server, $main_conf) - - if $domain_aliases { - $alias_conf = { - "${safe_title} - aliases" => $default + { - server_name => $domain_aliases, - server_cfg_append => { - 'return' => '301 $scheme://blog.hornquist.se$request_uri', - }, - }, - } - create_resources(nginx::resource::server, $alias_conf) - } - } -} diff --git a/modules/blog/manifests/instance.pp b/modules/blog/manifests/instance.pp deleted file mode 100644 index adaa30d..0000000 --- a/modules/blog/manifests/instance.pp +++ /dev/null @@ -1,99 +0,0 @@ -define blog::instance ( - String $blog_title = $name, - String $author, - Boolean $has_comments = false, - String $subtitle = '', - Optional[String] $vcs_repo = undef, -) { - - $root = "${blog::blog_root}/${title}" - $safe_title = base64('encode', $blog_title) - - vcsrepo { $root: - ensure => latest, - provider => git, - source => 'https://github.com/HugoNikanor/website-blog-2.git', - revision => 'master', - # keep_local_changes => true, - owner => 'hugo', - group => 'www-data', - } - - if $vcs_repo { - vcsrepo { "${root}/entries": - ensure => latest, - provider => git, - source => $vcs_repo, - revision => 'master', - owner => 'hugo', - group => 'www-data', - } - } else { - file { "${root}/entries": - ensure => directory, - } - } - - file { "${root}/settings.php": - ensure => file, - content => epp('blog/settings.php.epp', { - author => $author, - title => $title, - subtitle => $subtitle, - has_comments => $has_comments, - }), - } - - file { "${root}/footnote": - ensure => directory, - recurse => true, - } - - $foot_files = [ - ['about.md', 'About'], - ['contact.md', 'Contact'], - ['legal.md', 'Legal'], - ['qna.md', '"Q&A"'], - ] - - $foot_files.each |$item| { - file { "${root}/footnote/${item[0]}": - source => "puppet:///modules/blog/footers/${item[0]}", - } - } - - file { "${root}/special-files.ini": - ensure => file, - content => $foot_files, - } - - $certname = lookup('certname') - - if $blog::domain { - - nginx::resource::location { "${safe_title} - server - /": - location => '/', - try_files => ['$uri', '$uri/', '=404'], - index_files => [], - ssl => true, - autoindex => on, - server => [ "${safe_title} - server", ] - } - - nginx::resource::location { "${safe_title} - server - php": - location => '~ \.php$', - fastcgi_params => 'snippets/fastcgi-php.conf', - fastcgi => 'unix:/run/php/php-fpm.sock', - ssl => true, - server => [ "${safe_title} - server", ], - } - - nginx::resource::location { "${safe_title} - server - ht": - location => '~ /\.ht', - location_cfg_append => { deny => 'all' }, - index_files => [], - ssl => true, - server => [ "${safe_title} - server", ], - } - } -} diff --git a/modules/blog/templates/settings.php.epp b/modules/blog/templates/settings.php.epp deleted file mode 100644 index c1ed2d7..0000000 --- a/modules/blog/templates/settings.php.epp +++ /dev/null @@ -1,13 +0,0 @@ -<%- | String $author, - String $title, - String $subtitle, - Boolean $has_comments = false, -| -%> -<%= '<?php' %> -# FILE MANAGED BY PUPPET -$author = "<%= $author %>"; -$blog_title = "<%= $title %>"; -$blog_subtitle = "<%= $subtitle %>"; -$http_host = $_SERVER["HTTP_HOST"]; -$urlbase = "http://$http_host/hugo"; -$has_comments = <%= if $has_comments { 'true' } else { 'false' } %>; diff --git a/modules/blog/templates/special-files.ini.epp b/modules/blog/templates/special-files.ini.epp deleted file mode 100644 index 66b779a..0000000 --- a/modules/blog/templates/special-files.ini.epp +++ /dev/null @@ -1,16 +0,0 @@ -<%- | Array[Tuple[String,String]] $foot_files, -| -%> -; FILE MANAGED BY PUPPET -; -; Which files on the website that are "special" -; This basicly means that they shouldnt have comments -[footnote] -<%- for $foot_files.each |$item| { -%> -files[] = <%= $item[0] %> -title[] = <%= $item[1] %> -<%- } -%> - -[other] -files[] = list -files[] = entry-not-found.md - |