2 Commits 45fb4053ba ... 72e5af154b

Autor SHA1 Mensaje Fecha
  Christine Lemmer-Webber 72e5af154b Switch makefile over to haunt system hace 2 años
  Christine Lemmer-Webber bbdae24aba Switch to new syntax highlighting hace 2 años
Se han modificado 5 ficheros con 71 adiciones y 135 borrados
  1. 8 58
      Makefile
  2. 3 0
      dustycloud/templates.scm
  3. 27 0
      static/css/base.css
  4. 33 0
      static/css/code.css
  5. 0 77
      static/css/pygments.css

+ 8 - 58
Makefile

@@ -1,66 +1,16 @@
-PY=./bin/python
-PELICAN=./bin/pelican
-PELICANOPTS=
-
-BASEDIR=$(CURDIR)
-INPUTDIR=$(BASEDIR)/content
-OUTPUTDIR=$(BASEDIR)/output
-CONFFILE=$(BASEDIR)/pelicanconf.py
-
-SSH_HOST=dustycloud
-SSH_PORT=22
-SSH_USER=cwebber
-SSH_TARGET_DIR=/srv/dustycloud/pelican_build/
-SSH_GIT_DIR=/srv/dustycloud/git_checkout/
-
 compile_and_run: html serve
 
-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 '   make serve                       serve site at http://localhost:8000'
-	@echo '   make devserver                   start/restart develop_server.sh    '
-	@echo '   make stopserver                  stop local server                  '
-	@echo '   rsync_upload                     upload the web site via rsync+ssh  '
-	@echo '                                                                       '
-
-
-virtualenv:
-	virtualenv .
-	./bin/easy_install -U docutils pelican PasteDeploy PasteScript typogrify pygments Markdown
-
-html: clean $(OUTPUTDIR)/index.html
-
-$(OUTPUTDIR)/%.html:
-	$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
-
-clean:
-	[ ! -d $(OUTPUTDIR) ] || find $(OUTPUTDIR) -mindepth 1 -delete
-
-regenerate: clean
-	$(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
+html:
+	guix environment -l guix.scm -- haunt build
 
 serve:
-	./bin/paster serve paste.ini
-
-devserver:
-	$(BASEDIR)/develop_server.sh restart
-
-stopserver:
-	kill -9 `cat pelican.pid`
-	kill -9 `cat srv.pid`
-	@echo 'Stopped Pelican and SimpleHTTPServer processes running in background.'
+	guix environment -l guix.scm -- haunt serve --watch
 
 upload: html
-	ssh $(SSH_USER)@$(SSH_HOST) "cd $(SSH_GIT_DIR) && git pull && git reset --hard origin/master && make html"
+	rsync --delete --recursive --verbose \
+	   site/ dustycloud:/srv/dustycloud/git_checkout/output
 
-css:
-	@echo "/* Generated via pygmentize */\n" > ./static/css/pygments.css
-	./bin/pygmentize -S fruity -f html >> static/css/pygments.css
+serve-any: html
+	guix environment -l guix.scm -- haunt serve --watch --host=any
 
-.PHONY: html help clean regenerate serve devserver publish upload
+.PHONY: html serve upload serve-any

+ 3 - 0
dustycloud/templates.scm

@@ -53,6 +53,9 @@
                (type "text/css")
                (href "/etc/css/base.css")
                (title "default")))
+      (link (@ (rel "stylesheet")
+               (type "text/css")
+               (href "/etc/css/code.css")))
       (script (@ (type "text/javascript")
                  (src "/etc/js/resize.js")))
       ;; atom feed

+ 27 - 0
static/css/base.css

@@ -453,3 +453,30 @@ div.pagination {
     padding-left: 30px;
     padding-right: 30px;
 }
+
+
+div.code {
+    border-radius: 5px;
+    border: 3px solid #110e13;
+    background: #110e13;
+    color: #d3ccdc;
+    padding: 20px;
+    margin: 20px;
+    overflow: hidden;
+    white-space: pre;
+    font-family: 'Inconsolata', monospace;
+}
+
+pre {
+    border-radius: 5px;
+    border: 3px solid #110e13;
+    background: #110e13;
+    color: #d3ccdc;
+    padding: 20px;
+    margin: 20px;
+    font-family: 'Inconsolata', monospace;
+    overflow: scroll;
+    font-size: 125%;
+    line-height: 1.1;
+}
+

+ 33 - 0
static/css/code.css

