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

HTML Include Plugin #712

Merged
merged 14 commits into from
Nov 11, 2021
Merged

HTML Include Plugin #712

merged 14 commits into from
Nov 11, 2021

Conversation

thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Sep 1, 2021

Related Issue

resolves #788

> _Note: [this issue will manifest in this PR](https://github.com//pull/712#issuecomment-945019172) until #782 is merged_

Summary of Changes

  1. Created a new plugin to reflect the design derived from this spike (see below details)
  2. Updated website documentation and implemented the custom element variant for the website footer

Interesting observation about the footer here

1. Spiking out the idea of what a plugin might look like for supporting the old deprecated standard of [HTML includes](https://github.com/whatwg/html/issues/2791) (not to be confused with [HTML modules / imports](https://github.com/WICG/webcomponents/issues/645))

Screen Shot 2021-09-01 at 5 48 57 PM
Screen Shot 2021-09-01 at 5 49 22 PM

TODO

Going further, would like to see how far we can take it if we were to support something like this (notice the .js extension)

<link rel="html" href="/includes/html-include-test.html.js"></link>
const getIncludeTemplate = async (data) => {
  const { name } = data;
  
  return `Hello ${name || 'World'}! 👋`;
}

export { getIncludeTemplate };

Then the plugin could just import from that file and statically stamp out the contents that way? 🤔

@thescientist13 thescientist13 added RFC Proposal and changes to workflows, architecture, APIs, etc discussion tied to an ongoing discussion or meeting notes labels Sep 1, 2021
@thescientist13 thescientist13 changed the title spike for RFC discussion around html inclue support spike for RFC discussion around html include support Sep 1, 2021
@thescientist13 thescientist13 self-assigned this Sep 24, 2021
@thescientist13

This comment has been minimized.

@thescientist13 thescientist13 mentioned this pull request Nov 3, 2021
5 tasks
@thescientist13 thescientist13 changed the title spike for RFC discussion around html include support HTML Includes Plugin Nov 4, 2021
@thescientist13 thescientist13 changed the title HTML Includes Plugin HTML Include Plugin Nov 4, 2021
@thescientist13 thescientist13 added documentation Greenwood specific docs feature New feature or request Plugins Greenwood Plugins website Tasks related to the projects website / documentation labels Nov 4, 2021
@thescientist13
Copy link
Member Author

Interesting observation but I noticed while working on this PR that on the main site, the (font?) size of the footer is slightly smaller on the home page vs any of the other pages / templates. Not sure if just me?
greenwood-footer-font-size

cc: @aholtzman

@thescientist13 thescientist13 marked this pull request as ready for review November 4, 2021 15:58
@thescientist13 thescientist13 merged commit 78296e2 into master Nov 11, 2021
@thescientist13 thescientist13 deleted the rfc/plugin-include-html branch November 11, 2021 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion tied to an ongoing discussion or meeting notes documentation Greenwood specific docs feature New feature or request Plugins Greenwood Plugins RFC Proposal and changes to workflows, architecture, APIs, etc website Tasks related to the projects website / documentation
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

HTML Include Plugin
1 participant