11ty / 11ty/webc

Add webc syntax highlighting to GitHub by default

Open
#233 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.4k
Forks
46
Avg merge
10m
Merged PRs (30d)
2

Description

Hello!

On a project I'm working on, I want syntax highlighting for .webc components on GitHub, and so I'm using the .gitattributes workaround to get GitHub highlight appropriately.

.gitattributes

*.webc linguist-language=HTML

This works well enough, but it's something we could make work by default!

If we wanted to add this, it looks like we could open a PR to the linguist repo to add .webc as a recognized-by-default extension. We could map .webc to HTML, like the .gitattributes workaround does now.
https://github.com/github-linguist/linguist/blob/main/CONTRIBUTING.md#adding-an-extension-to-a-language

Open questions

  • Can we prove that at least 200 unique :user/:repo repositories? That's one of their requirements (I think so!)
  • What are some good code examples of .webc? They ask for some real-world examples.
  • Do we have a "TextMate-compatible grammar" for webc already? If not, I wonder how hard that would be to make? That would help with highlighting in the situations where webc and html don't match perfectly (as opposed to just using HTML directly).
  • In the meantime, can/should we add the .gitattributes workaround to the documentation site? What would be a good page to add that to?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Linguist CONTRIBUTING.md guidance and the existing .gitattributes workaround. Verify the 200-repository requirement, collect real-world .webc examples, and check whether a TextMate-compatible grammar exists; done means a concrete Linguist submission plan and a decided documentation location for the workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, html, javascript
Domain
documentation, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.