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

Advertise Markdown files in docs/ as "source" files #520

Merged
merged 1 commit into from
Sep 19, 2023
Merged

Advertise Markdown files in docs/ as "source" files #520

merged 1 commit into from
Sep 19, 2023

Conversation

i-ky
Copy link
Contributor

@i-ky i-ky commented Sep 8, 2023

Right now GitHub does not detect the language of this repo:
image

After the fix it will identify Markdown as the main language:
image
image

In my opinion, this will help people (e.g. documentation writers and beginner programmers) to find a project to contribute to.

@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Sep 8, 2023
@SeanTAllen
Copy link
Member

We are unsure about doing this. @i-ky we can see on other repositories that this is done for at least non markdown languages. Do you know why the markdown isn't recognized here? If we were to accept this, we'd want to do it across various repositories that are "markdown driven".

@i-ky
Copy link
Contributor Author

i-ky commented Sep 13, 2023

@SeanTAllen, thank you for the feedback!

Do you know why the markdown isn't recognized here?

Markdown is recognized, but Markdown is considered prose language (i.e. not source code). Also paths like docs/ and Readme.md are discarded as documentation by default. (See how linguist works.) I believe this is a heuristic based on the fact that many projects store documentation alongside source code in the same repo. We don't want to "dilute" or even overpower language stats with Markdown, TeX, HTML and other common documentation formats. Unfortunately, for projects that have separate documentation-only repos this heuristic does more damage than good.

If we were to accept this, we'd want to do it across various repositories that are "markdown driven".

Feel free to point me to other repos, I will be happy to help fine-tune language detection there as well.

I've already made similar PRs to other repos:

@SeanTAllen
Copy link
Member

@i-ky that makes sense. we'll discuss further next Tuesday at our sync meeting, if not sooner. Also relevant repos would be pony-patterns and ponylang-website. Also perhaps contributors.

@i-ky
Copy link
Contributor Author

i-ky commented Sep 15, 2023

Also relevant repos would be pony-patterns and ponylang-website. Also perhaps contributors.

Filed PRs for pony-patterns, ponylang-website, contributors and rfcs:

  1. Advertise Markdown files in docs/ as "source" files pony-patterns#69
  2. Advertise Markdown files as "source" files ponylang-website#886
  3. Advertise Markdown files as "source" files contributors#24
  4. Advertise Markdown files in text/ as "source" files rfcs#212

I deliberately commit changes to default branches of my forks for you to see the effect on GitHub's language detection.

Also https://github.com/ponylang/sublime-pony does not have any source files detected. My experience with Sublime Text is very limited, so I am not sure which would be the best way forward. Maybe we can add a few gitattributes to tune language detection manually, maybe we can submit a feature request to linguist for better support of Sublime Text plugin repos.

Additionally .ctags file should probably be marked as "source" of https://github.com/ponylang/pony-ctags, but linguist does not seem to have support for such format.

@SeanTAllen SeanTAllen merged commit 4eca499 into ponylang:main Sep 19, 2023
5 checks passed
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants