okay okay excellent sorry okay so
uh hello everyone um and um
uh nice meeting you and let me
thank the the organizer for all the
organization and all the work they are
doing to support us
my name is adolfo villaferita
I'm teaching at the university of
trenton I'm also
work will shortly be working at
shared.tech which is a comp
a non-profit organization developing an
applications to
[Music]
recover surplus food but the the
reason of the talk today and the reason
I'm here today
is to talk about my experience in moving
from jekyll uh
static website generator to org mode and
the reason
I move to work mode is to have better
support for
literary programming on the websites
at the university of trento where we
make available the content for the
the students okay so
first of all what is a static website
generator it is basically a tool which
allows you to
generate html files out of text files
containing basically two types of
information metadata
and content metadata is let's say a
set of key pairs describing the the
content of the file such as the title
author
tags and so on and so forth and the
content is what you actually want to to
get published on the on the internet in
the html file
and usually the content is written in
some kind of
markup language such as markdown or
possibly
org mode and well jackie is a very
popular website uh
a static website generator it is written
in a ruby
and what it does it it it systematically
let's say transforms all the input files
by making the content into
html and systematically applying a
template in order to generate the
html files which you can then deploy
on your server of choice to make them
available on the on the internet
and one of the features uh most
well I would say all static website
generators have
is a debt of being able to let's say
collect the metadata information
uh of the files being part of your of
your project
and the reason they do that is because
you sometimes want to generate pages
based on the content
of your um of your projects
such as for instance the the list of
posts you have recently published or
maybe the list of tags
uh you uh have defined for your post and
so on and so forth so so
dracula gives the possibility of
generating this kind of dynamic
content by using liquid which is a
templating language which
looks like these
so basically you you have all the
constructs you can
expect in a programming language this
for instance
is a fourth cycle which
iterates over all the post or the
files in a specific directory of the
jacket project
and for each post it takes the the title
and the url and generates a link
okay so dracule is
nice and sweet but over the years
I started using more and more
systematically
or mode to write all my files and I
moved from markdown to word mode I am a
long time Emacs user so I've been using
imax for 30 years now so
or mode is a more recent discovery
but it is a very nice uh let's say
discovery I
I made and the reason I like org mode
is because for instance you can write
formulas using
mac jacks and you can generate diagrams
or plots with new plots and
also important is the fact that you have
the possibility of let's say publishing
your documents
to multiple ends backhands such as pdf
or
maybe a review presentations or
or html and this is all made possible
by bubble which is
exactly what we just saw in the the
previous talk
namely the possibility of executing a
snippet of code
embedded in in your pages
um and our model can also be used
within let's say jackie and in fact
there is a
a nice gem a nice library called jackie
org which allows you to use org modifies
directly
into jekyll but when you start using
org mode when I started using
mode I realized I could move
all my workflow to or my publishing
workflow to image
and and and in fact
org mode is also static website
generator because
it has got the possibility of publishing
um projects made of org mode files
and one of the nice things about let's
say that the publishing features of work
mode
is that it allows you to define in the
org publish
project a list of the components
which are part of your project and in a
sense it is
also more flexible than jackie lee's
because it also allows you for instance
to
let's say publish a single file rather
than having to recompile everything
every time you want to publish your
your project to your website however
there are some short comments I would
say or some some
areas of improvement improvement let me
say
the first is that let's say support for
templating
is not so obvious as it is let's say
in jackie or even though there are some
let's say
nice extensions such as argo t html
for instance which allows you to use
templates and
more important to me was the fact that
apparently there is little support for
the creation of dynamic
content so I was very curious and very
keen to use
or mode for let's say publishing my blog
and my the the courses at the university
but then uh I had to find a way
to let's say being able to publish these
dynamic pages finding some kind of
replacement so to speak for uh the
liquid
the liquid engine and and the solution
was
that at hand actually because
basically I realized I could use bubble
for exactly this purpose so rather than
using bubble for generating
plots or let's say my other computation
or whatever I was using them for
I realized they could use bubble to
generate
html which could be let's say
uh then published uh uh
in the project so uh so all I needed to
do then
was defining some kind of functions some
kind of code in order to read
all the org mode uh the metadata of all
the
opmod files of my web project so that
I could let's say then publish uh
generate the dynamic content and
this is a snippet taken from
one of my html projects
which basically shows the way in which
I generate the um the list of posts on
my on my page it is uh
exactly how the the liquid that we saw
in a couple of a couple of slides
earlier that looks like
uh in inner mode
and basically what I'm doing I'm using I
wrote a ruby script which
reads all the metadata so this uh
highlighted code
basically loads the script which is
stored
externally and then it collects all the
metadata from the
org mode files in the current uh in the
current directory
and then the the following the the code
you can see here
basically iterate over all the
past red the at the previous step
and it generates um
a list with the title and uh
and the urls and so basically
replicating what jackie does so
okay so there are some some other things
I have to to deal with in order to let's
say
accommodate my workflow and but that was
relatively easy in the sense that one of
the
uh problem one of the issue I had to
solve was that of let's say having
a common navigation on all my
pages uh but that was easily solved
using
uh the include feature so I basically
made available
and include with all the navigation
which is uh embedded in all the pages of
my websites
uh through the could include and another
nice feature which
jackie las is the possibility of
previewing
a website before deploying it and but
then
Emacs also has got a node which allows
you to
launch a web server and in fact
I wrote a quick ack
which allows you to which allows to
basically
invoke a node on a on our
mode project and start a local preview
and then use rsync
in order to deploy the the website
um
five minutes left okay okay more than
enough okay
thanks thank you thank you very much I'm
nearly done so then I can take some some
questions
so okay just to give you maybe
a slightly more in-depth uh
view of what the pages look like so
these are
one of the pages or the source files
of one of the websites it is
in literate programming so basically uh
you see there is some metadata here I
mean this is a regular old mod file
and this part here
basically defines some common options
for publication
and these two includes here
put some extra html in the head part and
the navigation and here as you can see
is the code generating the
the list in chronological order it is
slightly more complex than the example I
made in the slide
because uh there is some more
elaboration to
uh to do including putting some
javascript to identify
according to let's say the the tags
so to go back to the to the presentation
um so the okay so
I I managed this migration uh a few
months ago
and then uh all my workflow is within
with old mode and within imax and um
I'm very happy with it because it's
simplified
uh quite a bit let's say my public
publication process
and uh one of the advantages so another
advantage so the first advantage is that
everything is in ork mode and dmax
second advantage
is that everything is based on the
standard machinery provided by orb mode
so in a sense it is kind of let's say
more robust with respect to
dependencies and possible errors and so
on and so forth
and um and the fact that the old mode
allows you to publish
a single file in a project is is also
very interesting because
it allows to let's say be more robust to
problems you might introduce when
you're changing when I'm changing the
setup
and another interesting thing which I
realized that I
uh I could have is that
in a sense the specification of the
website
is uh can be embedded in the website
itself
so in a sense this is some kind of let's
say self
the command it's a real set documenting
uh what I'm actually doing so for
instance
uh here on my
website you can see let's say the
specification of the
of the of the project which is uh loaded
from my
initialization file but then it is also
published
together with my home page and it leaves
with the repository where
I keep all the sources of my website
which is kind of nice because it
basically isolates
everything in a single in a single place
okay so there are some examples I'm
showing them
more because of the let's say source
code which
you can grab from the git repositories
if you are
interested of course I'm also available
to provide some
support and help if you are interested
in this kind of stuff
the the next step for me will be that of
let's say trying
making this kind of machinery available
for more general use at the moment
if you are interested in trying out my
suggestion is let's say grabbing the
sources
or one of the let's say websites to see
what how they look like and maybe try
and
customize it for your purposes
and this is basically the content of my
talk so
I'm open to two questions and thank you
for
your attention you are now unmuted uh
thank you very much adolfo for your
awesome presentation
um I think we have time for maybe like
one or two questions
um and then the rest maybe you could
take up um
after the stream after sure
uh I we should do um would you like me
to read you the questions
uh yeah probably better because
I kind of lost there okay no problem um
okay so someone asks do you have any
opinion on fern
fan I I don't know fans
so I'll give it a try and uh and uh
and check it out okay
thanks and um people are also asking do
you discuss this for example in a blog
or anywhere else they could find more
about it
oh yes I'm going to publish the let's
say the talk and the content on the
on my website and then I'll link it from
the max conf
conference so that it will be easier for
people to
to reach it so I will shortly make it
available right after the conference
wonderful and I think that's all for the
questions
thank you very much okay thank you very
much thank you
and cheers bye cheers bye