@@ -0,0 +1,33 @@
+/* Syntax highlighting code, by David Thompson, borrowed
+   from:
+     https://git.dthompson.us/blog.git/blob_plain/refs/heads/haunt-migration:/css/dthompson.css
+   David Thompson gives permission for this to be GPLv3+ and CC BY-SA 4.0
+
+   Modified significantly since.
+*/
+
+
+.syntax-special, .syntax-element {
+    color: #8e6da6;
+    font-weight: bold;
+}
+
+.syntax-symbol {
+    color: #e0ceed;
+}
+
+.syntax-string {
+    color: #95e454;
+}
+
+.syntax-keyword, .syntax-attribute {
+    color: #e5786d;
+}
+
+.syntax-comment {
+    color: #999;
+}
+
+.syntax-open, .syntax-close {
+    color: #00768b;
+}

+ 0 - 77
static/css/pygments.css

@@ -1,77 +0,0 @@
-.highlight .hll { background-color: #ffffcc }
-.highlight  { background: #f8f8f8; }
-.highlight .c { color: #8f5902; font-style: italic } /* Comment */
-.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */
-.highlight .g { color: #000000 } /* Generic */
-.highlight .k { color: #204a87; font-weight: bold } /* Keyword */
-.highlight .l { color: #000000 } /* Literal */
-.highlight .n { color: #000000 } /* Name */
-.highlight .o { color: #ce5c00; font-weight: bold } /* Operator */
-.highlight .x { color: #000000 } /* Other */
-.highlight .p { color: #000000; font-weight: bold } /* Punctuation */
-.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */
-.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */
-.highlight .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */
-.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */
-.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */
-.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */
-.highlight .gd { color: #a40000 } /* Generic.Deleted */
-.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */
-.highlight .gr { color: #ef2929 } /* Generic.Error */
-.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
-.highlight .gi { color: #00A000 } /* Generic.Inserted */
-.highlight .go { color: #000000; font-style: italic } /* Generic.Output */
-.highlight .gp { color: #8f5902 } /* Generic.Prompt */
-.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */
-.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
-.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */
-.highlight .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */
-.highlight .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */
-.highlight .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */
-.highlight .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */
-.highlight .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */
-.highlight .kt { color: #204a87; font-weight: bold } /* Keyword.Type */
-.highlight .ld { color: #000000 } /* Literal.Date */
-.highlight .m { color: #0000cf; font-weight: bold } /* Literal.Number */
-.highlight .s { color: #4e9a06 } /* Literal.String */
-.highlight .na { color: #c4a000 } /* Name.Attribute */
-.highlight .nb { color: #204a87 } /* Name.Builtin */
-.highlight .nc { color: #000000 } /* Name.Class */
-.highlight .no { color: #000000 } /* Name.Constant */
-.highlight .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */
-.highlight .ni { color: #ce5c00 } /* Name.Entity */
-.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */
-.highlight .nf { color: #000000 } /* Name.Function */
-.highlight .nl { color: #f57900 } /* Name.Label */
-.highlight .nn { color: #000000 } /* Name.Namespace */
-.highlight .nx { color: #000000 } /* Name.Other */
-.highlight .py { color: #000000 } /* Name.Property */
-.highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */
-.highlight .nv { color: #000000 } /* Name.Variable */
-.highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */
-.highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */
-.highlight .mb { color: #0000cf; font-weight: bold } /* Literal.Number.Bin */
-.highlight .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */
-.highlight .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */
-.highlight .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */
-.highlight .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */
-.highlight .sa { color: #4e9a06 } /* Literal.String.Affix */
-.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */
-.highlight .sc { color: #4e9a06 } /* Literal.String.Char */
-.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */
-.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */
-.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */
-.highlight .se { color: #4e9a06 } /* Literal.String.Escape */
-.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */
-.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */
-.highlight .sx { color: #4e9a06 } /* Literal.String.Other */
-.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */
-.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */
-.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */
-.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */
-.highlight .fm { color: #000000 } /* Name.Function.Magic */
-.highlight .vc { color: #000000 } /* Name.Variable.Class */
-.highlight .vg { color: #000000 } /* Name.Variable.Global */
-.highlight .vi { color: #000000 } /* Name.Variable.Instance */
-.highlight .vm { color: #000000 } /* Name.Variable.Magic */
-.highlight .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */