[WIP] Add a documentation site#35
[WIP] Add a documentation site#35cderv wants to merge 4 commits intorte-antares-rpackage:developfrom
Conversation
|
C'est super ! Pour le README, on va utiliser des images statiques, tant pis ! Et on n'a qu'à dupliquer les images dans le dossier "docs" pour réparer les liens cassés tout en évitant une bonne crise de nerfs 😄 |
|
Ok je creuse la question des images statiques pour comprendre car c'est quand même stylé d'avoir un plotly en hmtlwidget dans le index.html du site. A noter qu'une fois qu'un site pour la documentation existera le readme du github peut être succinct et les tutos/demos/exemple étendu via des menus du site. Ce qui évite ces questions. |
|
@cderv des news sur ces images statiques ? |
|
Hello! Si c'est quelque chose qui vous intéresse toujours, je suis prêt à reprendre pour refaire fonctionner tout ça. Comme ça a bien évolué, je dois reprendre de zéro je pense. A voir du coup, s'il y a toujours un problème avec des images statiques. |
This PR is to share the Work In Progress about the documentation site discussed in #18
The site is build with pkgdown. This package by RStudio allow to generate easily a website based on the already present documentation of the package. However, it has some rules and the package is not currently fully compatible. It is why it still is WIP.
Few suggestions based on my work
Authors on the documentation site
Authors on the website is based on the description page. pkgdown decided to only consider the maintainer ("cre"), authors ("aut"), and funder ("fnd") to be the homepage list. Others are in the author page on the site.
In the help page of
?person, it is explained that roles are based on the MARC Code List for Relators where founder ("fnd") is described as "A person or organization that furnished financial support for the production of the work".RTE could be add as founder in
DESCRIPTION, that way it will appears on the home page of the site.Homepage of the site
The homepage could be based on the readme file. It is the easier choice as it is already existing. Just for you to know, another solution is to create and index.rmd file specific for the website. It is a choice.
For now, I choose
readme.rmdfor convenience. However, there is several things to change.Readme.Rmdcontains html contents (a plotly graph). For pkgdown, it needsalways_allow_html: truein the yaml header in order to generate theReadme.mdfile with html code. Why? Because that way, the code in the rmd file is translated to html and the website contains in its homepage the interactive plotly graph. It nice ! However, the readme.md on on github do not have anymore the graph. It is a choice to make for the documentation between the readme.md on github and the homepage.Several solutions for me:
eval = Ffor the plotly chunk and make the file points to this png file.Work In Progress
As you see, to have a website that suits your need, choices have to made to adapt the website your way or change some of your current choices to suit the website way.
See the current work
You could see the current work pulling this PR and open
index.htmlin the docs folder.