r-lib / pkgdown

Generate static html documentation for an R package
https://pkgdown.r-lib.org/
Other
714 stars 335 forks source link

Package documentation in subdirectory of github.io? #431

Closed markusdumke closed 6 years ago

markusdumke commented 6 years ago

How can I create the package documentation as a subdirectory of my existing github.io website? For example I want to have myname.github.io/packageA for the package documentation of one package and myname.github.io/packageB for another package. How do I tell Github to build this websites? Any help appreciated :)

jayhesselberth commented 6 years ago

You already have it active for the reinforcelearn package.

https://markdumke.github.io/reinforcelearn/

I recommend adding that URL to the package info on the main Github page, click the "Edit" button.

If you want to have a page for a different package, create a new repo for that package and select "master branch /docs folder" for the source under Github Pages in the Settings.

markusdumke commented 6 years ago

Ah ok, thanks :) I probably should have waited a few more minutes because it didn't show when I looked last.

jayhesselberth commented 6 years ago

If you reformat your README.Rmd, the badges will be pulled out correctly into the sidebar under "Dev status".

Remove the include_graphics chunk, the ## Reinforcment ... header, and the ---- spacer. Replace with:

# Reinforcement Learning in R <img src="reinforcelearn.png" align="right" height="36"/>

Possibly related to #386

markusdumke commented 6 years ago

Can I use message = FALSE for the reference examples?

jayhesselberth commented 6 years ago

No, message = FALSE is a knitr chunk option, but the examples are not rendered using knitr.

I assume you're concerned about the verbose example output in e.g. https://markdumke.github.io/reinforcelearn/reference/qSigma.html.

You can reduce some of the verbosity by wrapping specific calls with suppressMessages in the examples.