You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: online documentation with pkgdown or similar #78
I started to change roxygen docs to markdown when I touch some doc. A mix of old latex-style and markdown roxygen comments (per function) works fine (using the #' @md roxygen tag), and I expect that this may help with pkgdown as well.
As far as I understand, articles (or webpages) created with pkgdown would reside in a subfolder of the same repository, but they will not be built and packaged into the installable hyperSpec, and thus will not be installed on the end user machine. They would be a subject to a separate build process. They would not be checked on CRAN, and thus could not be a reason for a package removal.
So, to ensure consistency, the article built with pkgdown should be checked by their writers and by the continuous integration system on a regular basis.
So, to ensure consistency, the article built with pkgdown should be checked by their writers and by the continuous integration system on a regular basis.
Only a few setup files should be added for pkgdown website. Besides this, it is automatically created form the materials in the package: basically, from README.md file, Rd files, and vignettes (.Rmd files). So the maintenance of these files equals the maintenance of the contents of the website.
They would be a subject to a separate build process.
It could be easily automated with "GitHub actions" which is a free service for open-source projects and integrated with GitHub. To create an appropriate setup with standard pkgdown build procedures is as easy as
usethis::use_github_action("pkgdown")
The website could be automatically rebuilt every time when, e.g., the main branch is updated.
Problem.
But the structure of the package should be appropriate. This is one of the reasons why I started to translate vignettes to Rmd. We should discuss more on this topic (unfortunately, I'm quite busy these days and will have more time for this in a few weeks).
continuous integration system
I suggest using GitHub actions for continuous integration (CI), and appropriate setup could be made by one of these options:
Following the above discussion I applied pkgdown to hyperSpec.skeleton:
install.packages("pkgdown")
also installing the dependency 'highlight'
The downloaded binary packages are in
/var/folders/4_/gg3mjn693bz4v5w1sxh71rtc0000gp/T//RtmpFMJVnd/downloaded_packages
library(pkgdown)
library(devtools)
Loading required package: usethis
Attaching package: 'devtools'
The following object is masked from 'package:pkgdown':
build_site
usethis::use_github_action("pkgdown")
v Setting active project to '/Users/erickoduniyi/Documents/Projects/open-source/hyperspec/hyperSpec.skeleton'
v Creating '.github/'
v Adding '^\\.github$' to '.Rbuildignore'
v Adding '*.html' to '.github/.gitignore'
v Creating '.github/workflows/'
v Writing '.github/workflows/pkgdown.yaml'
pkgdown::build_site()
-- Installing package into temporary library -----------------------------------
== Building pkgdown site =======================================================
Reading from: '/Users/erickoduniyi/Documents/Projects/open-source/hyperspec/hyperSpec.skeleton'
Writing to: '/Users/erickoduniyi/Documents/Projects/open-source/hyperspec/hyperSpec.skeleton/docs'
-- Initialising site -----------------------------------------------------------
-- Building home ---------------------------------------------------------------
-- Building function reference -------------------------------------------------
Loading required package: hyperSpec
Loading required package: lattice
Loading required package: grid
Loading required package: ggplot2
Loading required package: xml2
Package hyperSpec, version 0.99-20200515
To get started, try
vignette ("hyperspec")
package?hyperSpec
vignette (package = "hyperSpec")
If you use this package please cite it appropriately.
citation("hyperSpec")
will give you the correct reference.
The project homepage is http://hyperspec.r-forge.r-project.org
Loading required package: dplyr
Attaching package: 'dplyr'
The following object is masked from 'package:hyperSpec':
collapse
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Loading required package: magrittr
Attaching package: 'hyperSpec.skeleton'
The following object is masked from 'package:hyperSpec':
qplotspc
Reading 'man/qplotspc.Rd'
Reading 'man/unittests.Rd'
== DONE ========================================================================
It is not useful to create a pkgdown website yet as the folder structure of the package is not appropriate. No useful contents are added.
But from the technical side, it is nice to know that in this situation pkgdown works at all (I haven't try to build a website for hyperSpec yet).
Activity
cbeleites commentedon Jul 22, 2018
I like the idea :-) 👍, but won't have time to do much in this line myself. But I'd highly appreciate if you'd do it - so I assigned it to you.
cbeleites commentedon Dec 26, 2019
I started to change roxygen docs to markdown when I touch some doc. A mix of old latex-style and markdown roxygen comments (per function) works fine (using the
#' @mdroxygen tag), and I expect that this may help with pkgdown as well.cbeleites commentedon May 14, 2020
ximeg commentedon May 18, 2020
As far as I understand, articles (or webpages) created with
pkgdownwould reside in a subfolder of the same repository, but they will not be built and packaged into the installablehyperSpec, and thus will not be installed on the end user machine. They would be a subject to a separate build process. They would not be checked on CRAN, and thus could not be a reason for a package removal.So, to ensure consistency, the article built with
pkgdownshould be checked by their writers and by the continuous integration system on a regular basis.GegznaV commentedon May 18, 2020
Only a few setup files should be added for
pkgdownwebsite. Besides this, it is automatically created form the materials in the package: basically, from README.md file, Rd files, and vignettes (.Rmd files). So the maintenance of these files equals the maintenance of the contents of the website.It could be easily automated with "GitHub actions" which is a free service for open-source projects and integrated with GitHub. To create an appropriate setup with standard
pkgdownbuild procedures is as easy asThe website could be automatically rebuilt every time when, e.g., the main branch is updated.
Problem.
But the structure of the package should be appropriate. This is one of the reasons why I started to translate vignettes to Rmd. We should discuss more on this topic (unfortunately, I'm quite busy these days and will have more time for this in a few weeks).
I suggest using GitHub actions for continuous integration (CI), and appropriate setup could be made by one of these options:
(I created a separate issue #131 for the discussion about CI related topics)
GegznaV commentedon May 18, 2020
It would reside on a separate branch
gh-pagesximeg commentedon May 18, 2020
@GegznaV Thank you very much for clarifications!
eoduniyi commentedon May 19, 2020
Following the above discussion I applied
pkgdowntohyperSpec.skeleton:install.packages("pkgdown")Which generated the following files:

And the static webpage:

Which can be viewed here
GegznaV commentedon May 19, 2020
It is not useful to create a
pkgdownwebsite yet as the folder structure of the package is not appropriate. No useful contents are added.But from the technical side, it is nice to know that in this situation
pkgdownworks at all (I haven't try to build a website for hyperSpec yet).GegznaV commentedon May 19, 2020
At first, we have to get rid of make #132
cbeleites commentedon May 21, 2020
yes - unfortunately I don't think we sign dependencies between the issues