Skip to content

[redesign] Better ways to share Less/EJS across sites #308

@savetheclocktower

Description

@savetheclocktower

Have you checked for existing feature requests?

  • Completed

Summary

I don't even know if there's a good solution here, but this is our current situation:

  • For all the redesigns, the documentation repo is the CSS source of truth; it emits a stylesheet that the others consume. The blog and pulsar-edit.github.io repos define their own CSS overrides, but often want to consult the original Less includes (i.e., the breakpoints and mixins) and can't; so they get duplicated across repos.
  • The sites may or may not want to highlight different things in their navigation areas, but otherwise should basically have the same page header and page footer. Right now, this is another thing that must be duplicated across three repos.

I don't have a preferred recommendation here because they'd all involve some pain. But here are some ideas:

  • Git submodule? (Ugh.)
    • Pros: would allow us to reference the individual files rather easily.
    • Cons: Now we've got four repos instead of three, and keeping everything in sync still requires manual submodule updates and redeploys of each site.
  • Extend 11ty-config-pulsar?
    • Not sure how easy it is to even reference Less or EJS resources from a Node module, but maybe it's possible via require.resolve or something. And maybe it can define some EJS helpers that can do most of the work instead of forcing us to reach in and include the module's own EJS files.
    • Pros: We're already using it in the other two repos.
    • Cons: Same deployment headaches as above, though they may be slightly mitigated if the package.json version just points to github:confused-Techie/11ty-config-pulsar#main and therefore always gets the latest upon redeploy.

What benefits does this feature provide?

Less duplication; more consistency.

Any alternatives?

The two possible solutions above are the only ones I can think of for now, but I'm eager to hear others if folks have ideas.

Other than that, the alternative is living with the status quo — which is annoying but not debilitating.

Other examples:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions