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

Add a feature for table of content. #151

Closed
JiaxiangBU opened this issue Mar 17, 2019 · 6 comments
Closed

Add a feature for table of content. #151

JiaxiangBU opened this issue Mar 17, 2019 · 6 comments

Comments

@JiaxiangBU
Copy link
Contributor

  1. Describe the suggested feature.

I find the other rmd document in the directory analysis doesn't have a button on the GitHub pages.
Is there a way to add a toc for them?

  1. Describe why you think this feature is needed.

It helps the readers of that pages search and read.

  1. Tell us the version of workflowr you are using. Run packageVersion("workflowr") in R or RStudio, and copy & paste the output here.
> packageVersion("workflowr")
[1] ‘1.2.0’
@jdblischak
Copy link
Member

I find the other rmd document in the directory analysis doesn't have a button on the GitHub pages.
Is there a way to add a toc for them?

@JiaxiangBU Thanks for the suggestion! I actually had a function that did something like this in a very early version of workflowr, but I deprecated it since no one was using it.

The current advice (here) is to manually link the other analyses in analysis/index.Rmd. For example, if you have an analysis in analysis/example.Rmd, then you could add the following text to analsyis/index.Rmd:

Click [here](example.html) for my analysis of...

But I'd consider creating a new function, that e.g., creates a markdown-formatted list of all the published analyses for the project (and optionally add it to analysis/index.Rmd). Would that be useful for you?

@JiaxiangBU
Copy link
Contributor Author

Hi, @jdblischak thanks for your quick reply.

creates a markdown-formatted list of all the published analyses for the project (and optionally add it to analysis/index.Rmd). Would that be useful for you?

Yes, I think it is helpful, now I just write a quick function to build a table to include all documents in the analysis folder. Still wait for your new function, that's cool.

@jdblischak
Copy link
Member

Yes, I think it is helpful, now I just write a quick function to build a table to include all documents in the analysis folder. Still wait for your new function, that's cool.

@JiaxiangBU If you've already written a quick function, would you like to contribute it to workflowr for use by others? Since you're using this functionality, you're the best person to know how to make it convenient for other users. I can help mentor you on the process of adding your function to workflowr and contributing via Git/GitHub. Interested?

@JiaxiangBU
Copy link
Contributor Author

@jdblischak, sorry for the late reply, yeah, I'm interested. I will fork it and build a new pull request. Just when I complete it, I will let you know.

@jdblischak
Copy link
Member

@JiaxiangBU Great! Please read CONTRIBUTING.md and let me know if you have any questions. Especially important is to make your new commits on the dev branch with git checkout dev.

@JiaxiangBU
Copy link
Contributor Author

@jdblischak I write the quick function and pull it to the dev branch, but there are some errors in the devtools::test pre-test and document.R updating process.
Here is my pull request, #154.
I comment the details there.

jdblischak added a commit that referenced this issue Apr 12, 2019
Related to Issue #151 and PR #155.

Sometimes the system keyboard is not available when I run the tests with
devtools::test(). Since this is technically an interactive session, the
tests fail.
jdblischak added a commit that referenced this issue Apr 12, 2019
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

No branches or pull requests

2 participants