Tutorial 2: Mirador as a personal research tool
Participants will learn how to complete your own Mirador install, the benefits of doing so, and how to customize common configuration options that researchers use.

Installing Mirador

  • From the Mirador website (https://projectmirador.org) you could click the "Code" link in the upper right-hand corner
  • This would take you to a Github project, which might seem a little confusing at first - particularly if you're not used to navigating code repositories.
  • For the purposes of this tutorial, we're going to use the last production release (Mirador 2.7.0), so the direct link to use is: https://github.com/ProjectMirador/mirador/releases/tag/v2.7.0
Mirador 2.7.0 Download Page
Mirador continues to be updated regularly. The project is currently in Beta for Mirador version 3. While there are some great improvements to the project in version 3, not all of the version 2 features have been moved over. We hope to see a production release of version 3 in the year ahead.
  • From the Mirador 2.7.0 download page, download the "build.zip" file.
  • Unzip and you should have a folder entitled "build" containing an "example.html" file and a folder entitled "mirador"
  • The "mirador" folder contains all of the code and additional material that makes Mirador work under the hood. If you're interested in that code, by all means dig in. For our purposes today, though, we are only going to work with the "example.html" file.
  • At this point, though, you have Mirador installed. Let's open the "example.html" file in a browser and you'll see something that looks like this:
Mirador's example.html file opened in the browser
For the rest of this tutorial, we are going to be editing HTML in a text editor. NB: This is different from a word processor, like Microsoft Word, and allows us to edit and save code without any additional formatting. A list of common, free, text editors can be found at the bottom of this tutorial.

Configuring Mirador

First, make a copy of the "example.html" file - maybe naming it "test.html" - and save in the same "build" folder. We'll use this "test.html" file to see how small changes in the code impact Mirador - but we won't worry about messing up our main "example.html" file in the process.
For this part of the tutorial, we'll walk through how small changes in the HTML file impact the layout and content in our local Mirador instance. We will explore:
  • how to specify the number of workspace windows that are open by default
  • how to change what pre-loaded content is saved and available
Basic configuration options we will cover:
  • layout: number of windows in the Mirador workspace
  • data: the list of manifests that populate the load window
  • windowObjects: how to add content to windows in the workspace so that they open pre-populated

Layout

1
layout: "1x1",
Copied!
  • This option specifies the number of rows, and windows per row, that Mirador has open by default.
    • "1 x 1" is a single window
    • "2 x 3" would give you two rows, each with three windows - as an example

Data

1
data: [
2
{ manifestUri: "https://purl.stanford.edu/bz689hb4817/iiif/manifest", location: "Stanford University"},
3
{ manifestUri: "https://iiif.lib.harvard.edu/manifests/ids:20245835", location: "Harvard University"}
4
],
Copied!
  • Here, we list the manifests for each object we want available in our load window. The most important part is the manifestUri (the URL of the IIIF manifest for the object), with location being a text string that you can determine for your own context.

WindowObjects

1
windowObjects: [
2
{
3
"loadedManifest": "https://purl.stanford.edu/bz689hb4817/iiif/manifest",
4
"viewType" : "ImageView",
5
"canvasID": "https://purl.stanford.edu/bz689hb4817/iiif/canvas/image_1",
6
"bottomPanel" : false
7
//"sidePanel" : false,
8
//"availableViews" : ['ThumbnailsView', 'ImageView', 'BookView']
9
//"overlay" : false
10
}
11
],
Copied!
  • This specifies the content that will appear in the workspace window (or windows) when Mirador is first opened. The main elements are:
    • which manifest to load
    • which canvas (or page, or image) within that manifest to display
    • which kind of view to start with
Once we have mastered these three elements, we can build fairly complicated displays pulling in content from around the world.
Within our "build" folder, it is possible to have many .html files for various projects, examples, teaching tools, etc.

Creating your own Replayable Collection

  1. 1.
    Add the manifests you want from a variety of sources
  2. 2.
    Configure how you want Mirador to open
  3. 3.
    In the example below, I have added manifests from five different repositories for manuscripts containing Dante's Divine Comedy. I have also used the "openManifestsPage" property to force the load window to appear first, instead of a viewing window.
1
<html>
2
<head>
3
<meta charset="utf-8">
4
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
5
<link rel="stylesheet" type="text/css" href="mirador/css/mirador-combined.css">
6
<title>Mirador Viewer</title>
7
<style type="text/css">
8
#viewer {
9
width: 100%;
10
height: 100%;
11
position: fixed;
12
}
13
</style>
14
</head>
15
<body>
16
<div id="viewer"></div>
17
18
<script src="mirador/mirador.min.js"></script>
19
<script type="text/javascript">
20
21
$(function() {
22
myMiradorInstance = Mirador({
23
id: "viewer",
24
layout: "1x1",
25
openManifestsPage: true,
26
buildPath: "mirador/",
27
data: [
28
{ manifestUri: "https://purl.stanford.edu/bz689hb4817/iiif/manifest", location: "Stanford University"},
29
{ manifestUri: "https://iiif.lib.harvard.edu/manifests/ids:20245835", location: "Harvard University"},
30
{ manifestUri: "https://iiif.lib.harvard.edu/manifests/ids:20245836", location: "Harvard University"},
31
{ manifestUri: "https://gallica.bnf.fr/iiif/ark:/12148/btv1b10500687r/manifest.json", location: "BNF"},
32
{ manifestUri: "https://gallica.bnf.fr/iiif/ark:/12148/btv1b84268074/manifest.json", location: "BNF"},
33
{ manifestUri: "https://gallica.bnf.fr/iiif/ark:/12148/btv1b52507492w/manifest.json", location: "BNF"},
34
{ manifestUri: "https://gallica.bnf.fr/iiif/ark:/12148/btv1b52507451s/manifest.json", location: "BNF"},
35
{ manifestUri: "https://gallica.bnf.fr/iiif/ark:/12148/btv1b52507439j/manifest.json", location: "BNF"},
36
{ manifestUri: "https://gallica.bnf.fr/iiif/ark:/12148/btv1b525074561/manifest.json", location: "BNF"},
37
{ manifestUri: "https://gallica.bnf.fr/iiif/ark:/12148/btv1b52000462v/manifest.json", location: "BNF"},
38
{ manifestUri: "https://gallica.bnf.fr/iiif/ark:/12148/btv1b55013333r/manifest.json", location: "BNF"},
39
{ manifestUri: "https://digi.vatlib.it/iiif/MSS_Ross.487/manifest.json", location: "BAV"},
40
{ manifestUri: "https://digi.vatlib.it/iiif/MSS_Urb.lat.365/manifest.json", location: "BAV"},
41
{ manifestUri: "https://digi.vatlib.it/iiif/MSS_Urb.lat.367/manifest.json", location: "BAV"},
42
{ manifestUri: "https://digi.vatlib.it/iiif/MSS_Borg.lat.338/manifest.json", location: "BAV"},
43
{ manifestUri: "https://digi.vatlib.it/iiif/MSS_Borgh.365/manifest.json", location: "BAV"},
44
{ manifestUri: "https://digi.vatlib.it/iiif/MSS_Cappon.263/manifest.json", location: "BAV"},
45
{ manifestUri: "https://digi.vatlib.it/iiif/MSS_Cappon.266/manifest.json", location: "BAV"},
46
{ manifestUri: "https://digi.vatlib.it/iiif/MSS_Urb.lat.378/manifest.json", location: "BAV"},
47
{ manifestUri: "https://www.e-codices.unifr.ch/metadata/iiif/fmb-cb-0057/manifest.json", location: "e-codices"},
48
{ manifestUri: "https://www.e-codices.unifr.ch/metadata/iiif/fmb-cb-0056/manifest.json", location: "e-codices"},
49
{ manifestUri: "https://www.e-codices.unifr.ch/metadata/iiif/fmb-cb-0055/manifest.json", location: "e-codices"}
50
],
51
windowObjects: [],
52
annotationEndpoint: {
53
name:"Local Storage",
54
module: "LocalStorageEndpoint" }
55
});
56
});
57
</script>
58
</body>
59
</html>
60
Copied!

