ed. 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,57 @@
1
+ ---
2
+ layout: poem
3
+ title: "O Captain! My Captain!"
4
+ author: Walt Whitman
5
+ editor: Alex Gil
6
+ source: Poetry Foundation
7
+ ---
8
+
9
+ - O Captain! my Captain! our fearful trip is done;[^fn1]
10
+ - The ship has weather’d every rack, the prize we sought is won,
11
+ - The port is near, the bells I hear, the people all exulting,
12
+ - While follow eyes the steady keel, the vessel grim and daring;
13
+ - {:.indent-3}But O heart! heart! heart!
14
+ - {:.indent-4}O the bleeding drops of red,
15
+ - {:.indent-5}Where on the deck my Captain lies,
16
+ - {:.indent-6}Fallen cold and dead.
17
+
18
+
19
+ - O Captain! my Captain! rise up and hear the bells;
20
+ - Rise up—for you the flag is flung—for you the bugle[^fn2] trills,
21
+ - For you bouquets and ribbon’d wreaths—for you the shores a-crowding,
22
+ - For you they call, the swaying mass, their eager faces turning;
23
+ - {:.indent-3}Here Captain! dear father!
24
+ - {:.indent-4}This arm beneath your head!
25
+ - {:.indent-5}It is some dream that on the deck,
26
+ - {:.indent-6}You’ve fallen cold and dead.
27
+
28
+
29
+ - My Captain does not answer, his lips are pale and still,[^fn3]
30
+ - My father does not feel my arm, he has no pulse nor will,
31
+ - The ship is anchor’d safe and sound, its voyage closed and done,
32
+ - From fearful trip the victor ship comes in with object won;
33
+ - {:.indent-3}Exult O shores, and ring O bells!
34
+ - {:.indent-4}But I with mournful tread,
35
+ - {:.indent-5}Walk the deck my Captain lies,
36
+ - {:.indent-6}Fallen cold and dead.
37
+
38
+ <br>
39
+
40
+ ---
41
+
42
+ ## Footnotes
43
+
44
+ [^fn1]:
45
+
46
+ The author had just landed in La Guardia Airport after the flight captain died. All the passengers stood up to applaud the co-pilot. We have it in good authority that the event in question led Yoko Ono to write her "Letter to John":
47
+
48
+ > - On a windy day let's go flying
49
+ > - There may be no trees to rest on
50
+ > - There may be no clouds to ride
51
+ > - But we'll have our wings and the wind will be with us
52
+ > - That's enough for me, that's enough for me.
53
+ {:.poetry}
54
+
55
+ [^fn2]: The bugle is a small trumpet implicated in the military industrial complex.
56
+
57
+ [^fn3]: Another footnote. Why not?
@@ -0,0 +1,22 @@
1
+ ---
2
+ layout: drama
3
+ title: A Raisin in the Sun
4
+ author: Lorraine Hansberry
5
+ editor: Alex Gil
6
+ source: "Hansberry, Lorraine, and Robert Nemiroff. A Raisin in the Sun. Rep Rei edition. New York: Vintage, 2004. Print."
7
+
8
+ ---
9
+
10
+ <p class="citation"> by {{ page.author }}</p>
11
+
12
+ (excerpt)
13
+
14
+ MAMA: Son—how come you talk so much 'bout money?
15
+
16
+ WALTER (*with immense passion*): Because it is life, Mama!
17
+
18
+ MAMA: Oh—So now it’s life. Money is life. Once upon a time freedom used to be life—now it’s money. I guess the world really do change ...
19
+
20
+ WALTER: No—it was always money, Mama. We just didn’t know about it.
21
+
22
+ MAMA: No . . . something has changed. (*She looks at him*) You something new, boy. In my time we was worried about not being lynched and getting to the North if we could and how to stay alive and still have a pinch of dignity too ... Now here come you and Beneatha—talking 'bout things we never even thought about hardly, me and your daddy. You ain’t satisfied or proud of nothing we done. I mean that you had a home; that we kept you out of trouble till you was grown; that you don’t have to ride to work on the back of nobody’s streetcar—You my children—but how different we done become.
@@ -0,0 +1,38 @@
1
+ ---
2
+ layout: page
3
+ title: About
4
+ ---
5
+
6
+ One of our most pressing and ever revolving needs as scholars is to pass on our textual artifacts from one generation to another. The art of textual editing, among other practices, has helped many cultures to remember and interpret for centuries. Alas, that art is practiced and encouraged in its highest form by a dwindling number of scholars. In a digital environment the problem is compounded by the difficulties of the medium. While vast repositories, and "e-publications" appear on the online scene yearly, very few manifest a textual scholar's disciplined attention to detail. In contrast, most textual scholars who have made the leap to a rigorous digital practice have focused on markup, relying on technical teams to deploy and maintain their work. This makes your average scholarly digital edition a very costly, and therefore limited affair.
7
+
8
+ As we see it, a minimal edition is one that aims to reduce the size and complexity of the back and front end, and the learning curves for the user and the producer. Out of-the-box, this theme can help you build a simple reading edition, or a traditional scholarly edition with footnotes and a bibliography without breaking the bank. In our estimate, these are the two most immediately useful type of editions for editors and readers. An edition produced with Ed consists of static pages whose rate of decay is substantially lower than database-driven systems. As an added bonus, these static pages require less bandwith. Our hope is that our approach can help beginners or veterans deploy beautiful editions with less effort, that it can help us teach a 'full stack' in one academic semester, allow us to care for our projects at less cost, and perhaps, just perhaps, allow us to generate high-quality editions on github.io in large quantities based on the [git-lit](http://jonreeve.com/2015/09/introducing-git-lit/) model by Jonathan Reeve. We're coming for you, Kindle!
9
+
10
+
11
+ ## Sample Ed editions.
12
+
13
+ - [Our sample site](http://elotroalex.github.io/ed/) is the first edition built with Ed.
14
+ - [Fugitive Verses](http://fugitiverses.viraltexts.org/): Popular Reprinted Poetry from Nineteenth Century Newspapers
15
+ - [mini lazarillo](http://minilazarillo.github.io/): A minimal edition of the *Lazarillo de Tormes*
16
+ - [Making and Knowing](https://cu-mkp.github.io/GR8975-edition/): The BnF Ms Fr 640 in Translation
17
+ - [Daisy Miller: A Comedy in Three Acts](https://britaneeelizabeth.github.io/ed/texts/DaisyMillerPlay/)
18
+
19
+
20
+
21
+ ## Current Features
22
+ - Templates for narrative, drama and poetry
23
+ - Responsive design for mobile phones, tablets and PCs.
24
+ - Relatively easy to learn and teach
25
+ - Works well in high- or low- bandwitdh scenarios
26
+ - Easier for digital archives and libraries to preserve
27
+ - Open source, open access
28
+ - Unobtrusive footnotes
29
+ - Metadata in Dublin Core and OpenGraph to play nice with Zotero, libraries and social media.
30
+ - Automatic table of content generation
31
+ - Simple search functionality
32
+ - Annotations via [hypothes.is](https://hypothes.is/)
33
+ - Optional: Ability to generate well-formatted bibliographies and linked citations
34
+
35
+
36
+ ## Installing and using Ed
37
+
38
+ To learn how to install and begin using Ed, please visit our [documentation page](http://elotroalex.github.io/ed/documentation/).
@@ -0,0 +1,28 @@
1
+ ---
2
+ layout: null
3
+ ---
4
+
5
+ <?xml version="1.0" encoding="utf-8"?>
6
+ <feed xmlns="http://www.w3.org/2005/Atom">
7
+
8
+ <title>{{ site.title }}</title>
9
+ <link href="{{ site.url }}{{ site.baseurl }}/atom.xml" rel="self"/>
10
+ <link href="{{ site.url }}{{ site.baseurl }}/"/>
11
+ <updated>{{ site.time | date_to_xmlschema }}</updated>
12
+ <id>{{ site.url }}</id>
13
+ <author>
14
+ <name>{{ site.author.name }}</name>
15
+ <email>{{ site.author.email }}</email>
16
+ </author>
17
+
18
+ {% for post in site.posts %}
19
+ <entry>
20
+ <title>{{ post.title }}</title>
21
+ <link href="{{ site.url }}{{ post.url }}"/>
22
+ <updated>{{ post.date | date_to_xmlschema }}</updated>
23
+ <id>{{ site.url }}{{ site.baseurl }}{{ post.id }}</id>
24
+ <content type="html">{{ post.content | xml_escape }}</content>
25
+ </entry>
26
+ {% endfor %}
27
+
28
+ </feed>
@@ -0,0 +1,40 @@
1
+ ---
2
+ layout: page
3
+ title: Credits
4
+ ---
5
+
6
+ ### [Susanna Allés Torrent](http://susannalles.github.io/) | Hyper philologist
7
+
8
+ Susanna teaches Digital Humanities in the Department of Latin American and Iberian Cultures. She earned her Ph.D in Romance Studies at the University of Barcelona in 2012, and completed a M.A. in «Nouvelles technologies appliquées à l’histoire» at the École Nationale des Chartes (Paris). She has taught at the University of Barcelona and she has been a postdoctoral fellow at the Spanish National Research Council (CSIC). Her research explores several aspects of digital humanities, especially, scholarly digital editions, electronic text analysis, intertextuality and text reuse, and digital lexicography. She also works with the intersection of the Iberian Peninsula and Italy in the Middle Ages and the Renaissance, reconstructing cultural and literary networks between the two.
9
+
10
+
11
+ ### [Terry Catapano](https://github.com/tcatapano) | Metadata ninja
12
+
13
+ Terry Catapano is a Librarian in Columbia University Libraries' Digital Program Division. He was Chair of the Society of American Archivists' Schema Development Team, responsible for the development of Encoded Archival Description version 3, and is a member of the ArchivesSpace Technical Advisory Group and the Editorial Board for the Metadata Encoding and Transmission Standard (METS). As Vice President of Plazi Verein, he leads the development of the TaxPub extension of the National Library of Medicine/National Center for Biotechnology Information Journal Publishing DTD, and has worked on digitizing, text mining, and providing open access to the literature of biological systematics, including collaborations with WikiData, the Encylopedia of Life, the Global Biodiversity Information Facility (GBIF), ZooBank, and CERN.
14
+
15
+ ### [Alex Gil](http://www.elotroalex.com/) | Resident minimalist
16
+
17
+ Alex is the Digital Scholarship Coordinator for the Humanities and History at Columbia University. He is vice chair of the [Global Outlook::Digital Humanities](http://www.globaloutlookdh.org/) initiative focusing on minimal computing and translation, is one of the founders and directors of [Columbia's Group for Experimental Methods in the Humanities](http://xpmethod.plaintext.in/) and the [Studio@Butler](https://studio.cul.columbia.edu/), and is actively engaged in several digital humanities projects at Columbia and around the world.
18
+
19
+ ### [Johann Gillium](https://github.com/JohannGillium) | Search master
20
+
21
+ After having studied digital humanities at the Ecole nationale des Chartes in Paris, Johann has worked in France as a librarian at the Bibliothèque interuniversaire de Santé, where he most notably contributed to the [Vesalius project](http://www3.biusante.parisdescartes.fr/vesale/debut.htm), the digital edition of several works by the great anatomist Andreas Vesalius.
22
+
23
+
24
+ ---
25
+
26
+ ## Acknowledgments
27
+
28
+ As many open source projects, Ed is the work of community. The project starts with the open web, and everything in between leading to [Jekyll](https://jekyllrb.com/) and the wonderful team who wrangled that Ruby in our favor. The theme stylesheets are built on top of [Lanyon](https://github.com/poole/lanyon), a Jekyll theme based on [Poole](http://getpoole.com), "the Jekyll butler," both created by [Mark Otto](https://github.com/mdo) and distributed with an MIT license. Thanks, Mark, for your helpful streamlining! Special hat tips to brother-in-markdown-arms, [Chris Forster](https://github.com/c-forster), and the generous [Sylvester Keil](https://github.com/inukshuk/) for his work on Jekyll Scholar.
29
+
30
+
31
+ We are strongly indebted to the research work and conversations stemming out of our [Columbia's Group for Experimental Methods in the Humanities](http://xpmethod.plaintext.in/)—or as we like to call it: #xpmethod; the wonderful international comradery of [GO::DH](http://www.globaloutlookdh.org/); and of course, the support of our [Columbia University Libraries](http://library.columbia.edu/) and its cozy [Studio@Butler](https://studio.cul.columbia.edu/).
32
+
33
+ ...and to the writers that inspire us to scribble notes on the margins we protect with our work. Thank you.
34
+
35
+
36
+
37
+
38
+
39
+
40
+
@@ -0,0 +1,448 @@
1
+ ---
2
+ layout: page
3
+ title: Documentation
4
+ author: Alex Gil
5
+ ---
6
+
7
+ ## Contents
8
+ {:.no_toc}
9
+
10
+ * ToC
11
+ {:toc}
12
+
13
+ ---
14
+
15
+ ## Prerequisites
16
+
17
+ This documentation was built with beginners in mind, but has the necessary information for more seasoned producers.
18
+
19
+ To install and use Ed you will be using your terminal. If you need a refresher, I highly recommend "[The Command Line Crash Course](http://cli.learncodethehardway.org/book/)." Working knowledge of HTML and CSS is also taken for granted. If you're new to HTML and CSS, you may want to check out the relevant courses on [codecademy.com](https://www.codecademy.com/learn/web).
20
+
21
+ Jekyll does not run very well on Windows machines for now. If you are using Windows, this theme won't work for you, but we hope that you simply deploy our principles, and parts of our stylesheet, on a system like [Hugo](https://gohugo.io/), which does work on Windows.
22
+
23
+ ---
24
+
25
+ ## Installing Ed: Easy
26
+
27
+ The easy way to do this is not necessarily the more robust, and may simply not work on your system. The easy way could also be called the 'lucky' way. It will work if your system is ready for Ed. Two major caveats to keep in mind if you go the easy route: a) You may run into problems later when some Ed components need updating; and, b) You may run into conflicts if you run several Ruby environments for different projects. That said, if you just want to quickly try Ed, and you don't run into problems installing, this is perhaps the best approach.
28
+
29
+
30
+ If you're using a Mac, make sure you have the appropriate version of [XCode command line tools](https://developer.apple.com/xcode/download/) for your OSX. Using the terminal's `cd` command, switch to the directory where you want to install your project. Once inside the folder, you are ready to download and start using Ed. Enter each of these lines into your terminal (remember to ignore the `$`):
31
+
32
+ ~~~ bash
33
+ $ git clone https://github.com/elotroalex/ed.git
34
+ $ cd ed
35
+ $ gem install bundler
36
+ $ bundle install
37
+ ~~~
38
+
39
+ That's it. To see if Ed is working properly we will take advantage of Jekyll's built in server. You can build the first version of your site and run the jekyll server at the same time by entering:
40
+
41
+ ~~~ bash
42
+ $ jekyll serve
43
+ ~~~
44
+
45
+ If at any point during this process you had an error you could not resolve, move on to the next section. If the site was rendered fine, copy the url from your terminal log and paste it into your browser of choice (I recommend Firefox). This url usually looks something like this `http://127.0.0.1:4000/ed`. At this point you should be looking at your very own working version of Ed:
46
+
47
+ ![Your very own Ed]({{ site.baseurl }}/assets/screenshot-home.png)
48
+
49
+ ---
50
+
51
+ ## Installing Ed: Robust
52
+
53
+ The first step to install Ed is to download the source files from GitHub. To do so you must have git installed on your computer. You probably have git already, but if you don't, the easiest way is probably to install [Github Desktop](https://desktop.github.com/) (even though we will be using git and github from the terminal in this tutorial). Mac users may want to ensure they have [Xcode](https://developer.apple.com/xcode/) and its command line tools installed as well. To check if git is running on your system enter the following line on your terminal (remember to ignore the $):
54
+
55
+ ~~~ bash
56
+ $ git --version
57
+ ~~~
58
+
59
+ If you don't get an error, you're good to go. Using the `cd` command on your terminal, navigate to the folder where you keep your web projects. Once you're in the folder where you want Ed to live, download it from github using the following line (remember you can copy and paste):
60
+
61
+ ~~~ bash
62
+ $ git clone https://github.com/elotroalex/ed.git
63
+ ~~~
64
+
65
+ At this point you should navigate inside your Ed project folder and stay there until further notice:
66
+
67
+ ~~~ bash
68
+ $ cd ed
69
+ ~~~
70
+
71
+ Jekyll is a Ruby gem (Ruby's name for software packages). The best way to ensure you have the right environment is to use Ruby Version Manager, or [rvm](https://rvm.io/), and the latest stable version of Ruby. To install rvm *and* a recent version of Ruby at the same time, follow the instructions on rvm's site. Remember to add `--ruby=2.3.0` at the end of the `curl` command to install ruby at the same time.
72
+
73
+ After the process runs succesfully, read the last few lines generated by the terminal. You will see final instructions for making rvm run. Once you finish the process, check to see if rvm is running by entering:
74
+
75
+ ~~~ bash
76
+ $ rvm --version
77
+ ~~~
78
+
79
+ If you don't get an error, you're ready for the next step. If you do get an error, and don't feel comfortable troubleshooting on the terminal, this is a good opportunity to reach out to a friend who can help. You can leave me a note on [the issues page](https://github.com/elotroalex/ed/issues), for example. I'll try to get to it as soon as my other commitments permit. If you're comfortable troubleshooting on your own, I recommend Jekyll's own [troubleshooting documentation](http://jekyllrb.com/docs/troubleshooting/). Another great strategy for troubleshooting on the terminal is to copy and paste the errors you receive (sans personal information) into your favorite search engine.
80
+
81
+ The next step is to create a gemset for your jekyll projects. A gemset is a set of gems. If you don't create and use a gemset, every gem you install will be applied system-wide. This is not necessarily a bad thing, but if you will have several projects with several setups, this strategy will serve you well in the long run. To create a gemset:
82
+
83
+ ~~~ bash
84
+ $ rvm gemset create ed
85
+ ~~~
86
+
87
+ To use the gemset you just created:
88
+
89
+ ~~~ bash
90
+ $ rvm gemset use ed
91
+ ~~~
92
+
93
+ N.B. Everytime you open a new tab or window on your terminal you need to declare your gemset using `rvm gemset use ed`, or else it will revert to `(default)`.
94
+
95
+ Now that rvm and Ruby are set up, we're ready to install our first gem: Bundler. Bundler is a gem that allows you to install many gems at the same time using Gemfiles, which is a simple list of specific gems that lives in your project folder. Once you install it, you will be ready to run the Gemfile I provided in the source files. To install Bundler:
96
+
97
+ ~~~ bash
98
+ $ gem install bundler
99
+ ~~~
100
+
101
+ You're very close. Now that Bundler is installed, the final step is to install the right version of Jekyll. To do so run the Gemfile this way (remember you must be inside the `ed` folder for this to work):
102
+
103
+ ~~~ bash
104
+ $ bundle install
105
+ ~~~
106
+
107
+
108
+ If you don't get any errors, Ed should work at this point. To see if Ed is working properly we will take advantage of Jekyll's built in server. You can build the first version of your site and run the jekyll server at the same time by entering:
109
+
110
+ ~~~ bash
111
+ $ jekyll serve
112
+ ~~~
113
+
114
+ If you are running multiple Ruby environments using bundler, you will need to add `bundle exec` to the command:
115
+
116
+ ~~~ bash
117
+ $ bundle exec jekyll serve
118
+ ~~~
119
+
120
+ Copy the url from your terminal log and paste it into your browser of choice (I recommend Firefox). This url usually looks something like this `http://127.0.0.1:4000/ed`. At this point you should be looking at your very own working version of Ed:
121
+
122
+ ![Your very own Ed]({{ site.baseurl }}/assets/screenshot-home.png)
123
+
124
+ ---
125
+
126
+ ## Jekyll
127
+
128
+ Ed is a Jekyll theme. That means you will need some familiarity with Jekyll to take advantage of its full potential. While running a Jekyll site is a bit more involved than Wordpress and other similar tools, the payoff in the long term is worth the effort to learn it. If you are new to Jekyll, I recommend you take a look at ["How (and Why) to Generate a Static Website Using Jekyll"](http://chronicle.com/blogs/profhacker/jekyll1/60913) at ProfHacker, and the excellent [Jekyll documentation](http://jekyllrb.com/) to start getting a sense of how it works.
129
+
130
+ Once you have gone through these tutorials, you can get started using Ed by replacing the sample texts included in in the `_texts` folder in Ed with your own edited texts. Remember to always and only edit files in Ed using [a plain text editor](https://en.wikipedia.org/wiki/Text_editor), and *not* a word processor. I'm composing this file using a plain text editor called [Sublime Text](http://www.sublimetext.com/).
131
+
132
+ An easy way to make new texts is to copy an existing text, replace the content and rename the file. Remember to always use the jekyll convention for naming files: `your-title.md`. You should also make sure that all your texts have the YAML front matter (the information at the top of the file). YAML stands for "YAML Ain't Markup Language"---no disrespect to XML---and it's the main way that Jekyll handles named data. Here's an example of YAML front matter:
133
+
134
+ ~~~ yaml
135
+ ---
136
+ layout: poem
137
+ title: "Cahier d'un retour au pays natal"
138
+ author: Aimé Césaire
139
+ ---
140
+ ~~~
141
+
142
+ Besides replacing content and creating new texts, you will probably want to edit the `_config.yml` file to replace the boilerplate information we provided with your own personalized information in the relevant categories. Avoid replacing the information in categories that are not clear to you. Make sure to use proper YAML formatting when writing in the `_config.yml` file. Here's [a good reference source](http://docs.ansible.com/ansible/YAMLSyntax.html) in case you have doubts.
143
+
144
+ ---
145
+
146
+ ## Markdown and kramdown
147
+
148
+ Ed is designed for scholars and amateur editors who want to produce either a clean reading edition or a scholarly annotated edition of a text. The main language we use to write in the Jekyll environment is called Markdown. To learn more about the Markdown family, see Dennis Tenen and Grant Wythoff's "[Sustainable Authorship in Plain Text using Pandoc and Markdown](http://programminghistorian.org/lessons/sustainable-authorship-in-plain-text-using-pandoc-and-markdown)."
149
+
150
+ Our version of Jekyll uses a special Markdown processor called kramdown. The processor can be said to use it's own 'flavor' of Markdown, and sometimes the Markdown syntax will be different than other flavors of Markdown. Kramdown is convenient for scholars because of the way it handles footnotes. You can become familiar with the kramdown syntax in the [kramdown documentation](http://kramdown.gettalong.org/syntax.html). Another way to become familiar is to examine the sample text source files we provided.
151
+
152
+ ---
153
+
154
+ ## Genres
155
+
156
+ Ed offers three different layouts: poem, narrative and drama. The genre is indicated in the YAML front matter on your texts. The templates that govern how these genres are displayed can be found in the `_layouts` folder. Using these layouts will allow you to tweak the stylesheets according to your different needs. Out of the box, Ed contains some special instructions for poetry in its stylesheets that allow you to deal with some of the peculiarities of poetry layouts.
157
+
158
+ To indicate lines in poetry we use the line syntax from Markdown:
159
+
160
+ ~~~ markdown
161
+ - Hold fast to dreams
162
+ - For if dreams die
163
+ - Life is a broken-winged bird
164
+ - That cannot fly.
165
+ - Hold fast to dreams
166
+ - For when dreams go
167
+ - Life is a barren field
168
+ - Frozen with snow.
169
+ ~~~
170
+
171
+ To indent specific lines we take advantage of a feature in kramdown that allows us to indicate classes for a line. This approach still allows the line to be readable while editing.
172
+
173
+ ~~~ markdown
174
+ - {:.indent-3} But O heart! heart! heart!
175
+ - {:.indent-4} O the bleeding drops of red,
176
+ - {:.indent-5} Where on the deck my Captain lies,
177
+ - {:.indent-6} Fallen cold and dead.
178
+ ~~~
179
+
180
+ The `-` at the beginning of each line indicates that these are lines. The `{:.indent-3}` is what we need to in order to indicate the indent value for that line. Values can range from 1-10. You can expand the range or adjust the values in the CSS stylesheet in the `public` folder.
181
+
182
+ The example from Raisin in the Sun shows us that we don't need much special markup for theater as long as we use CAPITAL LETTERS for speakers. Italics for directions are easy enough. Just use `*` around the words you want to italicize.
183
+
184
+ *Narrative of the Life of Frederick Douglass* shows us an example of narrative that includes footnotes and quoted poetry. See the sections below for how to accomplish these different effects.
185
+
186
+ ---
187
+
188
+ ## Footnotes
189
+
190
+ Footnotes are the bread and butter of scholarship. Kramdown makes footnotes a fairly simple affair:
191
+
192
+
193
+ ~~~
194
+ - O Captain! my Captain! rise up and hear the bells;
195
+ - Rise up—for you the flag is flung—for you the bugle[^fn2] trills,
196
+
197
+ ...
198
+
199
+ [^fn2]: The bugle is a small trumpet implicated in the military industrial complex.
200
+ ~~~
201
+
202
+ These footnotes can be placed anywhere, but they will always be generated at the bottom of the document. To have a multi-paragraph footnote you need to start the footnote text on the next line after the footnote anchor and indent it:
203
+
204
+ ~~~
205
+ [^fn3]:
206
+ Ugh pinterest fixie cronut pitchfork beard. Literally deep
207
+ cold-pressed distillery pabst austin.
208
+
209
+ Typewriter 90's roof party poutine, kickstarter raw
210
+ denim pabst readymade biodiesel umami chicharrones XOXO.
211
+ ~~~
212
+
213
+ The footnotes system provided by kramdown does have one limitation: It generates the numeration for you automatically, and it only allows you to have one set of footnotes for a text. In some cases we have to separate the author's footnotes from our own, in others we want to represent the author's own footnote style. In these cases we have to use HTML. Here's the example from *Narrative of the Life*:
214
+
215
+ ~~~ html
216
+ ... At this time, Anna,<sup><a href="#fn2" id="ref2">\*</a></sup> my intended wife, came on;
217
+
218
+ ...
219
+
220
+ <sup id="fn2">*</sup> She was free. [&#x21a9;&#xfe0e;](#ref2)
221
+ ~~~
222
+
223
+ Notice the double HTML Entity (hex), `&#x21a9;&#xfe0e;`, used at the end of the footnote to return us to the top. The first hex is the &#x21a9;&#xfe0e; symbol proper. The second assigns the proper variant glyph. This is a necessary hack while we wait for Apple devices to stop turning everything into unseemly emojis.
224
+
225
+ ---
226
+
227
+ ## Blockquotes
228
+
229
+ *Narrative of the Life* also includes several blockquotes. You can also find another example of blockquote use in the footnote of "O Captain! My Captain!" Simple blockquotes are simple enough in kramdown:
230
+
231
+ ~~~
232
+ > This is to certify that I, the undersigned, have given the bearer, my servant, full liberty to go to Baltimore, and spend the Easter holidays.
233
+ >
234
+ > Written with mine own hand, &c., 1835.
235
+ > WILLIAM HAMILTON,
236
+ ~~~
237
+
238
+ To use a line break in block elements add two spaces after the end of the line where you want the break. You can't see them after `&c., 1835.` but they are there.
239
+
240
+ Things get a bit complicated when we want to use poetry inside the block or when the block is included in another block element, like a footnote. Here's the last two stanzas from "A Parody" in *Narrative of the Life*, which shows an example of a blockquote of poetry:
241
+
242
+ ~~~
243
+ ...
244
+ > - Two others oped their iron jaws,
245
+ > - And waved their children-stealing paws;
246
+ > - There sat their children in gewgaws;
247
+ > - By stinting negroes' backs and maws,
248
+ > - They kept up heavenly union.
249
+ > ^
250
+ > - All good from Jack another takes,
251
+ > - And entertains their flirts and rakes,
252
+ > - Who dress as sleek as glossy snakes,
253
+ > - And cram their mouths with sweetened cakes;
254
+ > - And this goes down for union.
255
+ {:.poetry}
256
+ ~~~
257
+
258
+ The `{:.poetry}` tag at the end tells the processor to think of the lines above it as poetry. The `{:.poetry}` tag is an example of kramdown class assignments for block-elements. Because this segment of poetry exists in the 'narrative' layout, and because it is part of a blockquote, we need to signal to the processor to process poetry this way, so that the right class is invoked in the stylesheet. Notice also the `^` separating the stanzas. This bit of kramdown syntax helps us separate the stanzas while staying within the blockquote. The good news is this is the most complex kramdown syntax layout you will encounter in Ed.
259
+
260
+
261
+ ## Pages
262
+
263
+ Your editions are treated as [collections](https://jekyllrb.com/docs/collections/) in Ed. Other web pages in your site exist outside the `_texts` folder. The homepage, for example, is constructed from the `index.html` file found on the root folder of your Ed project.
264
+
265
+ You will notice that the homepage in particular has a `.html` file ending instead of a `.md` ending. All template files in Jekyll are HTML, and the index behaves as a template file. Although these files are mostly written in HTML, notice that they still contain YAML front matter and liquid tags. To edit the homepage replace the content on the file shipped with Ed, making sure that your changes to `index.html` are written in valid HTML. The same goes for the template files in the `_layouts` folder.
266
+
267
+ Ed also comes with a search page, `search.html`. This page implements [elastic lunr](http://elasticlunr.com/), "a lightweight full-text search engine in Javascript for browser search and offline search." This simple search page can be useful if you have large collections of texts. If you don't, and don't feel the need, go ahead and delete it along with the `public/js` folder.
268
+
269
+ Besides the homepage and the search page, Ed ships with an About page, `about.md` and a documentation page, `documentation.md`, i.e. this page. As you can see, these are regular `.md` files. You can replace the contents of each file using normal kramdown syntax. This also applies to any new page you create, which you should remember to save with an `.md` extension. When editing the `bibliography.md` file, be careful not to replace the liquid tag that generates your bibliography, unless you don't want to have a bibliography at all.
270
+
271
+ ---
272
+
273
+ ## Tables of Content
274
+
275
+ You will find three kinds of Tables of Content in Ed. The first example is in the list of Sample Texts in the Homepage. This list is generated using the [Liquid Templating language](http://liquidmarkup.org/). This is one of the major components of Jekyll, and I recommend you deepen your knowledge of it if you want to modify the logic that automates much of Ed. Here is the code that generates the Sample Texts list on the homepage:
276
+
277
+ ~~~ html
278
+ <div class="toc">
279
+ <h2>Sample texts</h2>
280
+ <ul class="post">
281
+ {% for item in site.texts %}
282
+ <li class="text-title">
283
+ <a href="{{ site.baseurl }}{{ item.url }}">
284
+ {{ item.title }}
285
+ </a>
286
+ </li>
287
+ {% endfor %}
288
+ </ul>
289
+ </div>
290
+ ~~~
291
+
292
+ As you can see, the liquid tags `{%raw%}{% %}{%endraw%}` and `{%raw%}{{ }}{%endraw%}` are embedded into the HTML. Those with `{%raw%}{% %}{%endraw%}` often use programmatic logic, as is the case here. If you are not already familiar with programming languages, you may need to start elsewhere. I recommend learning Ruby, since this is the language used to build jekyll and jekyll-scholar in the first place (it's also the first programming language I used, so I'm biased). The `{%raw%}{{ }}{%endraw%}` simply pulls data from your project. In the example above it pulls the title from each 'post', i.e. each edited text. As you may have noticed already, we are basically adapting the blogging features of Jekyll to our own ends, what Cuban designer and theorist Ernesto Oroza would call "[technological dissobedience](http://www.ernestooroza.com/)."
293
+
294
+ The second kind of table of content is exemplified in this documentation. If you open the source file for the documentation, you will notice at the top this snippet:
295
+
296
+ ~~~ markdown
297
+ ## Contents
298
+ {:.no_toc}
299
+
300
+ * ToC
301
+ {:toc}
302
+ ~~~
303
+
304
+ This is the kramdown way. The first tag, `{:.no_toc}` tells the processor not to add `## Contents` to the ToC. The second part creates an empty list and then tells the processor to replace it with a table of contents based on headers in the document. You can use this syntax in any page on the site that uses headers.
305
+
306
+ The third way is slightly more involved, but very useful for long texts. If we add the table of contents to the YAML front matter of a page, Ed will activate the optional table of content sidebar (`_includes/sidebar-toc.html`) and move the table of contents to a special sidebar for that page. *Narrative of the Life* uses this method for its table of content. If you would like to replicate this functionality in your own long texts, make sure to use the same syntax:
307
+
308
+ ~~~ yaml
309
+ toc:
310
+ - Title Page
311
+ - Preface
312
+ - Letter From Wendell Phillips
313
+ - Chapter I
314
+ - Chapter II
315
+ ~~~
316
+
317
+ The internal links pointing to the right sections in your document are generated from the title names automatically. In order for the links to work the names on section headings must contain the same words as the section headers. The punctuation and capitalization is irrelevant. If you can figure out how Ed accomplishes this trick, you have graduated from the Ed school of minimal editions.
318
+
319
+ ---
320
+
321
+ ## Bibliographies
322
+
323
+ If you want to include a small bibliography, and you feel it would be easier to write it out directly, Ed can help you render it with hanging indentation. To achieve this effect make sure to use the `.bibliography` class in an ordered list. For example:
324
+
325
+ ~~~ markdown
326
+ 1. Douglass, Frederick et al. Narrative of the Life of Frederick Douglass: An American Slave. Charlottesville, Va.: University of Virginia Library, 1996. Open WorldCat. Web. 17 Apr. 2016.
327
+ 2. Hansberry, Lorraine, and Robert Nemiroff. A Raisin in the Sun. Rep Rei edition. New York: Vintage, 2004. Print.
328
+ {.bibliography}
329
+ ~~~
330
+
331
+ Which should display like this:
332
+
333
+ 1. Douglass, Frederick et al. Narrative of the Life of Frederick Douglass: An American Slave. Charlottesville, Va.: University of Virginia Library, 1996. Open WorldCat. Web. 17 Apr. 2016.
334
+ 2. Hansberry, Lorraine, and Robert Nemiroff. A Raisin in the Sun. Rep Rei edition. New York: Vintage, 2004. Print.
335
+ {:.bibliography}
336
+
337
+ ---
338
+
339
+
340
+ To help us style and generate bibliographies and citations *automatically*, Ed can use the jekyll-scholar gem by [Sylvester Keil](https://github.com/inukshuk/). To learn more about the gem beyond the basic instructions below, make sure to read the documentation on the [jekyll-scholar](https://github.com/inukshuk/jekyll-scholar) GitHub page. Keep in mind, though, that installing jekyll-scholar and working with it may be a bit difficult for beginners.
341
+
342
+
343
+ If you can get over the hurdles, jekyll-scholar can save you enormous amounts of time in the long term for your citation and bibliographic work. To begin, you must move the contents of the `jekyll-scholar starter kit` in your `optional` folder into the root folder. This will effectively replace the original `_config.yml` and `Gemfile` files, and add a `_bibliography` folder, and the `bibliography.md` and `Rakefile` files. To enable jekyll-scholar you must re-run `bundle install` again.
344
+
345
+ If everything goes smoothly, you should be able to start using jekyll-scholar at this point. The first thing you may want to do is provide Jekyll with your own bibliographic information in the form of a `.bib` file to replace the content of the `references.bib` file we've provided in the `_bibliography` folder.
346
+
347
+ To make it easy to create your own version of this file and to keep track of your bibliography for your project, in general I recommend you use [Zotero](http://zotero.org/). To export from Zotero in this format select the references you need from within your Zotero library, right click and select `export in...` and choose the BibLaTeX format. Rename your file to `references.bib` and move it into the `_bibliography` folder. You are, of course, free to create your `references.bib` file using any method you prefer as long as it is a BibTeX file.
348
+
349
+ Because as textual editors we are more likely than not to use citations in footnotes or pages that contain footnotes, and because footnotes will be necessarily generated at the bottom of the page, Ed also needs a separate page for your Bibliography or works cited. This is the role of the `bibliography.md` file. Feel free to edit the sample text, but make sure to leave the following line intact:
350
+
351
+ <pre>
352
+ &#123;% bibliography %&#125;
353
+ </pre>
354
+
355
+ To link your citations to the bibliography page, instead of writing them by hand, you can use the cite function in jekyll-scholar:
356
+
357
+ <pre>
358
+ &#123;% cite cesaire_discourse_2001 %&#125;
359
+ </pre>
360
+
361
+ Here's the breakdown:
362
+
363
+ * `cite` is the jekyllscholar command.
364
+ * `cesaire_discourse_2001` is the unique ID for Césaire's *Discourse on Colonialism* entry included in the reference.bib file.
365
+
366
+ Note that our jekyll-scholar starter kit comes ready for MLA style. To use Chicago style or more advanced citation features, refer to the documentation on jekyll-scholar to make the appropriate changes.
367
+
368
+ **Publishing your site on Github Pages with jekyll-scholar**
369
+
370
+ If you install jekyll-scholar, or most other plugins in Jekyll, you will need a workaround to publish your site on Github Pages, which only runs in 'safe mode.' I've provided a slightly modified version of a `Rakefile` originally created by [Robert Rawlins](https://blog.sorryapp.com/blogging-with-jekyll/2014/01/31/using-jekyll-plugins-on-github-pages.html) that will help you accomplish this task. Once you are ready to publish, switch to your `gh-pages` branch and run the following command `rake ed:publish`.
371
+
372
+ ---
373
+
374
+ ## Tips and Tricks
375
+
376
+ - The folding sidebar menu is generated from the `sidebar.html` file in the `_includes` folder. The top menu items are generated automatically from your pages. The bottom menu items are manually written in HTML. This structure can allow you to add external links. If you don't have that many pages, you may choose to do all the links by hand.
377
+ - For more hand-crafted layouts---such as [the title page in *The Narrative of the Life*]({{ site.baseurl }}/texts/narrative/index.html#title-page)---you may choose to work directly with HTML. One of the great advantages of working with the kramdown processor is that we have a lot of flexibility to mix HTML with the kramdown syntax. Note though, that even in the case of the title page, you can achieve these effects using kramdown syntax.
378
+ - Make sure to add horizontal rules, `---`, to separate sections in your texts. This creates a more pleasant layout.
379
+ - You can clean unnecessary folders and files from the original Ed package before publishing your site. This will help you reduce overhead. For example, you can erase this page, the sample texts and the `syntax.css` file (used for styling code).
380
+ - Consider providing tips for your readers on how to make their font bigger or smaller by taking advantage of <kbd>Command</kbd> + <kbd>+</kbd> and <kbd>Command</kbd> + <kbd>-</kbd>. Or returning to the top of the page using <kbd>Command</kbd> + <kbd>Up Arrow</kbd>. Part of the philosophy behind Ed is to avoid duplicating features that are already easily available in most web ecosystems.
381
+ - If you want to allow annotations on your site, consider providing a `via.hypothes.is` link. Our sample site can be annotated, for example, using the following link: `https://via.hypothes.is/http://elotroalex.github.io/ed/`, which readers can access on the sidebar. Once you've indicated your own URL in the config file, the link will update automatically. Make sure to visit [hypothes.is](https://hypothes.is/) to learn more.
382
+ - Ed includes metadata in the headers that makes it easier for users of Zotero, and other systems to grab bibliographic information for the site and individual texts. Our metadata functionality may not be enough to generate a full proper citation. Consider providing visible citation information in your about page or homepage.
383
+ - Make sure to deepen your knowledge of the building blocks of Ed: Jekyll, YAML and Liquid. A great list of resources can be found in the blog "[Jekyll for Web Designers](http://jameswillweb.github.io/jekyll-for-designers/resources.html)".
384
+ - Our base themes Poole/Lanyon allow for easily customization of the interface. You can, for example, switch the position of the sidebar, change the theme colors and overlay options. To learn more check out the [Lanyon documentation](https://github.com/poole/lanyon#themes), and make sure to try the green, `.theme-base-0b`, it's really nice.
385
+
386
+ ---
387
+
388
+ ## Publishing: A UNIX server
389
+
390
+ Publishing and Ed edition can be done in one of two ways. One way is to host it on a server you rent, own or have access to. Most mortals pay a hosting provider to host their sites. I recommend [Reclaim Hosting](https://reclaimhosting.com/), which is run by scholars for scholars. If you are affiliated with a university, chances are that your institution provides you with a UNIX account and a bit of server space. Since Jekyll generates a full static site for you, that means you can park it there too. To do so you need to build the site first. If you have been keeping your eye on your project by using `jekyll serve`, chances are you have a current built site in your project folder labelled `_site`.
391
+
392
+ If you don't already, you can build one easily by using the following Jekyll command:
393
+
394
+ ~~~ bash
395
+ $ jekyll build
396
+ ~~~
397
+
398
+ Or, again, if you have multiple environments:
399
+
400
+ ~~~ bash
401
+ $ bundle exec jekyll serve
402
+ ~~~
403
+
404
+ Using an FTP client like [Filezilla](https://filezilla-project.org/), or [SSH on your terminal](https://www.siteground.com/tutorials/ssh/), you need to push the contents of the `_site` folder to the folder on your server where you would like your project to exist. Depending on your host provider, you may be able to receive help from the sys admins with this step.
405
+
406
+ Please refer to the [note below on base urls](#a-note-on-your-base-url) to make sure your new links work on your new site.
407
+
408
+ ## Publishing: GitHub pages
409
+
410
+ The second option is to publish your site for free on GitHub Pages.
411
+ Whether you decide to publish on GitHub pages or not, we recommend that you still use git and GitHub to version your edition and make the data available via another channel other than your webpage. This is one of the great advantages of using our system, increasing the chances of survival of your work and opening new audiences for it.
412
+
413
+ If you do decide to use the GitHub pages option, please make sure to read the [note below on base urls](#a-note-on-your-base-url).
414
+
415
+ To publish on GitHub pages, you must have a copy of the repository in GitHub. That means you also need an account there. Once you've created the repository that you will use, you must link your local repository to the one on GitHub. Notice that because you cloned the original source files from my repository, it will be linked to my repository (to which you don't have writing privileges) until you do this step. Instructions for changing the remote URL can be found [here](https://help.github.com/articles/changing-a-remote-s-url/).
416
+
417
+ You also need to create a different git branch called `gh-pages` within your local repository for your site. This is the branch that will get published by GitHub. To create and use that branch use the following command:
418
+
419
+ ~~~ bash
420
+ $ git checkout -b gh-pages
421
+ ~~~
422
+
423
+ Once you are using that branch, you are ready to publish your site. To do so use simply push the gh-pages branch to github:
424
+
425
+ ~~~ bash
426
+ $ git push origin gh-pages
427
+ ~~~
428
+
429
+ You can now access your site using an address that looks like `http://your-username.github.io/your-project-name`. The sample page for Ed, for example, is hosted at [elotroalex.github.io/ed](http://elotroalex.github.io/ed).
430
+
431
+ **<span id="a-note-on-your-base-url">A note on your base url</span>**
432
+
433
+ When you publish on a subfolder—automatic on GitHub pages—many of your links will break unless you indicate the name of your sub-folder in the `baseurl` value in your `_config.html` file. In addition, you need to make sure that your site-wide links (your links to your CSS files, for example) are preceded by the `{{ site.baseurl }}` tag. The base Ed install already uses this system, so you can simply replace the value `/ed` in your `baseurl` to `/your-project-slug`.
434
+
435
+ If on the other hand you are running your site on a root folder, simply erase `/ed`, but do make sure to leave the single quotes:
436
+
437
+ ~~~ yaml
438
+ baseurl: ''
439
+ ~~~
440
+
441
+ ---
442
+
443
+ That should do it. If you have suggestions on how to improve Ed, make sure to leave us a line on [our issues page](https://github.com/elotroalex/ed/issues), or send us a pull request.
444
+
445
+ Happy editing!
446
+
447
+ Alex Gil
448
+ April 2016