Compare commits

..

No commits in common. "06b5d1b50c6c218921ebe2f0c5fb1b7974e498d8" and "2f3c52f5f26144565c876d18a8c6de6bb95a3341" have entirely different histories.

2 changed files with 4 additions and 18 deletions

View File

@ -1,12 +0,0 @@
# Codigo para llevar's generator
This is the static site generator used to build [Codigo Para Llevar](https://codigoparallevar.com/) (my personal site). It contains:
- A markdown blog (with content ported from acrylamid). Saved as `/blog/`.
- A set of org-mode based notes. Saved as `/notes/`.
It also copies over some static assets (css, js, fonts).
The scripts are hardcoded with the hostnames and paths for my own site, so you might want to update them.
General documentation is in progress and might be replaced little by little by the more interactive [org-web-editor](https://code.codigoparallevar.com/kenkeiras/org-web-editor) once that one (1) supports all the features here and (2) has support for building static sites.

View File

@ -109,9 +109,7 @@ def load_all(top_dir_relative):
path = os.path.join(root, name)
try:
doc = load_org(open(path),
environment={"org-todo-keywords": "TODO(t) NEXT(n) MEETING(m/!) Q(q) PAUSED(p!/!) EVENT(e/!) SOMETIME(s) WAITING(w@/!) TRACK(r/!) | DISCARDED(x@/!) VALIDATING(v!/!) DONE(d!/!)"},
extra_cautious=True)
doc = load_org(open(path), extra_cautious=True)
docs.append(doc)
except Exception as err:
import traceback
@ -476,7 +474,7 @@ def render_block(content, acc, _class, is_code):
acc.append('</pre>')
def unindent(content):
base_indentation = min([0] + [
base_indentation = min([
len(l) - len(l.lstrip(' '))
for l in content.split('\n')
if len(l.strip()) > 0
@ -738,10 +736,10 @@ def render(headline, doc, graph, headlineLevel, doc_to_headline_remapping):
content.append(render(child, doc, headlineLevel=headlineLevel+1, graph=graph,
doc_to_headline_remapping=doc_to_headline_remapping))
if headline.state is None or headline.state.get('name') is None:
if headline.state is None:
state = ""
else:
state = f'<span class="state todo-{headline.is_todo} state-{headline.state["name"]}">{headline.state["name"]}</span>'
state = f'<span class="state todo-{headline.is_todo} state-{headline.state}">{headline.state}</span>'
if headline.is_todo:
todo_state = "todo"