Skip to content

Feature request: online documentation with pkgdown or similar #78

Closed

Description

@GegznaV

Package pkgdown enables the possibility to create a website with online documentation. GitHub Pages can be used to host the website.

I would be really convenient if hyperSpec had this kind of feature thus I suggest creating it.

Activity

  1. added
    Type: enhancement 🎈
    Status: ready ✔️
    Topic: documentation 📘
    on Jul 22, 2018
  2. added this to the HTML documentation milestone on Jul 22, 2018
  3. cbeleites commented on Jul 22, 2018

    @cbeleites
    Owner

    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.

  4. cbeleites commented on Dec 26, 2019

    @cbeleites
    Owner

    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.

  5. cbeleites commented on May 14, 2020

    @cbeleites
    Owner
  6. ximeg commented on May 18, 2020

    @ximeg
    Collaborator

    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.

  7. removed
    Status: ready ✔️
    on May 18, 2020
  8. GegznaV commented on May 18, 2020

    @GegznaV
    CollaboratorAuthor

    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:

    usethis::use_github_action_check_standard()
    usethis::use_github_action_check_release()
    usethis::use_github_action_check_full()

    (I created a separate issue #131 for the discussion about CI related topics)

  9. GegznaV commented on May 18, 2020

    @GegznaV
    CollaboratorAuthor

    would reside in a subfolder

    It would reside on a separate branch gh-pages

  10. ximeg commented on May 18, 2020

    @ximeg
    Collaborator

    @GegznaV Thank you very much for clarifications!

  11. eoduniyi commented on May 19, 2020

    @eoduniyi
    Collaborator

    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 ========================================================================
    

    Which generated the following files:
    Screen Shot 2020-05-19 at 2 57 32 AM

    And the static webpage:
    Screen Shot 2020-05-19 at 2 57 20 AM

    Which can be viewed here

  12. GegznaV commented on May 19, 2020

    @GegznaV
    CollaboratorAuthor

    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).

  13. GegznaV commented on May 19, 2020

    @GegznaV
    CollaboratorAuthor

    At first, we have to get rid of make #132

  14. cbeleites commented on May 21, 2020

    @cbeleites
    Owner

    yes - unfortunately I don't think we sign dependencies between the issues

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

Metadata

Metadata

Labels

Note: help wantedTopic: documentation 📘Type: enhancement 🎈

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions