This commit is contained in:
Oliver Davies 2019-06-21 08:28:06 +01:00
commit c93aeb1a16
47 changed files with 10312 additions and 0 deletions

17
.editorconfig Normal file
View file

@ -0,0 +1,17 @@
# This file is used by editors and IDEs to unify coding standards
# @see http://EditorConfig.org
# @standards PHP: http://www.php-fig.org/psr/psr-2/
root = true
# Default configuration (applies to all file types)
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 4
indent_style = space
# Markdown customizations
[*.md]
trim_trailing_whitespace = false

10
.gitignore vendored Normal file
View file

@ -0,0 +1,10 @@
/.sculpin/
/app/cache/*
/app/config/sculpin_kernel_*.yml
/app/config/sculpin_site_*.yml
/app/logs/*
/output_*/
/node_modules/
/source/build/
s3.conf
/vendor/

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016 Sculpin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

83
README.md Normal file
View file

@ -0,0 +1,83 @@
Sculpin Blog Skeleton
=====================
A skeleton for a Sculpin based blog.
Powered by [Sculpin](http://sculpin.io). =)
Features
--------
A very basic Sculpin based blog supporting the following features:
* Very minimal Bootstrap based theme.
* A handful of existing posts in `source/_posts/` to get you started. Feel
free to remove these when you are ready.
* An about page at `/about`.
* An index page at `/`. It displays all posts and paginates them.
* A blog archive page at `/blog`. It displays post titles broken down by
month and is paginated.
* A blog categories page at `/blog/categories`.
* A blog category index at `/blog/categories/$category`. Similar to the blog
archive except broken down by each category.
* A blog tags page at `/blog/tags`.
* A blog tag index at `/blog/tags/$tag`. Similar to the blog archive
except broken down by each tag.
Prerequisites
-------------
Sculpin is a PHP application and installed with the PHP package manager `composer`.
See https://getcomposer.org/ for installation instructions.
Unless you do a very basic website, you want some CSS and Javascript assets. Sculpin
uses `yarn` to manage them. See https://yarnpkg.com/en/docs/install for installation
instructions.
Install
-------
Create a new project using composer:
```bash
$ composer create-project -s dev sculpin/blog-skeleton my-blog
```
This application uses [Symfony's Webpack Encore](https://symfony.com/doc/current/frontend.html)
to manage CSS, JavaScript and image assets. Install the JS dependencies:
```bash
$ cd my-blog
$ yarn install
```
Build
-----
First, start Encore to compile and update the assets in `source/assets/` into
`source/build/`. The watcher keeps running until you exit it manually:
```bash
$ composer yarn-watch
```
In a new console, start the sculpin watcher to have your content updated as
soon as you save changes:
```bash
$ composer sculpin-watch
```
Your newly generated clone of sculpin-blog-skeleton should now be accessible
at `http://localhost:8000/`.
Documentation
-------------
The skeleton provides you with useful configuration and some example data for
a Sculpin installation.
For more information about getting started with Sculpin, check out the
[Get Started page](https://sculpin.io/getstarted/) and have a look at the full
[documentation](https://sculpin.io/documentation/).

View file

@ -0,0 +1,8 @@
sculpin_content_types:
posts:
permalink: blog/:year/:month/:day/:filename/
# To disable posts (e.g., if you aren't planning on having any posts and Sculpin's watch mode complains):
#sculpin_content_types:
# posts:
# enabled: false

View file

@ -0,0 +1,9 @@
# The contents of this file are parsed and made available as
# via `site.*`. So for example, {{ site.title }} can be used
# in a template to get the contents of the `title` key.
title: Sculpin Blog Skeleton
subtitle: To Get You Started
# Insert your disqus shortname
#disqus:
# shortname:

34
composer.json Normal file
View file

@ -0,0 +1,34 @@
{
"name": "sculpin/blog-skeleton",
"description": "A Skeleton for a Sculpin Based Blog",
"type": "sculpin-skeleton",
"license": "MIT",
"authors": [
{
"name": "Dragonfly Development Inc.",
"email": "info@dflydev.com",
"homepage": "http://dflydev.com"
},
{
"name": "Beau Simensen",
"email": "beau@dflydev.com",
"homepage": "http://beausimensen.com"
}
],
"require": {
"sculpin/sculpin": "^3.0"
},
"scripts": {
"publish": [
"./publish.sh"
],
"sculpin-watch": [
"Composer\\Config::disableProcessTimeout",
"./vendor/bin/sculpin generate --watch --server"
],
"yarn-watch": [
"Composer\\Config::disableProcessTimeout",
"yarn encore dev --watch"
]
}
}

2444
composer.lock generated Normal file

File diff suppressed because it is too large Load diff

11
package.json Normal file
View file

@ -0,0 +1,11 @@
{
"dependencies": {
"@symfony/webpack-encore": "^0.24.0",
"bootstrap": "^4.3.1",
"highlightjs": "^9.12.0",
"jquery": "^3.4",
"node-sass": "^4.11.0",
"popper.js": "^1.14.7",
"sass-loader": "^7.0.1"
}
}

9
publish.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/bash
sculpin generate --env=prod
if [ $? -ne 0 ]; then echo "Could not generate the site"; exit 1; fi
# Add --delete right before "output_prod" to have rsync remove files that are
# deleted locally from the destination too. See README.md for an example.
rsync -avze 'ssh -p 4668' output_prod/ username@yoursculpinsite:public_html
if [ $? -ne 0 ]; then echo "Could not publish the site"; exit 1; fi

58
s3-publish.sh Executable file
View file

@ -0,0 +1,58 @@
#!/bin/bash
if [ ! -f "s3.conf" ]
then
echo "Unable to locate s3.conf file - use s3.conf.dist as a template for configuring your S3 settings."
exit 1
else
# Load config file
. s3.conf
fi
if [ ! -z "$1" -a "$1" != "--dry-run" -a "$1" != "-n" ]
then
echo "Usage: ./s3-publish.sh [--dry-run|-n]"
exit 2
fi
# Would be a good idea to wipe out the prod env first, so that DELETE_REMOVED works properly
# If you're comfortable with that, uncomment the line below:
# rm -rf output_prod/*
vendor/bin/sculpin generate --env=prod || ( echo "Could not generate the site" && exit )
S3CMD_PATH=`which s3cmd`
if [ $? -ne 0 -o -z "$S3CMD_PATH" ]
then
echo "s3cmd not found - unable to deploy"
exit 3
fi
if [ ! -f "$S3_CONFIG" ]
then
echo "Unable to find s3cmd config file - unable to deploy"
exit 4
fi
if [ "$S3_DELETE" = "true" ]
then
echo "Enabling DELETE_REMOVED"
DELETE_REMOVED='--delete-removed'
else
echo "Disabling DELETE_REMOVED"
DELETE_REMOVED='--no-delete-removed'
fi
if [ "$S3_REGION" = "" ]
then
S3_REGION=US
fi
if [ "$1" = "--dry-run" -o "$1" = "-n" ]
then
DRY_RUN='--dry-run'
else
DRY_RUN=''
fi
s3cmd --config="$S3_CONFIG" $DRY_RUN --force --recursive $DELETE_REMOVED --bucket-location=$S3_REGION --progress --acl-public sync output_prod/ s3://$S3_BUCKET

14
s3.conf.dist Normal file
View file

@ -0,0 +1,14 @@
# Path to s3cmd configuration file for your Amazon S3 bucket
# This is useful if you have multiple sets of credentials - you can give Sculpin a locked-down IAM key for deployments
S3_CONFIG=./.s3/s3cmd.conf
# Delete files from S3 bucket that are not created by sculpin (e.g., if you delete a blog post, this will remove the corresponding HTML files for you)
# NOTE: If you ever upload files to your bucket that are not a part of your sculpin deployment, THIS SETTING WILL DELETE THEM.
# This is why it is set to "false" by default; change to "true" in order to have sculpin fully manage your bucket contents.
S3_DELETE=false
# Region for S3. Set to Oregon by default, because Oregon S3 has special read-after-write consistency.
S3_REGION=us-west-2
# The name of your S3 bucket
S3_BUCKET=www.mydomain.com

7
source/404.html Normal file
View file

@ -0,0 +1,7 @@
---
layout: default
permalink: none
title: Four o four
---
<h2>Page not found</h2>

View file

@ -0,0 +1,106 @@
<!DOCTYPE html>
<html>
<head lang="en">
<title>{% block title %}{{ page.title }}{% endblock %} &mdash; {{ site.title }} &mdash; {{ site.subtitle }}</title>
<meta charset="utf-8">
<meta name="theme-color" content="#ffffff">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{% block head_meta %}
<meta name="robots" content="noindex, follow">
{% endblock %}
<link rel="stylesheet" href="{{ site.url }}/build/app.css">
<link rel="apple-touch-startup-image" href="{{ site.url }}/build/2048x2048.png">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="shortcut icon" sizes="76x76" href="{{ site.url }}/build/jackson/76x76.png">
<link rel="shortcut icon" sizes="120x120" href="{{ site.url }}/build/jackson/120x120.png">
<link rel="shortcut icon" sizes="128x128" href="{{ site.url }}/build/jackson/128x128.png">
<link rel="shortcut icon" sizes="152x152" href="{{ site.url }}/build/jackson/152x152.png">
<link rel="shortcut icon" sizes="196x196" href="{{ site.url }}/build/jackson/196x196.png">
<link rel="shortcut icon" sizes="512x512" href="{{ site.url }}/build/jackson/512x512.png">
<link rel="shortcut icon" sizes="1024x1024" href="{{ site.url }}/build/jackson/1024x1024.png">
<link rel="shortcut icon" sizes="2048x2048" href="{{ site.url }}/build/jackson/2048x2048.png">
<link rel="apple-touch-icon" sizes="76x76" href="{{ site.url }}/build/jackson/76x76.png">
<link rel="apple-touch-icon" sizes="120x120" href="{{ site.url }}/build/jackson/120x120.png">
<link rel="apple-touch-icon" sizes="128x128" href="{{ site.url }}/build/jackson/128x128.png">
<link rel="apple-touch-icon" sizes="152x152" href="{{ site.url }}/build/jackson/152x152.png">
<link rel="apple-touch-icon" sizes="196x196" href="{{ site.url }}/build/jackson/196x196.png">
<link rel="apple-touch-icon" sizes="512x512" href="{{ site.url }}/build/jackson/512x512.png">
<link rel="apple-touch-icon" sizes="1024x1024" href="{{ site.url }}/build/jackson/1024x1024.png">
<link rel="apple-touch-icon" sizes="2048x2048" href="{{ site.url }}/build/jackson/2048x2048.png">
<link rel="alternate" type="application/atom+xml" href="{{ site.url }}/atom.xml" title="{{ site.title }} activity feed" />
{% block head_styles %}
{% endblock %}
{% block head_scripts %}
{% endblock %}
</head>
<body>
<header>
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<div class="container">
<a class="navbar-brand" href="{{ site.url }}/">{{ site.title }}</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav mr-auto">
<li class="nav-item"><a class="nav-link" href="{{ site.url }}/blog">Posts Archive</a></li>
<li class="nav-item"><a class="nav-link" href="{{ site.url }}/blog/categories">Categories</a></li>
<li class="nav-item"><a class="nav-link" href="{{ site.url }}/blog/tags">Tags</a></li>
<li class="nav-item"><a class="nav-link" href="{{ site.url }}/about">About</a></li>
</ul>
</div>
</div>
</nav>
</header>
<main role="main" class="container">
<div class="row">
<div class="col-sm-8">
{% block content_wrapper %}{% block content %}{% endblock %}{% endblock %}
</div>
<div class="col-sm-4 sidebar">
<div class="card bg-light">
<div class="card-header">{{ site.title }}</div>
<div class="card-body">
{% if site.subtitle %}<small>{{ site.subtitle }}</small>{% endif %}
</div>
</div>
<div class="card bg-light sidebar-nav">
<div class="card-header">Links</div>
<div class="card-body">
<ul class="nav flex-column">
<li class="nav-item"><a class="nav-link" href="http://sculpin.io">sculpin.io</a></li>
<li class="nav-item"><a class="nav-link" href="http://twitter.com/getsculpin">@getsculpin</a></li>
</ul>
</div>
</div>
</div>
</div>
</main>
<footer class="container">
<span class="text-muted">&copy; {{ "now"|date("Y") }} {{ site.title }}</span>
</footer>
<script src="{{ site.url }}/build/app.js"></script>
{% block scripts %}
{% endblock %}
{% if site.google_analytics_tracking_id %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{site.google_analytics_tracking_id}}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
{% block scripts_after %}
{% endblock %}
</body>
</html>

View file

@ -0,0 +1,16 @@
---
title: Happy Birthday Sculpin!
tags:
- sculpin
- markdown
categories:
- personal
---
The first commit to the Sculpin repository was made on December 20th, 2011.
What a trip since then!
Sculpin has always been a big fan of [Markdown][1]. So this post was
written in Markdown. :)
[1]: http://daringfireball.net/projects/markdown/

View file

@ -0,0 +1,11 @@
---
title: Symfony Live Hacking Day!
tags: [sensio, symfony, symfony live]
categories: [personal]
---
Fun times at the Symfony Live San Francisco 2012 Hacking Day! Code
was hacked and pizza was had. Some pics of the conference are
available on the [Sensio Labs Facebook page][1].
[1]: https://www.facebook.com/media/set/?set=a.450514941665306.112810.129739647076172

View file

@ -0,0 +1,9 @@
---
title: Balrog
tags: [balrog, community, static site generator]
categories: [personal]
---
Found out about [Balrog](http://github.com/igorw/balrog) today! It looks
like a really nice micro static site generator. Maybe Sculpin and Balrog
can be friends?

View file

@ -0,0 +1,12 @@
---
title: And Then There Was Textile Support
categories:
- features
tags:
- sculpin
- textile
---
"Textile":https://github.com/netcarver/textile support was added on November 26th, 2012. Markdown is great, but so is choice. More converters for all!
In honor of this milestone, this post is written in *Textile*.

View file

@ -0,0 +1,54 @@
---
title: Lorem Ipsum
categories:
- testing
# https://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables
disqus:
identifier: # slug_for_current_page
title: # title_for_current_page
url: # url_for_current_page
category_id: # category_id_for_current_page
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin consequat congue
lacus vel convallis. Cras nisi urna, ultrices non semper quis, ultricies sit
amet est. Donec nunc velit, consequat a pulvinar a, eleifend id leo. Curabitur
vel leo eros, vitae elementum purus. Integer id lorem hendrerit purus gravida
commodo. Pellentesque nec rhoncus turpis. Cras feugiat odio eget quam semper at
dictum lectus adipiscing. In ut est et mauris pulvinar placerat eget fringilla
lectus.
Ut in mauris augue, vitae facilisis purus. Nam ullamcorper pharetra lorem,
cursus lobortis tellus facilisis congue. Etiam ac dapibus lectus. Nunc tempus
ullamcorper felis, eu sagittis risus mollis aliquam. Mauris congue orci ac metus
egestas porta nec ac lectus. Nam ac neque vitae quam sagittis dapibus. Morbi sit
amet erat ac justo rutrum molestie id in tortor. Proin egestas tortor neque,
eget fringilla nunc. Donec consequat purus ac risus dignissim dignissim.
Praesent dui nisl, suscipit sed cursus in, dictum non elit. Nulla eget congue
nisl.
Morbi hendrerit porta ante, dapibus adipiscing nibh ornare at. Nullam iaculis
porta ante, at semper tellus auctor nec. Vestibulum nec justo sed purus
elementum venenatis. In hac habitasse platea dictumst. Fusce nibh tellus, varius
non commodo sit amet, eleifend placerat nisl. Donec sit amet enim cursus ligula
adipiscing auctor. Nullam sagittis porta ligula vitae rutrum. Aenean id sapien
mi, elementum ullamcorper lectus. Aliquam erat volutpat. Fusce bibendum, leo
ultricies lacinia viverra, mauris urna fermentum sem, id tempus lectus nunc
faucibus magna. Vestibulum risus mi, tempus ut lobortis non, mattis sed diam.
Nunc at mattis leo.
Ut erat nunc, vestibulum sit amet sodales non, tincidunt nec justo. Integer
vitae tortor massa. Vestibulum tincidunt commodo lacus, ac cursus lorem mattis
eu. Donec ut magna vel urna fermentum congue. Donec laoreet neque at velit
imperdiet luctus. In consectetur lacus eu purus dictum a imperdiet leo
ullamcorper. Phasellus consequat feugiat tincidunt. Quisque vel orci in mauris
fermentum pretium.
Pellentesque rhoncus accumsan auctor. Nunc venenatis tellus non ante pharetra
pretium. Sed rutrum, eros eu tristique luctus, neque sapien ultrices felis, id
varius orci erat eget leo. Curabitur ut volutpat diam. Phasellus porta neque
vitae nisi sodales ultrices. Etiam ultricies blandit lorem, id accumsan eros
facilisis vel. Praesent nulla sapien, laoreet sit amet dapibus sit amet,
tincidunt vitae neque. Vestibulum aliquam sollicitudin urna, in facilisis dui
aliquam id.

View file

@ -0,0 +1,12 @@
---
title: This is a draft!
draft: true
categories:
- features
---
This is a draft post. You will only see this if you are running the `dev`
environment (`dev` is the default).
All draft posts will automatically be tagged `draft` so they are easy to
find.

View file

@ -0,0 +1,42 @@
---
title: Syntax Highlighting
categories:
- features
---
You're all programmers, right? And you're writing code snippets on your Sculpin
powered blog? Yeah. So you want some highlighting with your static site generation?
Here you go!
namespace Foo;
/**
* Awesome Contrived Example.
*/
class Bar implements BarInterface
{
private $baz;
public function __construct(BazInterface $baz)
{
$this->baz = $baz;
}
public function doIt()
{
return $this->baz->do('it');
}
}
You can also use [fenced code blocks][fcb] with a syntax declaration at the top.
You can use either `~` or <code>`</code> to mark them.
[fcb]: http://michelf.ca/projects/php-markdown/extra/#fenced-code-blocks
~~~php
if ($fencedCodeBlock->syntax !== 'PHP') {
throw new UnexpectedValueException("wat");
}
~~~
Like this addition to the skeleton? You can thank for [@Pawka](https://github.com/Pawka)
for suggesting it. :)

76
source/_views/post.html Normal file
View file

@ -0,0 +1,76 @@
{% extends "default" %}
{% block head_meta %}
<meta name="robots" content="index, follow">
{% endblock %}
{% block content_wrapper %}
<article>
<header>
<h2>{{ page.title }} <small>post</small></h2>
</header>
<div>
{{ page.blocks.content|raw }}
</div>
{% if page.categories %}
<p class="categories">
Categories:
{% for category in page.categories %}
<a href="{{ site.url }}/blog/categories/{{ category|url_encode(true) }}">{{ category }}</a>{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
{% if page.tags %}
<p class="tags">
Tags:
{% for tag in page.tags %}
<a href="{{ site.url }}/blog/tags/{{ tag|url_encode(true) }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
{% if page.previous_post or page.next_post %}
<nav class="article">
<ul>
{% if page.next_post %}
<li>Next: <a class="next" href="{{ site.url }}{{ page.next_post.url }}" title="{{ page.next_post.title }}"><span class="title">{{ page.next_post.title }}</span></a></li>
{% endif %}
{% if page.previous_post %}
<li>Previous: <a class="previous" href="{{ site.url }}{{ page.previous_post.url }}" title="{{ page.previous_post.title }}"><span class="title">{{ page.previous_post.title }}</span></a></li>
{% endif %}
</ul>
</nav>
{% endif %}
</article>
{% if site.disqus.shortname and site.disqus.shortname != '' %}
<div id="disqus_thread"></div>
<script>
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '{{site.disqus.shortname}}'; // required: replace example with your forum shortname
{% if page.disqus.identifier %}var disqus_identifier = '{{page.disqus.identifier}}'; {% endif %}
{% if page.disqus.title %}var disqus_title = '{{page.disqus.title}}';{% endif %}
{% if page.disqus.url %}var disqus_url = '{{page.disqus.url}}';{% endif %}
{% if page.disqus.category_id %}var disqus_category_id = '{{page.disqus.category_id}}';{% endif %}
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the
<a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a>
</noscript>
{% endif %}
{% endblock %}

8
source/about.md Normal file
View file

@ -0,0 +1,8 @@
---
layout: default
title: About
---
# About the Author or Blog
Here is a little information about the author or the blog.

View file

@ -0,0 +1,33 @@
@import "../../../node_modules/bootstrap/scss/bootstrap";
@import "../../../node_modules/highlightjs/styles/github.css";
small {
display: block;
color: #888;
}
main.container, footer.container {
max-width: 900px;
}
footer.container {
margin-top: 30px;
padding: 30px 0;
border-top: 1px dashed #aaa;
}
@media (max-width: 767px) {
.sidebar {
padding-top: 30px;
}
}
@media (min-width: 980px) {
body {
padding-bottom: 40px;
}
}
body > main.container {
padding: 80px 15px 0; /* 80px to make the container go all the way to the bottom of the topbar */
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

7
source/assets/js/app.js Normal file
View file

@ -0,0 +1,7 @@
require('../css/app.scss');
require('jquery')
require('bootstrap')
var hljs = require('highlightjs')
hljs.initHighlightingOnLoad();

28
source/atom.xml Normal file
View file

@ -0,0 +1,28 @@
---
use: ["posts"]
permalink: atom.xml
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[{{ site.title }}]]></title>
<link href="{{ site.url }}/atom.xml" rel="self"/>
<link href="{{ site.url }}/"/>
<updated>{{ site.calculated_date | date('c') }}</updated>
<id>{{ site.url }}/</id>
{% if site.author or site.email %}
<author>
{% if site.author %}<name><![CDATA[{{ site.author }}]]></name>{% endif %}
{% if site.email %}<email><![CDATA[{{ site.email }}]]></email>{% endif %}
</author>
{% endif %}
<generator uri="http://sculpin.io/">Sculpin</generator>
{% for post in data.posts|slice(0, 10) %}
<entry>
<title type="html"><![CDATA[{{ post.title }}]]></title>
<link href="{{ site.url }}{{ post.url }}"/>
<updated>{{ post.date|date('c') }}</updated>
<id>{{ site.url }}{{ post.url }}</id>
<content type="html"><![CDATA[{{ post.blocks.content|raw }}]]></content>
</entry>
{% endfor %}
</feed>

38
source/blog.html Normal file
View file

@ -0,0 +1,38 @@
---
layout: default
title: Posts Archive
generator: pagination
use:
- posts
---
{% set year = '0' %}
<h2>Posts Archive</h2>
{% for post in page.pagination.items %}
{% set this_year %}{{ post.date | date("Y") }}{% endset %}
{% if year != this_year %}
{% set month = '0' %}
{% set year = this_year %}
{% endif %}
{% set this_month %}{{ post.date | date("F") }}{% endset %}
{% if month != this_month %}
{% set month = this_month %}
<h3>{{ month }} {{ year }}</h3>
{% endif %}
<div>
<a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a>
</div>
{% endfor %}
<div>
{% if page.pagination.previous_page or page.pagination.next_page %}
<nav class="article clearfix">
{% if page.pagination.previous_page %}
<a class="previous" href="{{ site.url }}{{ page.pagination.previous_page.url }}" title="Previous Page"><span class="title">Previous Page</span></a>
{% endif %}
{% if page.pagination.next_page %}
<a class="next" href="{{ site.url }}{{ page.pagination.next_page.url }}" title="Next Page"><span class="title">Next Page</span></a>
{% endif %}
</nav>
{% endif %}
</div>

View file

@ -0,0 +1,13 @@
---
layout: default
title: Categories
use:
- posts_categories
---
<h2>Categories</h2>
<div>
{% for category,posts in data.posts_categories %}
<a href="{{ site.url }}/blog/categories/{{ category|url_encode(true) }}">{{ category }}</a>
{% endfor %}
</div>

View file

@ -0,0 +1,47 @@
---
layout: default
title: Category Archive
generator: [posts_category_index, pagination]
pagination:
provider: page.category_posts
---
{% block head_meta %}
<link rel="alternate" type="application/atom+xml" href="{{ site.url }}/blog/categories/{{ page.category|url_encode(true) }}.xml" title="{{ site.title }} '{{ page.category }}' category feed" />
<meta name="robots" content="noindex, follow">
{% endblock %}
{% block title %}{{ page.title }} "{{ page.category }}"{% endblock %}
{% block content %}
{% set year = '0' %}
<h2>"{{ page.category }}"</h2>
{% for post in page.pagination.items %}
{% set this_year %}{{ post.date | date("Y") }}{% endset %}
{% if year != this_year %}
{% set month = '0' %}
{% set year = this_year %}
{% endif %}
{% set this_month %}{{ post.date | date("F") }}{% endset %}
{% if month != this_month %}
{% set month = this_month %}
<h3>{{ month }} {{ year }}</h3>
{% endif %}
<article>
<div><a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a></div>
</article>
{% endfor %}
<div>
{% if page.pagination.previous_page or page.pagination.next_page %}
<nav class="article clearfix">
{% if page.pagination.previous_page %}
<a class="previous" href="{{ site.url }}{{ page.pagination.previous_page.url }}" title="Previous Page"><span class="title">Previous Page</span></a>
{% endif %}
{% if page.pagination.next_page %}
<a class="next" href="{{ site.url }}{{ page.pagination.next_page.url }}" title="Next Page"><span class="title">Next Page</span></a>
{% endif %}
</nav>
{% endif %}
</div>
{% endblock content %}

View file

@ -0,0 +1,28 @@
---
generator: [posts_category_index]
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[{{ site.title }}]]></title>
<link href="{{ site.url }}{{ page.url }}" rel="self"/>
<link href="{{ site.url }}/"/>
<updated>{{ site.calculated_date | date('c') }}</updated>
<id>{{ site.url }}/</id>
{% if site.author or site.email %}
<author>
{% if site.author %}<name><![CDATA[{{ site.author }}]]></name>{% endif %}
{% if site.email %}<email><![CDATA[{{ site.email }}]]></email>{% endif %}
</author>
{% endif %}
<generator uri="http://sculpin.io/">Sculpin</generator>
{% for post in page.category_posts|slice(0, 10) %}
<entry>
<title type="html"><![CDATA[{{ post.title }}]]></title>
<link href="{{ site.url }}{{ post.url }}"/>
<updated>{{ post.date|date('c') }}</updated>
<id>{{ site.url }}{{ post.url }}</id>
<content type="html"><![CDATA[{{ post.blocks.content|raw }}]]></content>
</entry>
{% endfor %}
</feed>

13
source/blog/tags.html Normal file
View file

@ -0,0 +1,13 @@
---
layout: default
title: Tags
use:
- posts_tags
---
<h2>Tags</h2>
<div>
{% for tag,posts in data.posts_tags %}
<a href="{{ site.url }}/blog/tags/{{ tag|url_encode(true) }}">{{ tag }}</a>
{% endfor %}
</div>

47
source/blog/tags/tag.html Normal file
View file

@ -0,0 +1,47 @@
---
layout: default
title: Tag Archive
generator: [posts_tag_index, pagination]
pagination:
provider: page.tag_posts
---
{% block head_meta %}
<link rel="alternate" type="application/atom+xml" href="{{ site.url }}/blog/tags/{{ page.tag|url_encode(true) }}.xml" title="{{ site.title }} '{{ page.tag }}' tag feed" />
<meta name="robots" content="noindex, follow">
{% endblock %}
{% block title %}{{ page.title }} "{{ page.tag }}"{% endblock %}
{% block content %}
{% set year = '0' %}
<h2>"{{ page.tag }}"</h2>
{% for post in page.pagination.items %}
{% set this_year %}{{ post.date | date("Y") }}{% endset %}
{% if year != this_year %}
{% set month = '0' %}
{% set year = this_year %}
{% endif %}
{% set this_month %}{{ post.date | date("F") }}{% endset %}
{% if month != this_month %}
{% set month = this_month %}
<h3>{{ month }} {{ year }}</h3>
{% endif %}
<article>
<div><a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a></div>
</article>
{% endfor %}
<div>
{% if page.pagination.previous_page or page.pagination.next_page %}
<nav class="article clearfix">
{% if page.pagination.previous_page %}
<a class="previous" href="{{ site.url }}{{ page.pagination.previous_page.url }}" title="Previous Page"><span class="title">Previous Page</span></a>
{% endif %}
{% if page.pagination.next_page %}
<a class="next" href="{{ site.url }}{{ page.pagination.next_page.url }}" title="Next Page"><span class="title">Next Page</span></a>
{% endif %}
</nav>
{% endif %}
</div>
{% endblock content %}

28
source/blog/tags/tag.xml Normal file
View file

@ -0,0 +1,28 @@
---
generator: [posts_tag_index]
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[{{ site.title }}]]></title>
<link href="{{ site.url }}{{ page.url }}" rel="self"/>
<link href="{{ site.url }}/"/>
<updated>{{ site.calculated_date | date('c') }}</updated>
<id>{{ site.url }}/</id>
{% if site.author or site.email %}
<author>
{% if site.author %}<name><![CDATA[{{ site.author }}]]></name>{% endif %}
{% if site.email %}<email><![CDATA[{{ site.email }}]]></email>{% endif %}
</author>
{% endif %}
<generator uri="http://sculpin.io/">Sculpin</generator>
{% for post in page.tag_posts|slice(0, 10) %}
<entry>
<title type="html"><![CDATA[{{ post.title }}]]></title>
<link href="{{ site.url }}{{ post.url }}"/>
<updated>{{ post.date|date('c') }}</updated>
<id>{{ site.url }}{{ post.url }}</id>
<content type="html"><![CDATA[{{ post.blocks.content|raw }}]]></content>
</entry>
{% endfor %}
</feed>

BIN
source/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

33
source/index.html Normal file
View file

@ -0,0 +1,33 @@
---
layout: default
title: Home
generator: pagination
pagination:
max_per_page: 3
use:
- posts
---
{% for post in page.pagination.items %}
<article>
<header>
<h2><a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a></h2>
</header>
<div>
{{ post.blocks.content|raw }}
</div>
{% if post.meta.tags %}
<p class="tags">
Tags:
{% for tag in post.meta.tags %}
<a href="{{ site.url }}/blog/tags/{{ tag|url_encode(true) }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
</article>
{% endfor %}
{% if page.pagination.previous_page or page.pagination.next_page %}
<nav>
{% if page.pagination.previous_page %}<a href="{{ site.url }}{{ page.pagination.previous_page.url }}">Newer Posts</a>{% endif %}<br />
{% if page.pagination.next_page %}<a href="{{ site.url }}{{ page.pagination.next_page.url }}">Older Posts</a>{% endif %}<br />
</nav>
{% endif %}

9
source/robots.txt Normal file
View file

@ -0,0 +1,9 @@
---
permalink: none
---
User-agent: *
Disallow: /blog/tags/
Disallow: /blog/categories/
Sitemap: {{ site.url }}/sitemap.xml

21
source/sitemap.xml Normal file
View file

@ -0,0 +1,21 @@
---
use: ["posts"]
permalink: sitemap.xml
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>{{ site.url }}</loc>
<lastmod>{{ site.calculated_date | date('Y-m-d') }}</lastmod>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
{% for post in data.posts %}
<url>
<loc>{{ site.url }}{{ post.url }}</loc>
<lastmod>{{ post.date|date('c') }}</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
{% endfor %}
</urlset>

23
webpack.config.js Normal file
View file

@ -0,0 +1,23 @@
var Encore = require('@symfony/webpack-encore');
Encore
// directory where compiled assets will be stored
.setOutputPath('source/build/')
// public path used by the web server to access the output path
.setPublicPath('/build')
.copyFiles({
from: './source/assets/icons'
})
.addEntry('app', './source/assets/js/app.js')
.disableSingleRuntimeChunk()
.cleanupOutputBeforeBuild()
.enableSourceMaps(!Encore.isProduction())
// enables hashed filenames (e.g. app.abc123.css)
.enableVersioning(Encore.isProduction())
.enableSassLoader()
;
module.exports = Encore.getWebpackConfig();

6873
yarn.lock Normal file

File diff suppressed because it is too large Load diff