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

Site wide includes/requires #55

Open
TheWebTech opened this issue May 11, 2019 · 3 comments
Open

Site wide includes/requires #55

TheWebTech opened this issue May 11, 2019 · 3 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed Idea for discussion This idea is a suggestion but input from others would be great.

Comments

@TheWebTech
Copy link
Owner

Something I personally do is create a custom module, that acts to store all of my site-wide requires. Things like fonts, stuff I know will be needed for every template.

The reason for this is because if you need to change it site wide, it's easier to do it in 1 module that's used everywhere.

The alternative is HubSpot's domain based settings, but for anyone who's been around long enough to do a redesign - basically setting anything there that isn't invisible(like a tracking code) is a huge slap in the face to whomever does a redesign down the road.

If it's possible though doing an include of an html partial file in the is probably better. modules add html markup even if they have nothing to display.

@TheWebTech TheWebTech added enhancement New feature or request help wanted Extra attention is needed Idea for discussion This idea is a suggestion but input from others would be great. labels May 11, 2019
@TheWebTech TheWebTech added this to the v1.0 milestone May 11, 2019
@ajlaporte
Copy link

We do the html partials when we do this.
image

@TheWebTech
Copy link
Owner Author

Okay so you go the html partial route. Do you load them in the in drag n drop templates?

@TheWebTech
Copy link
Owner Author

TheWebTech commented May 23, 2019

I've implemented this concept in 12a6e0c

<!-- /**
* * CrankShaft/globals/theme-head.html
* * This is your site's global <head> code. Include it into all of your templates inside the <head> html area.
* * Add anything you would normally add to the head here, as long as it's not specific to a specific module, page, or template.
* * {# {% include "CrankShaft/globals/theme-head.html" %} #}
*/
-->
<!-- manifest code and favicons-->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#3abeeb">
<meta name="msapplication-TileColor" content="#d630b0">
<meta name="theme-color" content="#ffffff">
<!-- end manifest code and favicons -->
<!-- end /CrankShaft/globals/theme-head.html -->

This is only doing the header however.

I am not opposed to doing it for the footer too, what's the reason you have a footer_scripts_partial?
Only reason I can think of is so you could take advantage of the SRI hash security stuff

@TheWebTech TheWebTech self-assigned this May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed Idea for discussion This idea is a suggestion but input from others would be great.
Projects
None yet
Development

No branches or pull requests

2 participants