Skip to content

render_site (how to hardcode images) #2563

Open

Description

@ChenDepp

hi everyone:
I use render_site to generate my html website but I want to include all dependencies in the html, can you tell me how to achieve it?
waiting for your reply, have a good day!

Activity

  1. uzsolt commented on Jul 19, 2025

    @uzsolt
    Contributor

    The html_document() has self_contained option - maybe can try it.

  2. cderv commented on Jul 25, 2025

    @cderv
    Collaborator

    Yes, this should work, though it will create a very heavy website. The advantage of a website is to have shared dependencies, with .html in a folder and a common libs path accessed by all .html.

    If every HTML is self-contained, each file will be very heavy.

    This is not common usage so I don't know if there is side effect, you could try it.

    Out of curiosity, why do you want all deps to be included? If you do a website, you will have several html files anyway, so you'll need to deploy a folder. Why not deploy the lib folder with the other files ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions