Skip to content
Discussion options

You must be logged in to vote

Here is what you can do using JavaScript and adding attributes to your featured image.

quarto create project blog

I edited one post:

---
title: "Welcome To My Blog"
author: "Tristan O'Malley"
date: "2024-11-16"
categories: [news]
include-after-body:
  - text: |
      <script>
      document.addEventListener("DOMContentLoaded", function() {
        const images = document.querySelectorAll('img[data-credits]');

        images.forEach(image => {
          const creditsText = image.getAttribute('data-credits');
          if (creditsText) {
            const creditsDiv = document.createElement('div');
            creditsDiv.textContent = creditsText;
            creditsDiv.style.position = 'a…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@aksharasoman
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by mcanouil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants