Skip to content

Commit ba67c4f

Browse files
author
svpernova09
committed
Adding sculpin blog skeleton
1 parent 6d0d191 commit ba67c4f

29 files changed

+956
-1
lines changed

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/.sculpin/
2+
/app/cache/*
3+
/app/config/sculpin_kernel_*.yml
4+
/app/config/sculpin_site_*.yml
5+
/app/logs/*
6+
/output_*/
7+
/source/components/
8+
s3.conf
9+
.idea

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ memphis.technology
33

44
[http://memphis.technology](http://memphis.technology)
55

6-
Website for those interested in Technology in Memphis.
6+
Website for those interested in Technology in Memphis.
7+
8+
Powered by [Sculpin](http://sculpin.io). =)

app/config/sculpin_kernel.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sculpin_content_types:
2+
posts:
3+
permalink: blog/:year/:month/:day/:filename/

app/config/sculpin_site.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# The contents of this file are parsed and made available as
2+
# via `site.*`. So for example, {{ site.title }} can be used
3+
# in a template to get the contents of the `title` key.
4+
title: Sculpin Blog Skeleton
5+
subtitle: To Get You Started

publish.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
# Replace "sculpin generate" with "php sculpin.phar generate" if sculpin.phar
4+
# was downloaded and placed in this directory instead of sculpin having been
5+
# installed globally.
6+
7+
sculpin generate --env=prod
8+
if [ $? -ne 0 ]; then echo "Could not generate the site"; exit 1; fi
9+
10+
rsync -avze 'ssh -p 4668' output_prod/ username@yoursculpinsite:public_html
11+
if [ $? -ne 0 ]; then echo "Could not publish the site"; exit 1; fi

s3-publish.sh

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/bin/bash
2+
3+
if [ ! -f "s3.conf" ]
4+
then
5+
echo "Unable to locate s3.conf file - use s3.conf.dist as a template for configuring your S3 settings."
6+
exit 1
7+
else
8+
# Load config file
9+
. s3.conf
10+
fi
11+
12+
if [ ! -z "$1" -a "$1" != "--dry-run" -a "$1" != "-n" ]
13+
then
14+
echo "Usage: ./publish.sh [--dry-run|-n]"
15+
exit 2
16+
fi
17+
18+
# Would be a good idea to wipe out the prod env first, so that DELETE_REMOVED works properly
19+
# If you're comfortable with that, uncomment the line below:
20+
# rm -rf output_prod/*
21+
22+
vendor/bin/sculpin generate --env=prod || ( echo "Could not generate the site" && exit )
23+
24+
S3CMD_PATH=`which s3cmd`
25+
if [ $? -ne 0 -o -z "$S3CMD_PATH" ]
26+
then
27+
echo "s3cmd not found - unable to deploy"
28+
exit 3
29+
fi
30+
31+
if [ ! -f "$S3_CONFIG" ]
32+
then
33+
echo "Unable to find s3cmd config file - unable to deploy"
34+
exit 4
35+
fi
36+
37+
if [ "$S3_DELETE" = "true" ]
38+
then
39+
echo "Enabling DELETE_REMOVED"
40+
DELETE_REMOVED='--delete-removed'
41+
else
42+
echo "Disabling DELETE_REMOVED"
43+
DELETE_REMOVED='--no-delete-removed'
44+
fi
45+
46+
if [ "$S3_REGION" = "" ]
47+
then
48+
S3_REGION=US
49+
fi
50+
51+
if [ "$1" = "--dry-run" -o "$1" = "-n" ]
52+
then
53+
DRY_RUN='--dry-run'
54+
else
55+
DRY_RUN=''
56+
fi
57+
58+
s3cmd --config="$S3_CONFIG" $DRY_RUN --force --recursive $DELETE_REMOVED --bucket-location=$S3_REGION --progress --acl-public sync output_prod/ s3://$S3_BUCKET

s3.conf.dist

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Path to s3cmd configuration file for your Amazon S3 bucket
2+
# This is useful if you have multiple sets of credentials - you can give Sculpin a locked-down IAM key for deployments
3+
S3_CONFIG=./.s3/s3cmd.conf
4+
5+
# 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)
6+
# NOTE: If you ever upload files to your bucket that are not a part of your sculpin deployment, THIS SETTING WILL DELETE THEM.
7+
# This is why it is set to "false" by default; change to "true" in order to have sculpin fully manage your bucket contents.
8+
S3_DELETE=false
9+
10+
# Region for S3. Set to Oregon by default, because Oregon S3 has special read-after-write consistency.
11+
S3_REGION=us-west-2
12+
13+
# The name of your S3 bucket
14+
S3_BUCKET=www.mydomain.com

sculpin.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "sculpin/blog-skeleton",
3+
"description": "A Skeleton for a Sculpin Based Blog",
4+
"type": "sculpin-skeleton",
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "Dragonfly Development Inc.",
9+
"email": "[email protected]",
10+
"homepage": "http://dflydev.com"
11+
},
12+
{
13+
"name": "Beau Simensen",
14+
"email": "[email protected]",
15+
"homepage": "http://beausimensen.com"
16+
}
17+
],
18+
"require": {
19+
"components/bootstrap": "~2.3.1",
20+
"components/jquery": "~1.9.1",
21+
"components/highlightjs": "~7.3.0"
22+
},
23+
"config": {
24+
"component-dir": "source/components"
25+
}
26+
}

0 commit comments

Comments
 (0)