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

import and use ImportMetaEnv component #454

Merged
merged 2 commits into from
May 5, 2022

Conversation

sarah11918
Copy link
Member

@bholmesdev - please check this, and adjust as necessary to get it to render properly. This might require fiddling, but the ideas are:

  1. Where ever you're seeing {{}} in the preview render instead of import.meta.env, then you need to import (I've done) and use (I've done) this component instead of typing the phrase out directly. The rest of the expression can be passed as thepath=" " attribute, and it will be formatted as code.

  2. This component must be inside an HTML element, and can't be written inside regular Markdown. I've tried the simplest version first (just <p> tags enclosing the single line it's in). If this isn't sufficient, or screws up the rest of the rendering, then you'll have to "work your way out" converting larger and larger chunks to HTML until you have the rendering you need.

(Or, you figure out whether it's ABSOLUTELY NECESSARY to write the phrase import.meta.env. Dealer's choice.) Hope this helps.

@bholmesdev - please check this, and adjust as necessary to get it to render properly.  This might require fiddling, but the ideas are:

1. Where ever you're seeing {{}} in the preview render instead of import.meta.env, then you need to import (I've done) and use (I've done) this component instead of typing the phrase out directly. The rest of the expression can be passed as the`path=" "` attribute, and it will be formatted as code.

2. This component must be inside an HTML element, and can't be written inside regular Markdown. I've tried the simplest version first (just <p> tags around the line it's in). If this isn't sufficient, or screws up the rest of the rendering, then you'll have to "work your way out" converting larger and larger chunks to HTML until you have the rendering you need.

(Or, you figure out whether it's ABSOLUTELY NECESSARY to write the phrase import.meta.env. Dealer's choice.) Hope this helps.
@sarah11918
Copy link
Member Author

sarah11918 commented May 5, 2022

@bholmesdev Of the 3 places it's typed, this is the only one that IS a problem in the deploy preview, as far as I can tell? Can you check this really closely?

Screenshot 2022-05-05 18 35 05

(The PR I made to your branch should detail how to fix that, at least in theory....)

@sarah11918
Copy link
Member Author

The two other places, in a code fence but yet not commented out ( 🤪 ) seem to be fine:

Screenshot 2022-05-05 18 39 03

@bholmesdev bholmesdev merged commit 23eb69b into fix/rss-canonical-url-required May 5, 2022
@bholmesdev bholmesdev deleted the sarah11918-patch-1 branch May 5, 2022 21:55
bholmesdev added a commit that referenced this pull request May 5, 2022
* edit: make RSS canonicalUrl required

* refactor: rename "canonicalUrl" to "site"

* import and use ImportMetaEnv component (#454)

@bholmesdev - please check this, and adjust as necessary to get it to render properly.  This might require fiddling, but the ideas are:

1. Where ever you're seeing {{}} in the preview render instead of import.meta.env, then you need to import (I've done) and use (I've done) this component instead of typing the phrase out directly. The rest of the expression can be passed as the`path=" "` attribute, and it will be formatted as code.

2. This component must be inside an HTML element, and can't be written inside regular Markdown. I've tried the simplest version first (just <p> tags around the line it's in). If this isn't sufficient, or screws up the rest of the rendering, then you'll have to "work your way out" converting larger and larger chunks to HTML until you have the rendering you need.

(Or, you figure out whether it's ABSOLUTELY NECESSARY to write the phrase import.meta.env. Dealer's choice.) Hope this helps.

Co-authored-by: Ben Holmes <[email protected]>

* fix: slay import.meta.env demon the cheap way

* chore: remove unused import

Co-authored-by: Sarah Rainsberger <[email protected]>
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