You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Evan Williamson helped me create an item display template for internet archive-hosted books while at Learn@DLF. I'm posting the blocks of code we made here in case others are interested :) Please note that this template works for collection-builder-csv.
First, set the object_location field in your metadata csv file to the stable Internet Archive link to your object. I.e., https://archive.org/details/<your object's IA id>
Next, set the display_template field for any IA-hosted objects to "archive_reader"
Archive Reader for Parent Objects or non-compound objects
Navigate to the _includes directory and find the item folder. Create a new file in the child folder called archive_reader.md. Paste the following code into the file:
`<!-- embeds an IA book reader object for a parent or non-compound object :) -->
{% assign archive_id = page.object_location | split: '/' | last %}
<div class="ratio" style="--bs-aspect-ratio: 115%;">
<iframe src="https://archive.org/embed/{{ archive_id }}" width="560" height="384" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen></iframe>
</div>`
Archive Reader for Child Objects
Navigate to the _includes directory and find the item folder and click into the child subdirectory. Create a new file in the child folder called archive_reader.md. Paste the following code into the file:
`<!-- embeds an IA book reader object for a child item of a parent item :) -->
{% assign archive_id = child.object_location | split: '/' | last %}
<div class="ratio" style="--bs-aspect-ratio: 115%;">
<iframe src="https://archive.org/embed/{{ archive_id }}" width="560" height="384" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen></iframe>
</div>`
I haven't tested the non-compound/parent object embed yet, so if that's breaking please let me know!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Evan Williamson helped me create an item display template for internet archive-hosted books while at Learn@DLF. I'm posting the blocks of code we made here in case others are interested :) Please note that this template works for collection-builder-csv.
First, set the object_location field in your metadata csv file to the stable Internet Archive link to your object. I.e., https://archive.org/details/<your object's IA id>
Next, set the display_template field for any IA-hosted objects to "archive_reader"
Archive Reader for Parent Objects or non-compound objects
Navigate to the _includes directory and find the item folder. Create a new file in the child folder called archive_reader.md. Paste the following code into the file:
Archive Reader for Child Objects
Navigate to the _includes directory and find the item folder and click into the child subdirectory. Create a new file in the child folder called archive_reader.md. Paste the following code into the file:
I haven't tested the non-compound/parent object embed yet, so if that's breaking please let me know!
Beta Was this translation helpful? Give feedback.
All reactions