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

labsite: Re-write relative URLs #450

Merged
merged 4 commits into from
Oct 17, 2024
Merged

labsite: Re-write relative URLs #450

merged 4 commits into from
Oct 17, 2024

Conversation

juliaogris
Copy link
Member

@juliaogris juliaogris commented Oct 16, 2024

Re-write img and link URLs in labsite-gen tool from correct location of relative
to source .md file to correct relative location to lab/index.html file when
deployed.

This change improves readability and generation of Markdown lab source files.

In a preparatory step mark lab/**/*.htmlf as generated for linguist and PR
reviews.

Mark all *.htmlf files in frontend/lab as generated in the linguist
configs, so that PR reviews on GitHub are less spammed with generated
files. Should have done this ages ago - apologies.
 Re-write img URLs in labsite-gen tool from correct relative location
 of .md file to img/IMG.svg file to the correct location when deployed
 and served from root of lab.evy.dev: samples/LAB-ID/img/IMG.svg.

 Update all .md files alongside to use working and correct relative
 links to images from Markdown file perspective. We add this change so
 that Markdown files on GitHub show images. Previously we had broken
 image links for Markdown source and GitHub.

 I was communicating with a friend trying to advocate for the ease of
 creating new evy labs in Markdown and wanted to point her to GitHub
 when I realized links there to images don't render, but the rest is
 actually quite readable. This commit should fix it.
Similar to the previous commit, links to other labs, e.g. `#hsl` were
broken from the Markdown perspective and on GitHub previous. We now use
the correct relative URLs to files, e.g. `../ifs/hsl.md` in links in
the markdown source files and rewrite them to fragments, e.g. `#hsl`
when generating HTML fragments in .htmlf files.
Add --svg-width and --svg-height flags to `evy run` so that we can
render SVG files at a reasonable size on GitHub. Setting the width and
height inside the style attribute of the top level element of the SVG
file does not flow through to GitHub.
Copy link
Member

@camh- camh- left a comment

Choose a reason for hiding this comment

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

📗

@juliaogris juliaogris merged commit 1b66162 into main Oct 17, 2024
4 checks passed
@juliaogris juliaogris deleted the labsite-gen-tweaks branch October 17, 2024 03:39
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