Closed mwillumz closed 7 years ago
I'm still working on the documentation, and the problem of relative links is a very tricky one. Not all Hugo themes are friendly to relative links, and Hugo itself seems to be in favor of absolute links, which is something I don't like.
Anyway, you have two choices:
relativeurls = true
to config.toml (or equivalently relativeurls: yes
in config.yaml
); again, it is up to your Hugo theme whether relative links are well supported. Then the public
directory can be moved to the www
directory of a shiny app. But actually I don't see the point of serving a static website through Shiny.baseurl
in config.toml/yaml and build the site with blogdown:::hugo_cmd()
. The problem is whether baseurl
is fixed. For example, in a local Shiny app, the base URL can be random like http://127.0.0.1:xxxx where xxxx is a random port.If you want to include Shiny apps in your website, I strongly recommend that you publish the app elsewhere instead of hosting the whole website as an app (Shiny was not designed as a web server primarily). For example, if you publish to ShinyApps.io, you can use knitr::include_app()
to embed the app on a web page.
Thanks for your prompt reply. This is good guidance.
I'm curious whether there'll be support for shiny apps. I tried copying the public directory to a shiny server. The blog sorta rendered but relative links seemed broken and couldn't run a basic shiny app.
Just curious. I've been starving for this and am already migrating away from Jekyll. Thanks!