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

Dependents support for html/hugo template partials. #114

Open
dkebler opened this issue Feb 20, 2015 · 1 comment
Open

Dependents support for html/hugo template partials. #114

dkebler opened this issue Feb 20, 2015 · 1 comment

Comments

@dkebler
Copy link
Contributor

dkebler commented Feb 20, 2015

I use a static site builder/templater engine called Hugo. http://gohugo.io/

VERY like sass hugo uses a partial import. I have my html template directory structure set up in best practices like sass but lack the cool way to navigate them in sublime.

The syntax instead of @import uses double moustache codes

        {{ partial "body/main.html" . }}

So how hard is it to add another language with it's partial syntax?

In this case Dependents would be looking at .html files for that moustache code {{ partial parsing out the path/file just like it does in the @import.

not sure about other builders but I bet it is similar so whatever is done could be easily extended to other html templating like rails, Jekyll, etc.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@mrjoelkemp
Copy link
Collaborator

Hey @dkebler. Thanks for the feature suggestion.

For the Jump to Dependency feature, this might work right out of the box – barring any (incorrect) assumptions on file extensions.

For Find Dependents (i.e., finding which files depend on "body/main.html", a custom detective would be necessary to extract the partial keyword's value. Check out https://github.com/mrjoelkemp/node-detective-sass for a similar implementation. This custom detective could be called node-detective-hugo unless that name is associated with other import styles.

Once the detective is there, it'll need to be registered in https://github.com/mrjoelkemp/node-precinct under the sass type.

Let me know if you're interested in tackling the custom detective and its integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants