Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add a documentation site #35

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

cderv
Copy link
Collaborator

@cderv cderv commented Mar 4, 2017

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.rmd for convenience. However, there is several things to change.

Readme.Rmd contains html contents (a plotly graph). For pkgdown, it needs always_allow_html: true in the yaml header in order to generate the Readme.md file 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:

  • Use an independant index file
  • Generate the plotly beforehand in a png file. put eval = F for the plotly chunk and make the file points to this png file.
  • Find a workaround (I'm on it)

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.html in the docs folder.

@FrancoisGuillem
Copy link
Contributor

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 😄

@cderv
Copy link
Collaborator Author

cderv commented Mar 8, 2017

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.
Il faut que je comprenne où elles sont mises quand le dossier doc est généré automatiquement. Je vais tester.

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.

@jalazawa
Copy link
Member

@cderv des news sur ces images statiques ?

@cderv
Copy link
Collaborator Author

cderv commented Mar 28, 2018

Hello!
Depuis la derniere fois qui remonte un peu maintenant, je vous en avais parlé en live à toi et François. Il y avait des décisions d'organisation et de mise en forme à voir ensemble. Comme on a pas trouvé trop le temps de voir tout ça, j'ai mis en stand by jusqu'à ce que vous reveniez vers moi. 😉

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants