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 @@
1
-*.pid
2 1
 output/*
3
-lib
4 2
 cache
5
-.sass-cache
6 3
 *.pyc

+ 0
- 40
Gruntfile.js View File

@@ -1,40 +0,0 @@
1
-grunt = require('grunt')
2
-
3
-grunt.initConfig({
4
-    sass: {
5
-        dist: {
6
-            files: {
7
-                "assets/css/main.css": "assets/css/main.scss"
8
-            }
9
-        }
10
-    },
11
-    watch: {
12
-        sass: {
13
-            files: ['assets/css/*.scss'],
14
-            tasks: ['sass'],
15
-        },
16
-        options: {
17
-            atBegin: true
18
-        }
19
-    },
20
-    browserSync: {
21
-        bsFiles: {
22
-            src: [
23
-                'assets/css/*.css',
24
-                'output/**/*.html'
25
-            ]
26
-        },
27
-        options: {
28
-            watchTask: true,
29
-            proxy: process.env.BROWSERSYNC_HOST ? process.env.BROWSERSYNC_HOST : 'pelican.127.0.0.2.xip.io',
30
-            reloadDebounce: 1500,
31
-            online: true
32
-        }
33
-    }
34
-});
35
-
36
-grunt.loadNpmTasks('grunt-contrib-sass');
37
-grunt.loadNpmTasks('grunt-contrib-watch');
38
-grunt.loadNpmTasks('grunt-browser-sync');
39
-
40
-grunt.registerTask('default', ['browserSync', 'watch']);

+ 0
- 50
Makefile View File

@@ -1,50 +0,0 @@
1
-BASEDIR=$(CURDIR)
2
-INPUTDIR=$(BASEDIR)/content
3
-OUTPUTDIR=$(BASEDIR)/output
4
-CONFFILE=$(BASEDIR)/pelicanconf.py
5
-PUBLISHCONF=$(BASEDIR)/publishconf.py
6
-VIRTUALENV=lib
7
-
8
-PELICAN=pelican
9
-PELICANOPTS=
10
-
11
-all: html
12
-
13
-help:
14
-	@echo 'Makefile for a pelican Web site                                        '
15
-	@echo '                                                                       '
16
-	@echo 'Usage:                                                                 '
17
-	@echo '   make html                        (re)generate the web site          '
18
-	@echo '   make clean                       remove the generated files         '
19
-	@echo '   make regenerate                  regenerate files upon modification '
20
-	@echo '   make publish                     generate using production settings '
21
-	@echo '                                                                       '
22
-
23
-
24
-html: setup clean $(OUTPUTDIR)/index.html
25
-	@echo 'Done'
26
-
27
-publish-nodeps:
28
-	$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
29
-
30
-publish: setup publish-nodeps
31
-
32
-$(OUTPUTDIR)/%.html:
33
-	$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
34
-
35
-clean:
36
-	find $(OUTPUTDIR) -mindepth 1 \( ! -name .do_not_delete \) -delete
37
-
38
-regenerate: clean
39
-	$(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
40
-
41
-$(VIRTUALENV)/bin/python:
42
-	if [ ! -d $(VIRTUALENV) ] ; then virtualenv --system-site-packages $(VIRTUALENV) ; fi
43
-
44
-env: $(VIRTUALENV)/bin/python
45
-
46
-setup: env
47
-	git submodule update --init --recursive
48
-	$(VIRTUALENV)/bin/pip install -r requirements.txt | sed '/^Requirement already satisfied/d'
49
-
50
-.PHONY: html help clean regenerate publish publish-nodeps setup all

+ 2
- 0
docker-compose.yml View File

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

+ 13
- 0
docker-nginx.conf View File

@@ -0,0 +1,13 @@
1
+server {
2
+    listen       80;
3
+    server_name  localhost;
4
+
5
+    try_files $uri $uri.html $uri/ =404;
6
+    root /var/sixohthree/sixohthree.com/output;
7
+
8
+    location /media/ {
9
+        proxy_pass http://i.abackstrom.com/share/;
10
+    }
11
+
12
+    include /var/sixohthree/sixohthree.com/nginx/*.conf;
13
+}

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

@@ -10,7 +10,7 @@
10 10
     {% block extra_meta %}
11 11
     {% endblock %}
12 12
 
13
-    <link rel="stylesheet" href="{{ SITEURL }}/assets/css/{{ CSS_FILE }}?v={{ BLOG_VERSION }}">
13
+    <link rel="stylesheet" href="/assets/css/{{ CSS_FILE }}?v={{ BLOG_VERSION }}">
14 14
 
15 15
     {% block scripts %}
16 16
     {% endblock %}
@@ -28,12 +28,12 @@
28 28
     {% if HEADER_PAGES %}
29 29
     <header role="banner">
30 30
       <h1>
31
-        <a href="{{ SITEURL|default("/") }}">sixohthree.com</a>
31
+        <a href="/">sixohthree.com</a>
32 32
       </h1>
33 33
       <nav class="pages">
34 34
         <ul class="p-0 m-0">
35 35
           {% for page_title, page_url in HEADER_PAGES %}
36
-            <li><a href="{{ SITEURL }}/{{ page_url }}">{{ page_title }}</a></li>
36
+            <li><a href="/{{ page_url }}">{{ page_title }}</a></li>
37 37
           {% endfor %}
38 38
         </ul>
39 39
       </nav>
@@ -49,7 +49,7 @@
49 49
         <div class="cute-12-tablet">
50 50
           <p role="contentinfo">
51 51
           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>.
52
-          Feeds: <a href="{{ SITEURL }}/{{ FEED_ALL_ATOM }}" rel="alternate">atom</a>.
52
+          Feeds: <a href="/{{ FEED_ALL_ATOM }}" rel="alternate">atom</a>.
53 53
           </p>
54 54
         </div>
55 55
       </div>

Loading…
Cancel
Save