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

Enhancement/issue 529 restore frontmatter imports #554

Merged

Conversation

thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Apr 12, 2021

Related Issue

resolves #529

Summary of Changes

  1. Restored ability to provide per page JS / CSS via front matter
  2. Restored relevant documentation on the website
  3. Made a basic "counter" example to the /plugins/ page to demonstrate the example
  4. Had to find a work around as custom elements in markdown are getting wrapped in <p> tags by unified and thus lead to double component renders. Still need to refine the approach though.

Working pretty great though. 👍
wc-in-markdown-using-frontmatter-import

TODO

  1. Rollup not matching / bundling counter.js in production
  2. Find a real way to implement the markdown <p> tag unwrap regex. Maybe even make it a unified plugin?
  3. Unit Tests
  4. Should get merged after Bug/issue 512 default app template merge fixes #513 and make sure to correctly append to existing page
  5. Make a discussion about turning our "unwrapping" regex logic into a unified plugin - Custom Element "Unwrapping" Plugin for Unified (markdown) #568
  6. Observed that with MPA, we need to also load <head> tags in additional the content in the <body> for any given template that might have. (compare loading the Plugins page directly vs MPA based routing) - captured in have site <head> tags (<meta> / <title> / <script> / etc) update when using staticRouter #306
  7. Remove <x-counter></x-counter> example from www/
Looks like counter.js isn't getting `type="module-shim"` replaced ```html <script src="/components/counter/counter.js" type="module-shim"></script> ``` Screen Shot 2021-04-11 at 8 21 34 PM

@thescientist13 thescientist13 added enhancement Improve something existing (e.g. no docs, new APIs, etc) P0 Critical issue that should get addressed ASAP documentation Greenwood specific docs CLI labels Apr 12, 2021
@thescientist13 thescientist13 self-assigned this Apr 12, 2021
@thescientist13 thescientist13 force-pushed the enhancement/issue-529-restore-frontmatter-imports branch from 848b938 to f9902b4 Compare April 17, 2021 18:29
@thescientist13 thescientist13 added the question Further information is requested label Apr 17, 2021
@thescientist13 thescientist13 marked this pull request as ready for review April 17, 2021 22:33
@thescientist13 thescientist13 added todos and removed question Further information is requested todos labels Apr 17, 2021
@thescientist13 thescientist13 force-pushed the enhancement/issue-529-restore-frontmatter-imports branch from fce412c to 24ec471 Compare April 24, 2021 15:38
@thescientist13 thescientist13 merged commit c648acc into master Apr 24, 2021
@thescientist13 thescientist13 deleted the enhancement/issue-529-restore-frontmatter-imports branch April 24, 2021 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI documentation Greenwood specific docs enhancement Improve something existing (e.g. no docs, new APIs, etc) P0 Critical issue that should get addressed ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

restore ability to import from frontmatter
1 participant