-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatom.xml
More file actions
1642 lines (1401 loc) · 98.5 KB
/
Copy pathatom.xml
File metadata and controls
1642 lines (1401 loc) · 98.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Gorg Negre: Astro-Turisme Rural</title>
<link href="http://www.gorgnegre.com/atom.xml" rel="self"/>
<link href="http://www.gorgnegre.com/"/>
<updated>2012-09-30T14:55:10+02:00</updated>
<id>http://www.gorgnegre.com/</id>
<author>
<name>Gorg Negre: Astro-Turisme Rural</name>
<email>info@gorgnegre.cat</email>
</author>
<entry>
<title>Presidentials in Catalonia (2012-11-25)</title>
<link href="http://www.gorgnegre.com/Philosophy/Politics/Presidentials-in-Catalonia-2012-11-25.html"/>
<updated>2012-09-27T00:00:00+02:00</updated>
<id>http://www.gorgnegre.com/Philosophy/Politics/Presidentials-in-Catalonia-2012-11-25</id>
<content type="html"><p>
Catalan people have been called by the Parliament to Presidential
Elections, scheduled for the last Sunday of November. Some insights
follow.
</p>
<p>
Catalonia is living days of hope and excitement about the possibility of
improving their political balance within Spain. For the second time since
2010, over a million Catalans have demonstrated in Barcelona claiming
for their own state. On September 11 2012 one and a half million people
marched <a href="http://youtu.be/_xFDj27y_xE">peacefully</a> and <a href="http://www.flickr.com/photos/assemblea/sets/72157631523400718/">festively</a> for a few hours under the slogan:
"Catalonia, a new state of Europe".
</p>
<p>
The news is this time the President of Catalonia, MH Artur Mas, has
taken on the popular claim and has offered to lead the process of
building new <a href="http://www.youtube.com/watch?v=V4oFEXWCmlc">"structures of state"</a> to better suit the long-standing
political pursuits of the Catalan people. Following the ongoing open
debate in the streets of Barcelona over the construction of a new state,
presidential parliamentary elections have been called for 25/N.
</p>
<p>
Before its dissolution, the current Catalan Parliament has agreed by 2/3
of the parliamentarians to summon the yet-unelected next Government to
organise a self-determination referendum over the next few years —which
is something that Spain strongly opposes and would not allow. It's the
right to self-determination that centres the Catalan campaign, and there
is the spread willingness that all civil institutions (and particularly
political parties) should take a clear stand regarding their support to
a self-determination referendum.
</p>
<p>
From the standpoint of a liberal democracy, after the public display of
civic power in Barcelona (the demonstration gathered about 1/5 of the
country's population), it seems fitting that the Parliament agrees to
extend to the next-to-be president of Catalonia an invitation to work
towards auto-determination. But that view is not shared in Madrid. The
biggest Spanish political forces both in the government (PP, Mariano
Rajoy) and in the opposition (PSOE) have joined efforts to oppose the
Catalan self-determination referendum. Their view is that the Spanish
Constitution sets that it is Spain which is a sovereign estate, and it's
their understanding that in use of this sovereignty all Spaniards
should have a vote in the event of such a self-determination referendum
in Catalonia (provided that they allowed such referendum, which
neither PP nor PSOE seem willing to, anyway).
</p>
<p>
Catalans won't understand why should any club member depend on the views
of other members in order to withdraw from the club. As a husband does
not need his wife's agreement to file a divorce. On the other hand,
Castilians have never understood Catalans as fellow club members but as
subordinates due to right of conquest (1714-09-11). At this time and
age! (An attempt to such a democratic amputation had not been seen in
Spain since the outlaw of Herri Batasuna in the Basque Country in the
mid-nineties. And then, that was justified by the war on terrorism.)
In this setting, the President of Catalonia has proved a brilliant
tactician. Pressed by Generalitat's drastic dire straits, Mr. Mas <a href="http://www.youtube.com/watch?v=V4oFEXWCmlc">has put himself</a> in front of the civic movement with solemnity, authority and
wit, setting the tempo of the current events. I had not enjoyed so much
of a politician since the speeches of our first Obama.
</p>
<p>
May no-one be abandoned.
</p>
<p><br/><br/>
<!-- hhmts start --> <!-- hhmts end --></p>
</content>
</entry>
<entry>
<title>Public Encryption Key</title>
<link href="http://www.gorgnegre.com/linux/public-encryption-key.html"/>
<updated>2012-08-19T00:00:00+02:00</updated>
<id>http://www.gorgnegre.com/linux/public-encryption-key</id>
<content type="html"><p>Our public encryption key can be used with common encryption tools
such as <code>PGP</code> and <code>GnuPG</code> to encrypt messages for
us if you have need of sending us sensitive information. You can also
use our public key to check the integrity and true authorship of the
(signed) emails we send to you. This public key is provided below and
can be directly downloaded <a
href="/files/gorgnegre-pgp-pubkey.txt">here</a> or from public
keyservers such as <a
href="http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x463D2E8598B633FC">pgp.mit.edu/</a>.</p>
<ul>
<li>Key ID: <code>98B633FC</code>
</li>
<li>Fingerprint: <code>248D B1B7 A38A C39E 41AA F304 463D 2E85 98B6 33FC</code>
</li>
<li>Expires: 2015-01-01
</li>
</ul>
<pre class="example"><div class="highlight"><pre><code class="text">-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.10 (GNU/Linux)
mQENBE7vjlEBCADDxWs7qRBE3sx6hisjV762FmO+LEVLzp+cMesNGAh8AA+JaSrd
jmErmFBVJxybOh5JIiqfUFz0B+UwpZVhpXlOuqOJCcjKBnW1dwaY1598b5iXZxMM
/t/jFjpt7d/9BqOlKRaA5dT03lcKoK3O+FO1pDj+EyxVBvPsWa335SFlTxSE+J48
H3XBT+cJ0hyB7fOFJ9FYrNiJQFLW9MplyKzTeAlVPE++zP5nRNI/CUh5xZF7DXUU
7dQib/nx/1fxIlqsQehy68gMiukfQ6N4oxwr+tc/ZfK8p1baWtM/KTo6knn6LLSj
Qho2XGI07qcRt3db7ugosstPb8w0JATqYL1DABEBAAG0MkdvcmcgTmVncmUgKEFz
dHJvbm9taWEgUnVyYWwpIDxpbmZvQGdvcmduZWdyZS5jb20+iQE+BBMBAgAoBQJQ
MQxIAhsDBQkFtPGfBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRBGPS6FmLYz
/DLqCAC0taiEFmQE/LBGdOh4GhFJcOEr5Ea31R4T00HaPrGvcrXfHd8LR+67SbTT
uP3DrAlwexJg+te6mqI07I3z1rtl36HNpLsnmNEINmCDG1le/Dj/LMsMd288nD1d
4qFv2rpGJK8MnNSV3X0UynkiigCwcZCDXkKN0smPQW3utRp8H6PDdpNGXkjBmqPQ
OfLcHbV9FjF45dyMBmffwjzzLR0S8mUjqyqlLYA6THDmVxLgTQeBm8XERE18XYzA
795fvVUqfJe1UIL0mjYl9JRbCMDhmyz2U5yaKbAhkbOIBJETOfoJpEnzQQjmA88C
KFw2p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H7LN9tTd7f1dvjq1OskQzYKdrUvGfKvA4GEx2wz4ehLLA7KAN7Vfm
DE9SJfhUNx6C5lTv27RO7S7bkeJdNAL+vBCHSXkKprUEkMdo+/IQCeOSQHVfG07O
a2K9bEIVqvRmG9FuCWoylSTcFFgxvMHlMrrpmOPwqwNMnG6pFQo4UfjRY8RRYnsQ
gpbCYrDhVYIc45VI0qv91bCQmcgsyTpVBAPaN/GvLmJTHG80zkAqcpOgeIQm5pQT
II+qY2RcwBWe3hX+ZkrFaNDedjPkiagUJogcUBuCaUC76h68XsnKY1PQJDObpycH
sUVGqnWQlQ==
=SWI1
-----END PGP PUBLIC KEY BLOCK-----
</code></pre>
</div>
</pre>
<p>
If you need some help getting OpenPGP-compliant encryption software set
up, and learning how to use it, these two links lead to complementary
resources: one is a quick set of instructions, and the other is a IT
security article that gives a beginner's overview of GnuPG:
</p><ul>
<li><a href="http://arc.apotheon.org/cheats/gpg_quick.html">GnuPG Quickstart/Howto</a>
</li>
<li><a href="http://blogs.techrepublic.com.com/security/?p=405">Using OpenPGP on Unix/Linux systems with GnuPG</a>
</li>
</ul>
<p><br/><br/>
<!-- hhmts start --> <!-- hhmts end --></p>
</content>
</entry>
<entry>
<title>Tree Command as a Sitemap Generator</title>
<link href="http://www.gorgnegre.com/linux/tree-command-as-a-sitemap-generator.html"/>
<updated>2012-07-22T00:00:00+02:00</updated>
<id>http://www.gorgnegre.com/linux/tree-command-as-a-sitemap-generator</id>
<content type="html"><p>
This short article shows a simple use of the venerable <code>tree</code> command to
produce a clickable html sitemap of a static website for humans.
</p>
<p>As I actually begin to populate this website, I am using
<code>tree</code> as a quick hack to generate <a href="/files/pages/sitemap.html">its
sitemap</a>. You can achieve better looks by playing a bit with CSS.
</p>
<pre class="example"><div class="highlight"><pre><code class="bash"><span class="o">[</span>astro@gorgnegre:/var/www/rootdir/<span class="o">]</span>% tree --dirsfirst -a <span class="se">\</span>
-T <span class="s2">&quot;Sitemap for www.gorgnegre.com&quot;</span> -P <span class="s2">&quot;*html&quot;</span> <span class="se">\</span>
-I <span class="s2">&quot;files|tasks&quot;</span> -C -H <span class="s2">&quot;http://www.gorgnegre.com&quot;</span> <span class="se">\</span>
--charset UTF-8 -o files/pages/sitemap.html
</code></pre>
</div>
</pre>
<ul>
<li>This command is executed from the root directory of the web site. The
options used are:
<dl>
<dt><code>--dirsfirst</code></dt><dd>as the name implies, list directories before files
on the same hierarchy
</dd>
<dt><code>-a</code></dt><dd>list all, including hidden files.
</dd>
<dt><code>-T</code> title</dt><dd>sets the title and H1 header string (in HTML output mode).
</dd>
<dt><code>-P</code> pattern</dt><dd>list only those files that match the wild-card
pattern. In our example above, I decided to list only
the html files of my website so visitors can jump to
an actual webpage when they click on an item of the
sitemap.
</dd>
<dt><code>-I</code> pattern</dt><dd>do not list those files that match the wild-card
pattern. In my example, I exclude all files in the
<code>files</code> and <code>tasks</code> subdirectories in my webserver
rootdir.
</dd>
<dt><code>-C</code></dt><dd>Colourise output. Needed if you wish to use colours via CCS
stylesheet.
</dd>
<dt><code>-H</code> <i>baseHREF</i></dt><dd>turn on HTML output. <i>baseHREF</i> gives the base
location.
</dd>
<dt><code>--charset</code></dt><dd>set the character set to use.
</dd>
<dt><code>-o</code> <i>filename</i></dt><dd>output to <i>filename</i>.
</dd>
</dl>
</li>
</ul>
<pre class="example"><div class="highlight"><pre><code class="text"> Sitemap for www.gorgnegre.com
http://www.gorgnegre.com
├── linux/
│ └── using-emacs-orgmode-to-blog-with-jekyll.html
├── sitemap/
│ └── index.html
├── 404.html
├── archives.html
└── index.html
</code></pre>
</div>
</pre>
<p><br/><br/>
<!-- hhmts start --> <!-- hhmts end --></p>
</content>
</entry>
<entry>
<title>Blogging with Emacs Org-mode and Jekyll</title>
<link href="http://www.gorgnegre.com/linux/using-emacs-orgmode-to-blog-with-jekyll.html"/>
<updated>2012-07-17T00:00:00+02:00</updated>
<id>http://www.gorgnegre.com/linux/using-emacs-orgmode-to-blog-with-jekyll</id>
<content type="html"><p>
This article shows how to set up the combo <a href="http://www.gnu.org/software/emacs/">Emacs</a> <a href="http://org-mode.org">Org-mode</a> &amp; <a href="https://github.com/mojombo/jekyll/">Jekyll</a> in
order to publish a static website or blog. Our purpose is to edit simple
<code>filename.org</code> files, let Org-mode export to html, and have Jekyll
publish them (or just fragments via tags) to a static website (maybe
hosted at <a href="http://www.github.com">github</a>). Essentially, we are using org to produce everything
between the <code>&lt;body&gt;</code> tags on the page and Jekyll to produce the rest
—note that you can easily embed html content in your org pages using the
<code>#+BEGIN_HTML</code> tag.
</p>
<p>
This setup encourages an efficient workflow. Org-mode is very
convenient for all-around editing, from simple note taking (with the
excellent <code>org-capture</code>) to managing one's tasks (it's easy to set up a
getting-things-done system) to writing fully-fledged articles (which can
later be exported to <a href="http://www.latex-project.org/">LaTeX</a>, for instance). Hence it feels just natural
to write one's ramblings in org-mode. Jekyll, on the other hand, is a
lightweight static website generator. By feeding it with org's output,
we achieve a simple way of deploying a website which can be served by
almost any web server without requiring additional components such as
php. With some customisation, the workflow becomes highly automated.
</p>
<p>
After several years using the excellent <a href="http://www.foswiki.org">Foswiki</a> twiki based system and
<a href="http://drupal.org">Drupal</a> CMS, I have moved to using a static site generated with
Jekyll. Since the site is maintained just by myself, I didn't really
need the collaborative features of a wiki, nor the hassle of a mysql
database (and certainly, not my web logs filling up with bots trying to
post stuff to my webs —even though all edits required authorisation).
Properly organised text files is what I'm after. Also Jekyll makes it
easy for me to write using Emacs Org-mode while maintaining my site
under version control using <a href="http://git-scm.com/">Git</a>.
</p>
<p class="note">You can clone a repository with the setup outlined in this article from
<a href="https://github.com/gorgnegre/org-jekyll">https://github.com/gorgnegre/org-jekyll</a>.</p>
<div id="outline-container-1" class="outline-3">
<h3 id="sec-1"></h3>
<div class="outline-text-3" id="text-1">
</div>
<div id="outline-container-1-1" class="outline-4">
<h4 id="sec-1-1">References</h4>
<div class="outline-text-4" id="text-1-1">
<p>This document blends content found in these other sites:
</p><ol>
<li>The excellent Ian Barton's <a href="http://orgmode.org/worg/org-tutorials/org-jekyll.html">Org-Jekyll site</a>.
</li>
<li>The excellent Juan Reyero's <a href="http://juanreyero.com/open/org-jekyll/">Org-Jekyll site</a>. [Not yet implemented here.]
</li>
<li>The convenient Metajack's <a href="http://metajack.im/2009/01/02/manage-jekyll-from-emacs/">Emacs-Jekyll hack</a>.
</li>
<li>Justin Lilly's succint <a href="http://justinlilly.com/emacs/orgmode_static_site_generator.html">org publishing page</a>.
</li>
</ol>
</div>
</div>
</div>
<div id="outline-container-2" class="outline-3">
<h3 id="sec-2">From Org-mode to Jekyll</h3>
<div class="outline-text-3" id="text-2">
<p>
Our starting point assumes that you have your org-mode properly setup
and that you know how to use it (particularly, <a href="http://orgmode.org/guide/Publishing.html">org publishing</a>). Also,
that Jekyll is <a href="https://github.com/mojombo/jekyll/wiki/install">installed</a> and that you have a fair idea of its workings
(particularly the use of <a href="https://github.com/mojombo/jekyll/wiki/YAML-Front-Matter">YAML Front Matter</a> data and the <a href="https://github.com/shopify/liquid/wiki/liquid-for-designers">Liquid templating system</a>).
</p>
</div>
</div>
<div id="outline-container-3" class="outline-3">
<h3 id="sec-3">Basic Directory Structure</h3>
<div class="outline-text-3" id="text-3">
<p>
As you may then know from <a href="https://github.com/mojombo/jekyll/wiki/usage">its usage page</a>, Jekyll expects a certain
directory structure, so we will use the following hierarchy:
</p>
<pre class="example"><div class="highlight"><pre><code class="bash"><span class="o">[</span>astro@gorgnegre<span class="o">]</span>% tree org-jekyll/
org-jekyll/
├── org/
│ ├── _config.yml
│ ├── _drafts/
│ │ ├── horse-riding+explore-the-cosmos.org
│ │ └── spend-some-holidays-at-gorgnegre.org
│ ├── files/
│ │ ├── css/
│ │ │ └── screen.css
│ │ └── images/
│ │ └── gorgnegre-logo.png
│ ├── _includes/
│ │ └── header.html
│ ├── index.org
│ ├── _layouts/
│ │ ├── base.html
│ │ └── post.html
│ └── _posts/
│ └── 2012-07-17-using-emacs-orgmode-to-blog-with-jekyll.org
├── org-jekyll.el
├── README.org
└── rootdir/
</code></pre>
</div>
</pre>
<p>
Things to note:
</p><ol>
<li>Jekyll only requires the directory structure inside the
<code>org-jekyll/org/</code> subdirectory. By putting this structure inside
<code>org-jekyll/org/</code> we have all the sources of our website as one org
project.
</li>
<li>Org will publish this <code>org-jekyll/org/</code> project to
<code>org-jekyll/rootdir</code>. In the process, all <code>*.org</code> files will be
exported to <code>.html</code>; the rest will simply be copied over. We will
then run jekyll on <code>org-jekyll/rootdir</code>, which will create a
<code>org-jekyll/rootdir/_site</code> directory ready to be copied to our
webserver.
</li>
<li><code>org-jekyll/org/_drafts</code> will store our post drafts. When
sufficiently polished, we will move them to <code>org-jekyll/org/_posts</code>.
This workflow will be <a href="#sec-6">automatised</a>. Note that <code>_drafts</code> files won't be
processed by jekyll since <code>_drafts</code> is not a special jekyll directory (as
opposed to <code>_posts</code>, which it is) and then jekyll ignores
directory/file names starting with an underscore (or a dot).
</li>
<li><code>org-jekyll/org-jekyll.el</code> is the file we will be discussing in the
next section.
</li>
</ol>
</div>
</div>
<div id="outline-container-4" class="outline-3">
<h3 id="sec-4">Org-mode Publishing Configuration</h3>
<div class="outline-text-3" id="text-4">
<p>So next, let's tell org-mode how we want the export. By default org
produces complete web pages. However, as Jekyll will parse files with
<a href="https://github.com/mojombo/jekyll/wiki/YAML-Front-Matter">YAML Front Matter</a> data (which allows you to specify some predefined
variables in your page) using the <a href="https://github.com/shopify/liquid/wiki/liquid-for-designers">Liquid templating system</a> (which allows
you to create default templates to be used site wide), we are only
interested in the section of the page between the &lt;body&gt; tags, as Jekyll
produces the rest. Most things in org are configurable and it's possible
to tell org to export only the bits of the page between the <code>&lt;body&gt;</code>
tags. So we will open (or <a href="https://github.com/gorgnegre/org-jekyll/org-jekyll.el">download</a>) a <code>org-jekyll.el</code> configuration
file, place it somewhere where emacs can read it at start-up, and add
the following code (you could also put the code in your <code>init.el</code> file,
if you prefer):
</p>
<pre class="example"><div class="highlight"><pre><code class="cl"><span class="lineno"> 1</span> <span class="c1">;;; Emacs org-mode support for blogging with Jekyll.</span>
<span class="lineno"> 2</span> <span class="c1">;;;</span>
<span class="lineno"> 3</span> <span class="c1">;;; To use, just put this file somewhere in your emacs load path and</span>
<span class="lineno"> 4</span> <span class="c1">;;; (require &#39;org-jekyll)</span>
<span class="lineno"> 5</span> <span class="c1">;;;</span>
<span class="lineno"> 6</span> <span class="c1">;;; An article showing its use can be found at:</span>
<span class="lineno"> 7</span> <span class="c1">;;; - http://www.gorgnegre.com/linux/using-emacs-orgmode-to-blog-with-jekyll.html</span>
<span class="lineno"> 8</span> <span class="c1">;;;</span>
<span class="lineno"> 9</span> <span class="c1">;;; Adapted from</span>
<span class="lineno">10</span> <span class="c1">;;; - http://orgmode.org/worg/org-tutorials/org-jekyll.html</span>
<span class="lineno">11</span> <span class="c1">;;; - https://github.com/metajack/jekyll/blob/master/emacs/jekyll.el</span>
<span class="lineno">12</span> <span class="c1">;;;</span>
<span class="lineno">13</span> <span class="c1">;;; Gorg Negre 2012-07-05</span>
<span class="lineno">14</span>
<span class="lineno">15</span> <span class="p">(</span><span class="nb">provide</span> <span class="ss">&#39;org-jekyll</span><span class="p">)</span>
<span class="lineno">16</span>
<span class="lineno">17</span> <span class="c1">;; Define our org project to be exported. Run &quot;M-x org-export X mvm&quot; to</span>
<span class="lineno">18</span> <span class="c1">;; export.</span>
<span class="lineno">19</span> <span class="p">(</span><span class="k">setq</span> <span class="nv">org-publish-project-alist</span>
<span class="lineno">20</span> <span class="o">&#39;</span><span class="p">(</span>
<span class="lineno">21</span>
<span class="lineno">22</span> <span class="p">(</span><span class="s">&quot;org-mvm&quot;</span>
<span class="lineno">23</span> <span class="ss">:base-directory</span> <span class="s">&quot;~/org-jekyll/org/&quot;</span> <span class="c1">;; Path to your org files.</span>
<span class="lineno">24</span> <span class="ss">:base-extension</span> <span class="s">&quot;org&quot;</span>
<span class="lineno">25</span> <span class="ss">:publishing-directory</span> <span class="s">&quot;~/org-jekyll/rootdir/&quot;</span> <span class="c1">;; Path to your Jekyll project.</span>
<span class="lineno">26</span> <span class="ss">:recursive</span> <span class="no">t</span>
<span class="lineno">27</span> <span class="ss">:publishing-function</span> <span class="nv">org-publish-org-to-html</span>
<span class="lineno">28</span> <span class="ss">:headline-levels</span> <span class="mi">6</span>
<span class="lineno">29</span> <span class="ss">:html-extension</span> <span class="s">&quot;html&quot;</span>
<span class="lineno">30</span> <span class="ss">:body-only</span> <span class="no">t</span> <span class="c1">;; Only export section between &amp;lt;body&amp;gt; &amp;lt;/body&amp;gt; tags</span>
<span class="lineno">31</span> <span class="ss">:section-numbers</span> <span class="no">nil</span>
<span class="lineno">32</span> <span class="ss">:table-of-contents</span> <span class="no">nil</span>
<span class="lineno">33</span>
<span class="lineno">34</span> <span class="ss">:author</span> <span class="s">&quot;Your Name&quot;</span>
<span class="lineno">35</span> <span class="ss">:email</span> <span class="s">&quot;user@example.cat&quot;</span>
<span class="lineno">36</span> <span class="p">)</span>
<span class="lineno">37</span>
<span class="lineno">38</span> <span class="p">(</span><span class="s">&quot;org-static-mvm&quot;</span>
<span class="lineno">39</span> <span class="ss">:base-directory</span> <span class="s">&quot;~/org-jekyll/org/&quot;</span>
<span class="lineno">40</span> <span class="ss">:base-extension</span> <span class="s">&quot;css\\|js\\|png\\|jpg\\|ico\\|gif\\|pdf\\|mp3\\|flac\\|ogg\\|swf\\|php\\|markdown\\|md\\|html\\|htm\\|sh\\|xml\\|gz\\|bz2\\|vcf\\|zip\\|txt\\|tex\\|otf\\|ttf\\|eot\\|rb\\|yml\\|htaccess\\|gitignore&quot;</span>
<span class="lineno">41</span> <span class="ss">:publishing-directory</span> <span class="s">&quot;~/org-jekyll/rootdir/&quot;</span>
<span class="lineno">42</span> <span class="ss">:recursive</span> <span class="no">t</span>
<span class="lineno">43</span> <span class="ss">:publishing-function</span> <span class="nv">org-publish-attachment</span><span class="p">)</span>
<span class="lineno">44</span>
<span class="lineno">45</span> <span class="p">(</span><span class="s">&quot;mvm&quot;</span> <span class="ss">:components</span> <span class="p">(</span><span class="s">&quot;org-mvm&quot;</span> <span class="s">&quot;org-static-mvm&quot;</span><span class="p">))</span>
<span class="lineno">46</span>
<span class="lineno">47</span> <span class="p">))</span>
</code></pre>
</div>
</pre>
<p>
Things to note:
</p><ol>
<li>We define a project called <code>mvm</code> (last line) which includes two
publishing function components: one for the org files (<code>org-mvm</code>) and
one for the non-org files (<code>org-static-mvm</code>). Then, to export our
site we simply run <code>M-x org-publish-project RET mvm RET</code> from within
Org-mode (shortcut: <code>C-c C-e X m(vm)</code>).
</li>
<li>In both <code>org-mvm</code> and <code>org-static-mvm</code> components we set the base
directory where all our source files reside —in our case,
<code>~/org-jekyll/org/</code> —; the publishing directory where org will export
to — <i>i.e.</i>, our jekyll project root directory
<code>~/org-jekyll/rootdir/</code> —; we tell org to recursively parse the base
directory. Target directories are created, if they don't yet exist.
</li>
<li><code>org-mvm</code> uses <code>org-publish-org-to-html</code> to publish all <code>files.org</code>
(:base-extension: "org") in its base-directory to its publishing
directory. On the other hand, <code>org-static-mvm</code> uses
<code>org-publish-attachment</code> to effectively copy all files with any of
the extensions listed in <code>:base-extension</code> to the publishing
directory. Be sure to set the right extensions of all your
files. [With this current setup, <code>.gitigngore</code>, <code>.htaccess</code>, <code>CNAME</code>
don't yet get published.]
</li>
<li>Change the options as needed (particularly the base and publishing
directories, author and email fields).
</li>
<li>Org uses timestamps to track when a file has changed. By default,
publishing functions normally only publish changed files. You can
override this and force publishing of all files by giving a prefix
argument to any publishing commands (<i>i.e.</i>, <code>C-u C-c C-e X mvm</code>).
</li>
</ol>
</div>
</div>
<div id="outline-container-5" class="outline-3">
<h3 id="sec-5">YAML Headers in Org Files</h3>
<div class="outline-text-3" id="text-5">
<p>#yaml-headers
</p>
<p>
As we mentioned, Jekyll parses files with YAML headers and uses the
variables therein specified through the templates held in the <code>_layouts</code>
directory to produce the final static web site. If we want our org
files to be parsed by jekyll, we need to include YAML headers in them.
A YAML header might look like this:
</p>
<pre class="example"><div class="highlight"><pre><code class="yaml"><span class="nn">---</span>
<span class="l-Scalar-Plain">layout</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">post</span>
<span class="l-Scalar-Plain">title</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">Blogging with Emacs Org-mode and Jekyll</span>
<span class="l-Scalar-Plain">excerpt</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">How to set up the combo emacs org-mode &amp;amp; jekyll to publish a static website/blog.</span>
<span class="l-Scalar-Plain">categories</span><span class="p-Indicator">:</span>
<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">linux</span>
<span class="l-Scalar-Plain">tags</span><span class="p-Indicator">:</span>
<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">emacs</span>
<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">org-mode</span>
<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">jekyll</span>
<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">web</span>
<span class="l-Scalar-Plain">published</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">true</span>
<span class="nn">---</span>
</code></pre>
</div>
</pre>
<p>
However, since we want this header to be seen as it is above by jekyll, we need
to escape it from the org exportation to html. We do this by enclosing
the fragment between a pair of <code>#+BEGIN_HTML</code> / <code>#+END_HTML</code> tags. So
the first lines in our org file will now look like:
</p>
<pre class="example"><div class="highlight"><pre><code class="yaml"> <span class="c1">#+BEGIN_HTML</span>
<span class="l-Scalar-Plain">---</span>
<span class="l-Scalar-Plain">layout</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">post</span>
<span class="l-Scalar-Plain">title</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">Blogging with Emacs Org-mode and Jekyll</span>
<span class="l-Scalar-Plain">excerpt</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">How to set up the combo emacs org-mode &amp;amp; jekyll to publish a static website/blog.</span>
<span class="l-Scalar-Plain">categories</span><span class="p-Indicator">:</span>
<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">linux</span>
<span class="l-Scalar-Plain">tags</span><span class="p-Indicator">:</span>
<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">emacs</span>
<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">org-mode</span>
<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">jekyll</span>
<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">web</span>
<span class="l-Scalar-Plain">published</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">true</span>
<span class="l-Scalar-Plain">---</span>
<span class="err">,</span><span class="c1">#+END_HTML</span>
</code></pre>
</div>
</pre>
<p>
We could decide we want some extra org-mode header tags before that lot
(such as <code>#+AUTHOR:</code> or <code>#+EMAIL:</code>). That's ok and encouraged.
</p>
<p class="note">It seems that Jekyll is smart enough to admit files with
<abbr>YAML</abbr> headers which are not placed really first thing on the
file. If it finds a <abbr>YAML</abbr> header midway through the file,
it takes it fine while it ignores any text above it.</p>
<p class="note">As a side note, general Jekyll configuration is done
throuh <abbr>YAML</abbr> tags in the <code>_config.yml</code> file.</p>
</div>
</div>
<div id="outline-container-6" class="outline-3">
<h3 id="sec-6"><a name="blogging-org-jekyll" id="blogging-org-jekyll"></a>Blogging with Emacs Org-mode and Jekyll</h3>
<div class="outline-text-3" id="text-6">
<p>We now have all the required ingredients to have a pleasant experience
working on our Jekyll website from within Emacs' Org-mode. We write org
files in the <code>~/org-jekyll/org/</code> project directory, let Org-mode publish
our project by running <code>M-x org-export X mvm</code>, and finally have Jekyll
parse the files throuh the templates and build our static website under
<code>~/org-jekyll/rootdir/_site</code>.
</p>
<p>
However, Jekyll is blog aware and understands that the files under the
<code>_posts</code> directory which are named yyyy-mm-dd-post-title.ext are blog
posts. We can use this to our advantage, and one last bit of code
appended to our previous <a href="https://github.com/gorgnegre/org-jekyl/org-jekyll.el"><code>org-jekyll.el</code></a> file will make our blogging
experience somewhat more comfortable:
</p>
<pre class="example"><div class="highlight"><pre><code class="cl"><span class="lineno"> 47</span> <span class="c1">;; Improve our blogging experience with Org-Jekyll. This code sets four</span>
<span class="lineno"> 48</span> <span class="c1">;; functions with corresponding key bindings:</span>
<span class="lineno"> 49</span> <span class="c1">;;</span>
<span class="lineno"> 50</span> <span class="c1">;; C-c j n - Create new draft</span>
<span class="lineno"> 51</span> <span class="c1">;; C-c j P - Post current draft</span>
<span class="lineno"> 52</span> <span class="c1">;; C-c j d - Show all drafts</span>
<span class="lineno"> 53</span> <span class="c1">;; C-c j p - Show all posts</span>
<span class="lineno"> 54</span> <span class="c1">;;</span>
<span class="lineno"> 55</span> <span class="c1">;; Once a draft has been posted (i.e., moved from the _drafts</span>
<span class="lineno"> 56</span> <span class="c1">;; directory to _post with the required date prefix in the filename), we</span>
<span class="lineno"> 57</span> <span class="c1">;; then need to html-export it to the jekyll rootdir (with org-publish).</span>
<span class="lineno"> 58</span>
<span class="lineno"> 59</span> <span class="p">(</span><span class="nv">global-set-key</span> <span class="p">(</span><span class="nv">kbd</span> <span class="s">&quot;C-c j n&quot;</span><span class="p">)</span> <span class="ss">&#39;jekyll-draft-post</span><span class="p">)</span>
<span class="lineno"> 60</span> <span class="p">(</span><span class="nv">global-set-key</span> <span class="p">(</span><span class="nv">kbd</span> <span class="s">&quot;C-c j P&quot;</span><span class="p">)</span> <span class="ss">&#39;jekyll-publish-post</span><span class="p">)</span>
<span class="lineno"> 61</span> <span class="p">(</span><span class="nv">global-set-key</span> <span class="p">(</span><span class="nv">kbd</span> <span class="s">&quot;C-c j p&quot;</span><span class="p">)</span> <span class="p">(</span><span class="k">lambda</span> <span class="p">()</span>
<span class="lineno"> 62</span> <span class="p">(</span><span class="nv">interactive</span><span class="p">)</span>
<span class="lineno"> 63</span> <span class="p">(</span><span class="nv">find-file</span> <span class="s">&quot;~/org-jekyll/org/_posts/&quot;</span><span class="p">)))</span>
<span class="lineno"> 64</span> <span class="p">(</span><span class="nv">global-set-key</span> <span class="p">(</span><span class="nv">kbd</span> <span class="s">&quot;C-c j d&quot;</span><span class="p">)</span> <span class="p">(</span><span class="k">lambda</span> <span class="p">()</span>
<span class="lineno"> 65</span> <span class="p">(</span><span class="nv">interactive</span><span class="p">)</span>
<span class="lineno"> 66</span> <span class="p">(</span><span class="nv">find-file</span> <span class="s">&quot;~/org-jekyll/org/_drafts/&quot;</span><span class="p">)))</span>
<span class="lineno"> 67</span>
<span class="lineno"> 68</span> <span class="p">(</span><span class="nb">defvar</span> <span class="nv">jekyll-directory</span> <span class="s">&quot;~/org-jekyll/org/&quot;</span>
<span class="lineno"> 69</span> <span class="s">&quot;Path to Jekyll blog.&quot;</span><span class="p">)</span>
<span class="lineno"> 70</span> <span class="p">(</span><span class="nb">defvar</span> <span class="nv">jekyll-drafts-dir</span> <span class="s">&quot;_drafts/&quot;</span>
<span class="lineno"> 71</span> <span class="s">&quot;Relative path to drafts directory.&quot;</span><span class="p">)</span>
<span class="lineno"> 72</span> <span class="p">(</span><span class="nb">defvar</span> <span class="nv">jekyll-posts-dir</span> <span class="s">&quot;_posts/&quot;</span>
<span class="lineno"> 73</span> <span class="s">&quot;Relative path to posts directory.&quot;</span><span class="p">)</span>
<span class="lineno"> 74</span> <span class="p">(</span><span class="nb">defvar</span> <span class="nv">jekyll-post-ext</span> <span class="s">&quot;.org&quot;</span>
<span class="lineno"> 75</span> <span class="s">&quot;File extension of Jekyll posts.&quot;</span><span class="p">)</span>
<span class="lineno"> 76</span> <span class="p">(</span><span class="nb">defvar</span> <span class="nv">jekyll-post-template</span>
<span class="lineno"> 77</span> <span class="s">&quot;#+STARTUP: showall\n#+STARTUP: hidestars\n#+OPTIONS: H:2 num:nil tags:nil toc:1 timestamps:t\n#+BEGIN_HTML\n---\nlayout: post\ntitle: %s\nexcerpt: \ncategories:\n - \ntags:\n - \npublished: false\n---\n#+END_HTML\n\n** &quot;</span>
<span class="lineno"> 78</span> <span class="s">&quot;Default template for Jekyll posts. %s will be replace by the post title.&quot;</span><span class="p">)</span>
<span class="lineno"> 79</span>
<span class="lineno"> 80</span> <span class="p">(</span><span class="nb">defun</span> <span class="nv">jekyll-make-slug</span> <span class="p">(</span><span class="nv">s</span><span class="p">)</span>
<span class="lineno"> 81</span> <span class="s">&quot;Turn a string into a slug.&quot;</span>
<span class="lineno"> 82</span> <span class="p">(</span><span class="nv">replace-regexp-in-string</span>
<span class="lineno"> 83</span> <span class="s">&quot; &quot;</span> <span class="s">&quot;-&quot;</span> <span class="p">(</span><span class="nv">downcase</span>
<span class="lineno"> 84</span> <span class="p">(</span><span class="nv">replace-regexp-in-string</span>
<span class="lineno"> 85</span> <span class="s">&quot;[^A-Za-z0-9 ]&quot;</span> <span class="s">&quot;&quot;</span> <span class="nv">s</span><span class="p">))))</span>
<span class="lineno"> 86</span>
<span class="lineno"> 87</span> <span class="p">(</span><span class="nb">defun</span> <span class="nv">jekyll-yaml-escape</span> <span class="p">(</span><span class="nv">s</span><span class="p">)</span>
<span class="lineno"> 88</span> <span class="s">&quot;Escape a string for YAML.&quot;</span>
<span class="lineno"> 89</span> <span class="p">(</span><span class="k">if</span> <span class="p">(</span><span class="nb">or</span> <span class="p">(</span><span class="nv">string-match</span> <span class="s">&quot;:&quot;</span> <span class="nv">s</span><span class="p">)</span>
<span class="lineno"> 90</span> <span class="p">(</span><span class="nv">string-match</span> <span class="s">&quot;\&quot;&quot;</span> <span class="nv">s</span><span class="p">))</span>
<span class="lineno"> 91</span> <span class="p">(</span><span class="nv">concat</span> <span class="s">&quot;\&quot;&quot;</span> <span class="p">(</span><span class="nv">replace-regexp-in-string</span> <span class="s">&quot;\&quot;&quot;</span> <span class="s">&quot;\\\\\&quot;&quot;</span> <span class="nv">s</span><span class="p">)</span> <span class="s">&quot;\&quot;&quot;</span><span class="p">)</span>
<span class="lineno"> 92</span> <span class="nv">s</span><span class="p">))</span>
<span class="lineno"> 93</span>
<span class="lineno"> 94</span> <span class="p">(</span><span class="nb">defun</span> <span class="nv">jekyll-draft-post</span> <span class="p">(</span><span class="nv">title</span><span class="p">)</span>
<span class="lineno"> 95</span> <span class="s">&quot;Create a new Jekyll blog post.&quot;</span>
<span class="lineno"> 96</span> <span class="p">(</span><span class="nv">interactive</span> <span class="s">&quot;sPost Title: &quot;</span><span class="p">)</span>
<span class="lineno"> 97</span> <span class="p">(</span><span class="k">let</span> <span class="p">((</span><span class="nv">draft-file</span> <span class="p">(</span><span class="nv">concat</span> <span class="nv">jekyll-directory</span> <span class="nv">jekyll-drafts-dir</span>
<span class="lineno"> 98</span> <span class="p">(</span><span class="nv">jekyll-make-slug</span> <span class="nv">title</span><span class="p">)</span>
<span class="lineno"> 99</span> <span class="nv">jekyll-post-ext</span><span class="p">)))</span>
<span class="lineno">100</span> <span class="p">(</span><span class="k">if</span> <span class="p">(</span><span class="nv">file-exists-p</span> <span class="nv">draft-file</span><span class="p">)</span>
<span class="lineno">101</span> <span class="p">(</span><span class="nv">find-file</span> <span class="nv">draft-file</span><span class="p">)</span>
<span class="lineno">102</span> <span class="p">(</span><span class="nv">find-file</span> <span class="nv">draft-file</span><span class="p">)</span>
<span class="lineno">103</span> <span class="p">(</span><span class="nv">insert</span> <span class="p">(</span><span class="nb">format</span> <span class="nv">jekyll-post-template</span> <span class="p">(</span><span class="nv">jekyll-yaml-escape</span> <span class="nv">title</span><span class="p">))))))</span>
<span class="lineno">104</span>
<span class="lineno">105</span> <span class="p">(</span><span class="nb">defun</span> <span class="nv">jekyll-publish-post</span> <span class="p">()</span>
<span class="lineno">106</span> <span class="s">&quot;Move a draft post to the posts directory, and rename it so that it</span>
<span class="lineno">107</span> <span class="s">contains the date.&quot;</span>
<span class="lineno">108</span> <span class="p">(</span><span class="nv">interactive</span><span class="p">)</span>
<span class="lineno">109</span> <span class="p">(</span><span class="nb">cond</span>
<span class="lineno">110</span> <span class="p">((</span><span class="nb">not</span> <span class="p">(</span><span class="nb">equal</span>
<span class="lineno">111</span> <span class="p">(</span><span class="nv">file-name-directory</span> <span class="p">(</span><span class="nv">buffer-file-name</span> <span class="p">(</span><span class="nv">current-buffer</span><span class="p">)))</span>
<span class="lineno">112</span> <span class="p">(</span><span class="nv">concat</span> <span class="nv">jekyll-directory</span> <span class="nv">jekyll-drafts-dir</span><span class="p">)))</span>
<span class="lineno">113</span> <span class="p">(</span><span class="nv">message</span> <span class="s">&quot;This is not a draft post.&quot;</span><span class="p">)</span>
<span class="lineno">114</span> <span class="p">(</span><span class="nv">insert</span> <span class="p">(</span><span class="nv">file-name-directory</span> <span class="p">(</span><span class="nv">buffer-file-name</span> <span class="p">(</span><span class="nv">current-buffer</span><span class="p">)))</span> <span class="s">&quot;\n&quot;</span>
<span class="lineno">115</span> <span class="p">(</span><span class="nv">concat</span> <span class="nv">jekyll-directory</span> <span class="nv">jekyll-drafts-dir</span><span class="p">)))</span>
<span class="lineno">116</span> <span class="p">((</span><span class="nv">buffer-modified-p</span><span class="p">)</span>
<span class="lineno">117</span> <span class="p">(</span><span class="nv">message</span> <span class="s">&quot;Can&#39;t publish post; buffer has modifications.&quot;</span><span class="p">))</span>
<span class="lineno">118</span> <span class="p">(</span><span class="no">t</span>
<span class="lineno">119</span> <span class="p">(</span><span class="k">let</span> <span class="p">((</span><span class="nv">filename</span>
<span class="lineno">120</span> <span class="p">(</span><span class="nv">concat</span> <span class="nv">jekyll-directory</span> <span class="nv">jekyll-posts-dir</span>
<span class="lineno">121</span> <span class="p">(</span><span class="nv">format-time-string</span> <span class="s">&quot;%Y-%m-%d-&quot;</span><span class="p">)</span>
<span class="lineno">122</span> <span class="p">(</span><span class="nv">file-name-nondirectory</span>
<span class="lineno">123</span> <span class="p">(</span><span class="nv">buffer-file-name</span> <span class="p">(</span><span class="nv">current-buffer</span><span class="p">)))))</span>
<span class="lineno">124</span> <span class="p">(</span><span class="nv">old-point</span> <span class="p">(</span><span class="nv">point</span><span class="p">)))</span>
<span class="lineno">125</span> <span class="p">(</span><span class="nb">rename-file</span> <span class="p">(</span><span class="nv">buffer-file-name</span> <span class="p">(</span><span class="nv">current-buffer</span><span class="p">))</span>
<span class="lineno">126</span> <span class="nv">filename</span><span class="p">)</span>
<span class="lineno">127</span> <span class="p">(</span><span class="nv">kill-buffer</span> <span class="no">nil</span><span class="p">)</span>
<span class="lineno">128</span> <span class="p">(</span><span class="nv">find-file</span> <span class="nv">filename</span><span class="p">)</span>
<span class="lineno">129</span> <span class="p">(</span><span class="nv">set-window-point</span> <span class="p">(</span><span class="nv">selected-window</span><span class="p">)</span> <span class="nv">old-point</span><span class="p">)))))</span>
</code></pre>
</div>
</pre>
<p>
Things to note:
</p><ol>
<li>Read the comments at the top. Basically this code sets four functions
with corresponding key bindings:
<dl>
<dt><code>C-c j n</code></dt><dd>create new draft (<i>i.e.</i>, a new file in the <code>_drafts</code>
folder);
</dd>
<dt><code>C-c j P</code></dt><dd>post current draft (<i>i.e.</i>, move file from the
<code>_drafts</code> folder to the <code>_posts</code> folder changing the
file name to include the correct date prefix as
required by jekyll);
</dd>
<dt><code>C-c j d</code></dt><dd>list all drafts (files in the <code>_drafts</code> directory);
</dd>
<dt><code>C-c j p</code></dt><dd>list all posts (files in the <code>_posts</code> directory).
</dd>
</dl>
</li>
<li>Be sure to change the paths to suit your needs (search for the string
"org-jekyll" to find the paths in the code).
</li>
<li>Customize the <code>jekyll-post-template</code> variable to suit your needs.
</li>
</ol>
<p class="note">This code could be further hacked so that after the post title, the
mode-line also asks you about the post excerpt, categories and tags, for
instance.</p>
</div>
</div>
<div id="outline-container-7" class="outline-3">
<h3 id="sec-7">Links to Posts</h3>
<div class="outline-text-3" id="text-7">
<p>To link to another post in my site while writing in org-mode, I use the
following syntax:
</p>
<pre class="example"><div class="highlight"><pre><code class="cl"><span class="nv">[[file:{%</span> <span class="nv">post_url</span> <span class="nv">2007-12-15-utthita-trikonasana</span> <span class="nv">%}][Utthita</span> <span class="nv">Trikonasana]]</span>
</code></pre>
</div>
</pre>
</div>
</div>
<div id="outline-container-8" class="outline-3">
<h3 id="sec-8">Improvements</h3>
<div class="outline-text-3" id="text-8">
<ul>
<li>Include Reyero's hack which I have so far left out.
</li>
<li>Tell Ian Barton about typos in his <code>jekyll-org.el</code> code.
</li>
<li>Hack <code>org-static-mvm</code> so that <code>.gitigngore</code>, <code>.htaccess</code>, <code>CNAME</code>