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

docsify #80

Merged
merged 2 commits into from
Nov 27, 2023
Merged

docsify #80

merged 2 commits into from
Nov 27, 2023

Conversation

vincentarelbundock
Copy link
Collaborator

I have worked a lot on altdoc. It still has a few rough corners, but I've already moved all of my packages over and it looks great.

Here is what the plot2 could look like:

https://arelbundock.com/plot2

You'll notice that:

  • Examples are evaluated and displayed in both the README and the MAN pages.
  • Unlike MkDocs, the Docsify documentation generation framework does not require additional dependencies on the dev machine. It just loads some javascript from the web.
  • I changed almost nothing to the plot2 documentation itself:
    • Fixed a typo in plot2.Rd.
    • Removed a dev.off() call which broke sequential plots in Rmarkdown.
    • Changed the headers in NEWS for better display.
    • Changed the path where README files are saved to man/figures/README/

Also, this is a pure default website. The only altdoc specific commands I ran were:

library(altdoc)
setup_docs("docsify")
render_docs()

@vincentarelbundock
Copy link
Collaborator Author

Last note, this is using the Dev version of altdoc, which is completely different from the original version. The website shows the current workflow:

https://altdoc.etiennebacher.com

@grantmcdermott
Copy link
Owner

grantmcdermott commented Nov 27, 2023

Looks fantastic! Two quick questions:

  1. I assume this is good to merge now, even though it requires the dev version of altdocs?
  2. How easy is it to port the README examples to a separate, dedicated vignette? In an ideal world, I’d only want to include the first image example in the README and defer everything else to the vignette to reduce the install object size.

@vincentarelbundock
Copy link
Collaborator Author

Yeah, I think we can merge now. I split the examples into a Get Started vignette.

The basic workflow will certainly remain the same, and only some minor behind the scenes stuff should change, requiring very little adaptation here.

We may need to think about a strategy if you want a Github Actions to auto-deploy, and also if you want the separate vignette to be available on both CRAN and website (I have not fully solved that yet, but it should be easy).

For now, all you'll need to do is go to the repo settings to setup Github-Pages. It's very easy. Just do the same thing I do on countrycode. See screenshot:

Screenshot 2023-11-27 165027

@zeileis
Copy link
Collaborator

zeileis commented Nov 27, 2023

Wow, this looks really cool, I look forward to trying it out myself for some of my other packages.

@vincentarelbundock
Copy link
Collaborator Author

Glad to hear!

Maybe wait a few weeks, though . I mostly did this here as part of dogfooding process. It's not quite ready for public use yet.

@grantmcdermott
Copy link
Owner

grantmcdermott commented Nov 27, 2023

Okay, awesome. Please go ahead and merge when you're happy @vincentarelbundock.

I've got a PR in the works to support faceting (#79) and once that's done then I think we can put out a new release with the shiny new website 🚀

@vincentarelbundock vincentarelbundock merged commit 5d74781 into grantmcdermott:main Nov 27, 2023
2 checks passed
@grantmcdermott grantmcdermott mentioned this pull request Nov 30, 2023
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