MOREL
MOREL generates web sites from bibliographic collections. The MOREL sites gather book covers, excerpts, bibliographic clues, metadata and digital downloads from items stored in the Zotero reference manager.
Works are organized by dynamic lists, which automatically group the works according to common characteristics:
- authors
- city of publication
- imprint or publisher
- nationality of authors
- edition date
- digital repository.
MOREL also has a search engine that allows you to find works directly.
Instructions to install the theme
Prerequisites
-
Zotero: Install Zotero reference management software from the official website and create collections to organize your content.
-
Python: Install Python programming language from the official Python website based on your operating system. Ensure you have Python version 3.x installed.
-
Jekyll: Install Jekyll, a static site generator, using your preferred method:
- For macOS or Linux, open a terminal and run the following command:
$ gem install bundler jekyll
- For Windows, follow the installation guide provided on the Jekyll website.
- For macOS or Linux, open a terminal and run the following command:
Basic
- Fork the repository. That is, create a copy in your Github account (alternatively, clone the repository. If you choose this option, skip steps 2 and 3).
- Open your system’s terminal in the folder on your local computer where you will be working on the site. Mac and Linux have native terminals. For Windows, you will have to use WLS.
- Run
$ git clone http://github.com/[your_username]/morel-site-generator
to clone the forked repository to your desktop. - Run
$ cd morel-site-generator
to move to the repository folder - Run
$ bundle install
to install the theme and its dependencies. If you don’t have Ruby on your system, follow the instructions in Jekyll - Run
ruby dev.rb
(alternatively, deletefebr3s.github.io/morel-theme-generator
from theremote_theme:
line in_config.yml
) - Run
ruby serve-local.rb
(alternatively,$ bundle exec jekyll serve --config _config.yml,_config_local.yml --livereload
) to run the test site.
Customize
Now you have on your local computer a ready-made site with sample content, from the MOREL site Afro Latin American Writers in Translation (ALAWiT). You can run it locally to test with $ bundle exec jekyll serve --config _config.yml,_config_local.yml --livereload
.
To fill it with your site’s information, follow these steps:
- Open _config.yml in your text editor and change:
- The
title
to your site’s. - The
tagline
to your site’s. - The
email
and/or social media accounts to your site’s. - The
jotform
link (create your free account at https://www.jotform.com/).
- The
- Open the file
_abouts/site-description.md
and write a description for your site. The<!-- more -->
line splits what is shown on the footer of all your pages from what is shown both in the footer and only on theabout
page. For this to work you have to complete the final step of this section - Replace the logo, pattern and avatar files by adding a file to:
assets/img/tema/logo.png
assets/img/tema/avatar.jpg
assets/img/tema/trama.png
- Open the
podcast.md
file and change the title and tagline of your podcast or blog. - The
_posts
folder has the MOREL posts. Delete the MOREL posts and create your own with Jekyll nomenclature. If you don’t want to add any podcast posts or episodes to your site, change in_config.yml
thepodcast
value tofalse
- Run the site locally with
ruby serve-local.rb
(alternatively,$ bundle exec jekyll serve --config _config.yml,_config_local.yml --livereload
) - Open the
_site
folder and copy the filesite-description.html
to the_includes
folder - Open the
about.md
file and delete the line{% include_relative README.md %}
Generating the content from Zotero
Extracting data and scripts
- Run
$ jekyll build --config _config_local.yml
to import to the_sites
folder the updated content generators. - Run
$ unzip -d ./assets/ ./_site/assets/env.zip
to update the Python environment that generates the contents. - Open Zotero and review the guide at the end of this instructions to make the fields 100 % readable for MOREL.
- Export your Zotero collection as
csv
. If you don’t know how to do it follow the instructions here. - Name your
csv
file asbooks_zotero.csv
. Replace the file of the same name found in theassets/data
folder.
Using Python to generate content
- Make sure that you have the requirements on your system
- Install pip if you don’t have it
- Run
$ cd assets/env/bin
to go to the folder where the Python environment is activated. Activate it with$ source activate
. - Run
$ cd ../src
to move to the folder where the Python scripts are located. - Run
$ python3 morel-generate.py
to generate the content from your Zotero collection. In some operating systems, the command might vary. Check the Python documentation for guidance - Run
cd ../../..
to go to the root folder of the site - Run
rm ./assets/env
to remove the python environment until the next update. Alternatively, delete the folder using the explorer. - Run
$ bundle exec jekyll serve --config _config.yml,_config_local.yml --livereload
to activate the local server for browsing. - Open the browser and go to the link provided by the local server (usually it’s http://127.0.0.1:4000).
- Browse your custom site!
Deploy
- Run
$ ruby prod.rb
(alternatively, addfebr3s.github.io/morel-theme
to theremote_theme
line:) - To publish to Github, follow their instructions (ignore the “New repository” step as you are working with your MOREL fork).
- To publish with a third party, follow Jekyll’s instructions.
- To publish to your personal server follow Jekyll’s instructions.
Zotero fields
MOREL items are added in the same way that items are added in any Zotero library. In its current version, MOREL can only process items of type book
. Since not all the fields needed for MOREL are available for the book
content type, some considerations must be made:
Nonexistent fields
- Excerpt: the fragment from each MOREL record corresponds to the
notes
of Zotero (see the [documentation] of the notes (https://www.zotero.org/support/notes) of Zotero). In its current version, MOREL only accepts one excerpt per book. - Cover: the cover is a jpg file that is added as an
attachment
to the Zotero item (see the Zotero attachments documentation).
Tweaked fields
- Series: in order to filter translated books from originals, MOREL uses Zotero’s
Series
field to indicate whether it is a translation with thetr
sign. - Series Number: in order to filter featured content from regular content, MOREL uses Zotero’s
Series Number
field to indicate whether it is featured content with thefc
sign. - Date / Edition: MOREL uses the
Date
field for the date of publication of the book and theEdition
field for the date of first edition. - Extra: MOREL uses the
Date
field for the place of birth and/or nationality of the author.
Tweaked fields for downloads
- URL: if there is a dowload available, add the direct link here. You can also upload a backup to archive.org and add the direct link to the archive.org download here
- Archive: Name of the repository where you found the download originally. For example, Cervantes Virtual
- Loc. in Archive: url to the repository where you found the download originally. For example, https://www.cervantesvirtual.com/
- Library Catalog: direct link to the page on worldcat.org with the library information of the title. For example, https://www.worldcat.org/title/poesias-completas-de-placido-gabriel-de-la-concepcion-valdes/oclc/10013286/editions?referer=di&editionsView=true