Skip to content

Add code linking to release posts #385

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Add code linking to release posts #385

wants to merge 6 commits into from

Conversation

chartgerink
Copy link
Member

This PR adds automated code linking to the release posts.

I am more confident about this PR, as it builds on my last version #373, and simplifies the procedures. Specifically:

  1. it only renders the new posts (not the entire posts/ folder)
  2. renv testing was more reliable in terms of output
  3. figured out that the dynamic creation of a code chunk that loads the library of the release was a big issue in the previous PR.

Probably a few other things. Ultimately, this is tested when it runs, and I will revisit this in day or two to see whether I have new insights.

Copy link

netlify bot commented Apr 15, 2025

Deploy Preview for tourmaline-marshmallow-241b40 ready!

Name Link
🔨 Latest commit 85b9e13
🔍 Latest deploy log https://app.netlify.com/sites/tourmaline-marshmallow-241b40/deploys/67fe705b48eddf0008cc96e4
😎 Deploy Preview https://deploy-preview-385--tourmaline-marshmallow-241b40.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@chartgerink chartgerink linked an issue Apr 15, 2025 that may be closed by this pull request
Copy link
Member

@Bisaloo Bisaloo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might still need to add downlit to renv.lock? Or is this handled by quarto?

@chartgerink
Copy link
Member Author

Thanks for the review! 😊

Good question - I went back and double checked, as I could not remember exactly. Here is the log:

> renv::load()
- Project '~/git/epiverse-trace.github.io' loaded. [renv 1.1.2]
> renv::status()
No issues found -- the project is in a consistent state.
> install.packages('downlit')
The following package(s) will be installed:
- downlit [0.4.4]
These packages will be installed into "~/git/epiverse-trace.github.io/renv/library/macos/R-4.4/aarch64-apple-darwin24.2.0".

Do you want to proceed? [Y/n]: y

# Installing packages --------------------------------------------------------
- Installing downlit ...                        OK [linked from cache]
Successfully installed 1 package in 11 milliseconds.
> renv::status()
No issues found -- the project is in a consistent state.

From this, I would gather that the lockfile is okay. Do you have additional thoughts on this given this information? I keep missing minor details in renv so even a "seems okay" would help the confidence in merging this :)

@Bisaloo
Copy link
Member

Bisaloo commented May 12, 2025

The code above only shows that downlit is not currently in renv.lock & that renv is not able to auto-detect if/that downlit is necessary, but it doesn't say if it should be there. This can typically happen for optional dependencies.

Given https://github.com/quarto-dev/quarto-cli/blob/a47d119b83895f5c036317c6c0885bb237e11df5/src/resources/rmd/rmd.R#L137-L140, I think it should be added.

renv doesn't use a completely airtight sandbox by default so it's possible that the system copy of downlit is still used in your local tests.

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.

Add code auto-linking to release posts
2 participants