Skip to content

[public suggestion] Offer path shorthands in templates #252

Open
@jsines

Description

@jsines

from: #146 (comment)

I don't really know where else to submit my idea, so i'll do it here, since it is a little bit on the same vibe. Feel free to point me in the right direction if there is a better place to discuss that!

I am currently building a CMS Theme starting from the wonderful cms-theme-boilerplate and the experience is mostly awesome! Congrats to HubSpot team for this btw!

Here is an idea I got and would love to see implemented :

Common paths shorthand/alias a bit like the @hubspot/module-name functionality and inspired by the SvelteKit $lib alias (see doc for details).

The possibility to use custom aliases like @theme/module-name or @modules/module-name in templates would be amazing instead of the current ../../modules/module-name. At least predefined aliases for common paths like "modules" or "sections" would be good enough and probably easier to manage on your end (if the project structure follows a standard pattern, of course).

I also understand that paths like @hubspot/module-name seems to be absolute paths to HubSpot built-in modules, so it might not be just "add another alias" but rather adding a completely new alias feature.

Anyway, just wanted to start the discussion and see where it would go! 😄

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