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

find AnVIL assets #93

Closed
wants to merge 7 commits into from
Closed

find AnVIL assets #93

wants to merge 7 commits into from

Conversation

KatherineCox
Copy link
Collaborator

@KatherineCox KatherineCox commented Aug 22, 2022

Trying to figure out why the tocless render can't find AnVIL assets

  • The standard render works, just the tocless render fails
  • It ran just fine in AnVIL_Template and AnVIL_Book_WDL. Not sure why it's breaking here.

Troubleshooting

  • Tried adding the assets in a separate PR, so they already exist, before updating _output.yml, but does not seem to have helped - still errors when I update _output.yml to point to the new location

@github-actions
Copy link

github-actions bot commented Aug 22, 2022

No spelling errors! 🎉
Comment updated at 2022-08-22 with changes from f8e61c0

@github-actions
Copy link

github-actions bot commented Aug 22, 2022

No broken URLs detected! 🎉
Comment updated at 2022-08-22 with changes from f8e61c0

@github-actions
Copy link

github-actions bot commented Aug 22, 2022

Re-rendered previews from the latest commit:

Updated at 2022-08-22 with changes from f8e61c0

@KatherineCox
Copy link
Collaborator Author

YES! I think I fixed it!!!

@KatherineCox
Copy link
Collaborator Author

@cansavvy I was having some trouble figuring out why this (moving the AnVIL assets to a subdirectory) was working in AnVIL_Template_Test and AnVIL_Book_WDL, but was not working when I tried to replicate it in this repo.

The problem occurs during the TOC-less render, specifically during ottrpal::render_without_toc(), if I try to put my css file in a subdirectory of assets. The normal render can handle it, but the tocless render can't.

I think it's failing when it tries to copy into the preview's assets/AnVIL_style directory, because that destination directory doesn't exist.

But, if I first run a render using

  • the old css, not in a subdirectory
  • the new assets (logo, header, etc.) in a subdirectory

The subdirectory gets created and the logo, etc. get copied into it.

Then in a subsequent render I can move the css file to the subdirectory, and when render_without_toc() tries to copy it, it succeeds, because the destination directory already exists.

Not sure I explained that very well, and not sure it's worth putting in effort to make render_without_toc() more flexible, but, it took me a while to figure out, so I thought I'd share.

(In case you're wondering, the reason I wanted to move things to a subdirectory was so that I can have all the downstream repos sync the assets/AnVIL_style subdirectory without overwriting their whole assets directory)

@cansavvy
Copy link
Contributor

cansavvy commented Aug 23, 2022

The problem occurs during the TOC-less render, specifically during ottrpal::render_without_toc(), if I try to put my css file in a subdirectory of assets. The normal render can handle it, but the tocless render can't.

Yes, you're correct. Unfortunately ottrpal isn't really flexible for the file path for the style.css file at the moment. Definitely something we can work on but I can't promise I will get to it quickly. I will file an issue though.

Issue is here: jhudsl/ottrpal#108

@KatherineCox
Copy link
Collaborator Author

KatherineCox commented Aug 23, 2022

Definitely something we can work on but I can't promise I will get to it quickly. I will file an issue though.

@cansavvy No worries, I was able to figure out a solution that does what I need for AnVIL_Template.

@avahoffman avahoffman deleted the find-missing-assets branch March 22, 2023 15:59
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.

2 participants