Coder Social home page Coder Social logo

Comments (4)

cboettig avatar cboettig commented on July 21, 2024 1

@amoeba Google's structured data validation tool sees it anywhere in the file, don't think it has to be in the <head>. I like the the Rmd template strategy! Perhaps one could just use the includes option to point to the JSON-LD text, though I guess you'd need to wrap it in a <script type="application/ld+json> thing first...

A light-weight version of the latter could certainly be the citation option like @khondula suggested in #57

from dataspice.

cboettig avatar cboettig commented on July 21, 2024

Great idea! How would Rmd output format work? I might imagine something like asking the user to add a command like

  embed_spice()

to their .Rmd, which would create either stand-alone html or png (think htmlwidgets::saveWidget() or webshot::webshot() for png) into the md output? Not sure how useful that would be. It could work for displaying a concise card format with some metadata (obviously the .png is the polar opposite of a machine-readable version of metadata, but we already have the dataspice.json for that...)

Alternately, maybe you are envisioning something rather more 'raw', i.e. a pure markdown text + links version of the data. One spin on that would be something like cite_spice(), which would give Markdown-formatted text output with the essential bibliographic information (i.e. authors, title, publication date, and link to the overall dataset url or identifier).

from dataspice.

amoeba avatar amoeba commented on July 21, 2024

Yeah I'm not totally sure. More the latter? The Rmd could be in place of an index.html which could then be rendered into other formats as needed or modified after-the-fact with more R code / figures as desired.

  • Multiple simultaneous outputs: build_site() -> { docs/index.html, docs/index.Rmd
  • Give the user a build_site() to build HTML and another function for a nearly equivalent Rmd?

One pain point would be inserting the JSON-LD into the HTML. I'm not sure if it has to be in the <head> tag or not for Google to see it. It's technically possible but I haven't worked out an implementation just yet. Possibly just an Rmd HTML template would be enough.

from dataspice.

rubenarslan avatar rubenarslan commented on July 21, 2024

See also my approach using rmd partials in codebook.

from dataspice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.