Getting Fancy

If you want to guide a viewer into your content, the example below might be of some help. It is basically the same file as above, used for the Dante Collection example, but with a few configuration tweaks:
  • I have removed the "openManifestsPage" configuration, and set "layout" to be "1x3". This forces Mirador to open with three windows.
  • I have also added three "windowObjects" so that the instance is populated by three objects: the front and back of one of the Harvard Dante leaves, and the Stanford Dante leaf.
1
<html>
2
<head>
3
<meta charset="utf-8">
4
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
5
<link rel="stylesheet" type="text/css" href="mirador/css/mirador-combined.css">
6
<title>Mirador Viewer</title>
7
<style type="text/css">
8
#viewer {
9
width: 100%;
10
height: 100%;
11
position: fixed;
12
}
13
</style>
14
</head>
15
<body>
16
<div id="viewer"></div>
17
18
<script src="mirador/mirador.min.js"></script>
19
<script type="text/javascript">
20
21
$(function() {
22
myMiradorInstance = Mirador({
23
id: "viewer",
24
layout: "1x3",
25
buildPath: "mirador/",
26
data: [
27
{ manifestUri: "https://purl.stanford.edu/bz689hb4817/iiif/manifest", location: "Stanford University"},
28
{ manifestUri: "https://iiif.lib.harvard.edu/manifests/ids:20245835", location: "Harvard University"},
29
{ manifestUri: "https://iiif.lib.harvard.edu/manifests/ids:20245836", location: "Harvard University"},
30
{ manifestUri: "https://gallica.bnf.fr/iiif/ark:/12148/btv1b10500687r/manifest.json", location: "BNF"},
31
{ manifestUri: "https://gallica.bnf.fr/iiif/ark:/12148/btv1b84268074/manifest.json", location: "BNF"},
32
{ manifestUri: "https://gallica.bnf.fr/iiif/ark:/12148/btv1b52507492w/manifest.json", location: "BNF"},
33
{ manifestUri: "https://gallica.bnf.fr/iiif/ark:/12148/btv1b52507451s/manifest.json", location: "BNF"},
34
{ manifestUri: "https://gallica.bnf.fr/iiif/ark:/12148/btv1b52507439j/manifest.json", location: "BNF"},
35
{ manifestUri: "https://gallica.bnf.fr/iiif/ark:/12148/btv1b525074561/manifest.json", location: "BNF"},
36
{ manifestUri: "https://gallica.bnf.fr/iiif/ark:/12148/btv1b52000462v/manifest.json", location: "BNF"},
37
{ manifestUri: "https://gallica.bnf.fr/iiif/ark:/12148/btv1b55013333r/manifest.json", location: "BNF"},
38
{ manifestUri: "https://digi.vatlib.it/iiif/MSS_Ross.487/manifest.json", location: "BAV"},
39
{ manifestUri: "https://digi.vatlib.it/iiif/MSS_Urb.lat.365/manifest.json", location: "BAV"},
40
{ manifestUri: "https://digi.vatlib.it/iiif/MSS_Urb.lat.367/manifest.json", location: "BAV"},
41
{ manifestUri: "https://digi.vatlib.it/iiif/MSS_Borg.lat.338/manifest.json", location: "BAV"},
42
{ manifestUri: "https://digi.vatlib.it/iiif/MSS_Borgh.365/manifest.json", location: "BAV"},
43
{ manifestUri: "https://digi.vatlib.it/iiif/MSS_Cappon.263/manifest.json", location: "BAV"},
44
{ manifestUri: "https://digi.vatlib.it/iiif/MSS_Cappon.266/manifest.json", location: "BAV"},
45
{ manifestUri: "https://digi.vatlib.it/iiif/MSS_Urb.lat.378/manifest.json", location: "BAV"},
46
{ manifestUri: "https://www.e-codices.unifr.ch/metadata/iiif/fmb-cb-0057/manifest.json", location: "e-codices"},
47
{ manifestUri: "https://www.e-codices.unifr.ch/metadata/iiif/fmb-cb-0056/manifest.json", location: "e-codices"},
48
{ manifestUri: "https://www.e-codices.unifr.ch/metadata/iiif/fmb-cb-0055/manifest.json", location: "e-codices"}
49
],
50
windowObjects: [
51
{
52
"loadedManifest": "https://purl.stanford.edu/bz689hb4817/iiif/manifest",
53
"viewType" : "ImageView",
54
"canvasID": "https://purl.stanford.edu/bz689hb4817/iiif/canvas/image_1",
55
"bottomPanel" : false
56
//"sidePanel" : false,
57
//"availableViews" : ['ThumbnailsView', 'ImageView', 'BookView']
58
//"overlay" : false
59
},
60
{
61
"loadedManifest": "https://iiif.lib.harvard.edu/manifests/ids:20245835",
62
"viewType" : "ImageView",
63
"canvasID": "https://iiif.lib.harvard.edu/manifests/ids:20245835/canvas/canvas-20245835.json",
64
"bottomPanel" : false
65
//"sidePanel" : false,
66
//"availableViews" : ['ThumbnailsView', 'ImageView', 'BookView']
67
//"overlay" : false
68
},
69
{
70
"loadedManifest": "https://iiif.lib.harvard.edu/manifests/ids:20245836",
71
"viewType" : "ImageView",
72
"canvasID": "https://iiif.lib.harvard.edu/manifests/ids:20245836/canvas/canvas-20245836.json",
73
"bottomPanel" : false
74
//"sidePanel" : false,
75
//"availableViews" : ['ThumbnailsView', 'ImageView', 'BookView']
76
//"overlay" : false
77
}
78
],
79
annotationEndpoint: {
80
name:"Local Storage",
81
module: "LocalStorageEndpoint" }
82
});
83
});
84
</script>
85
</body>
86
</html>
Copied!

Next Steps

You can continue to build out your own collections and displays locally, for your own research purposes. If you want to share these with a broader audience, you'll need to install Mirador on a web server. That is beyond the scope of today's tutorial, but if you want to pursue this you can reach out to the IIIF and Mirador communities for tips and pointers.

Resources

For more information

Text Editors (a small sampling)

Last modified 1yr ago