mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Improve documentation on the language_id
This commit is contained in:
		| @@ -27,13 +27,13 @@ We try only to add languages once they have some usage on GitHub. In most cases | ||||
|  | ||||
| To add support for a new language: | ||||
|  | ||||
| 0. Add an entry for your language to [`languages.yml`][languages]. | ||||
| 0. Add an entry for your language to [`languages.yml`][languages]. Omit the `language_id` field for now. | ||||
| 0. Add a grammar for your language. Please only add grammars that have [one of these licenses](https://github.com/github/linguist/blob/257425141d4e2a5232786bf0b13c901ada075f93/vendor/licenses/config.yml#L2-L11). | ||||
|   0. Add your grammar as a submodule: `git submodule add https://github.com/JaneSmith/MyGrammar vendor/grammars/MyGrammar`. | ||||
|   0. Add your grammar to [`grammars.yml`][grammars] by running `script/convert-grammars --add vendor/grammars/MyGrammar`. | ||||
|   0. Download the license for the grammar: `script/licensed`. Be careful to only commit the file for the new grammar, as this script may update licenses for other grammars as well. | ||||
| 0. Add samples for your language to the [samples directory][samples] in the correct subdirectory. | ||||
| 0. Add a `language_id` for your language. See `script/set-language-ids` for more information. **You should only ever need to run `script/set-language-ids --update`. Anything other than this risks breaking GitHub search :cry:** | ||||
| 0. Add a `language_id` for your language using `script/set-language-ids`. **You should only ever need to run `script/set-language-ids --update`. Anything other than this risks breaking GitHub search :cry:** | ||||
| 0. Open a pull request, linking to a [GitHub search result](https://github.com/search?utf8=%E2%9C%93&q=extension%3Aboot+NOT+nothack&type=Code&ref=searchresults) showing in-the-wild usage. | ||||
|  | ||||
| In addition, if your new language defines an extension that's already listed in [`languages.yml`][languages] (such as `.foo`) then sometimes a few more steps will need to be taken: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user