Browse Source

Removing old build tools, adding docker things

pull/1/head
Annika Backstrom 1 year ago
parent
commit
fecfcd14d1
6 changed files with 19 additions and 97 deletions
  1. 0
    3
      .gitignore
  2. 0
    40
      Gruntfile.js
  3. 0
    50
      Makefile
  4. 2
    0
      docker-compose.yml
  5. 13
    0
      docker-nginx.conf
  6. 4
    4
      themes/histrionic/templates/base.html

+ 0
- 3
.gitignore View File

@@ -1,6 +1,3 @@
*.pid
output/*
lib
cache
.sass-cache
*.pyc

+ 0
- 40
Gruntfile.js View File

@@ -1,40 +0,0 @@
grunt = require('grunt')

grunt.initConfig({
sass: {
dist: {
files: {
"assets/css/main.css": "assets/css/main.scss"
}
}
},
watch: {
sass: {
files: ['assets/css/*.scss'],
tasks: ['sass'],
},
options: {
atBegin: true
}
},
browserSync: {
bsFiles: {
src: [
'assets/css/*.css',
'output/**/*.html'
]
},
options: {
watchTask: true,
proxy: process.env.BROWSERSYNC_HOST ? process.env.BROWSERSYNC_HOST : 'pelican.127.0.0.2.xip.io',
reloadDebounce: 1500,
online: true
}
}
});

grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-browser-sync');

grunt.registerTask('default', ['browserSync', 'watch']);

+ 0
- 50
Makefile View File

@@ -1,50 +0,0 @@
BASEDIR=$(CURDIR)
INPUTDIR=$(BASEDIR)/content
OUTPUTDIR=$(BASEDIR)/output
CONFFILE=$(BASEDIR)/pelicanconf.py
PUBLISHCONF=$(BASEDIR)/publishconf.py
VIRTUALENV=lib

PELICAN=pelican
PELICANOPTS=

all: html

help:
@echo 'Makefile for a pelican Web site '
@echo ' '
@echo 'Usage: '
@echo ' make html (re)generate the web site '
@echo ' make clean remove the generated files '
@echo ' make regenerate regenerate files upon modification '
@echo ' make publish generate using production settings '
@echo ' '


html: setup clean $(OUTPUTDIR)/index.html
@echo 'Done'

publish-nodeps:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)

publish: setup publish-nodeps

$(OUTPUTDIR)/%.html:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)

clean:
find $(OUTPUTDIR) -mindepth 1 \( ! -name .do_not_delete \) -delete

regenerate: clean
$(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)

$(VIRTUALENV)/bin/python:
if [ ! -d $(VIRTUALENV) ] ; then virtualenv --system-site-packages $(VIRTUALENV) ; fi

env: $(VIRTUALENV)/bin/python

setup: env
git submodule update --init --recursive
$(VIRTUALENV)/bin/pip install -r requirements.txt | sed '/^Requirement already satisfied/d'

.PHONY: html help clean regenerate publish publish-nodeps setup all

+ 2
- 0
docker-compose.yml View File

@@ -18,6 +18,8 @@ services:
image: nginx
volumes:
- ./output:/usr/share/nginx/html
- ./:/var/sixohthree/sixohthree.com
- ./docker-nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- "8045:80"
entrypoint: nginx -g "daemon off;"

+ 13
- 0
docker-nginx.conf View File

@@ -0,0 +1,13 @@
server {
listen 80;
server_name localhost;

try_files $uri $uri.html $uri/ =404;
root /var/sixohthree/sixohthree.com/output;

location /media/ {
proxy_pass http://i.abackstrom.com/share/;
}

include /var/sixohthree/sixohthree.com/nginx/*.conf;
}

+ 4
- 4
themes/histrionic/templates/base.html View File

@@ -10,7 +10,7 @@
{% block extra_meta %}
{% endblock %}

<link rel="stylesheet" href="{{ SITEURL }}/assets/css/{{ CSS_FILE }}?v={{ BLOG_VERSION }}">
<link rel="stylesheet" href="/assets/css/{{ CSS_FILE }}?v={{ BLOG_VERSION }}">

{% block scripts %}
{% endblock %}
@@ -28,12 +28,12 @@
{% if HEADER_PAGES %}
<header role="banner">
<h1>
<a href="{{ SITEURL|default("/") }}">sixohthree.com</a>
<a href="/">sixohthree.com</a>
</h1>
<nav class="pages">
<ul class="p-0 m-0">
{% for page_title, page_url in HEADER_PAGES %}
<li><a href="{{ SITEURL }}/{{ page_url }}">{{ page_title }}</a></li>
<li><a href="/{{ page_url }}">{{ page_title }}</a></li>
{% endfor %}
</ul>
</nav>
@@ -49,7 +49,7 @@
<div class="cute-12-tablet">
<p role="contentinfo">
Unless otherwise noted, content on this site was created by Annika Backstrom and is licensed under the <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>. Powered by <a href="https://blog.getpelican.com/">Pelican</a>.
Feeds: <a href="{{ SITEURL }}/{{ FEED_ALL_ATOM }}" rel="alternate">atom</a>.
Feeds: <a href="/{{ FEED_ALL_ATOM }}" rel="alternate">atom</a>.
</p>
</div>
</div>

Loading…
Cancel
Save