Skip to content

Symbolic links and other methods of indicating the README format #21

Closed

Description

@intuited

This may be in the wrong issue queue; if so, I apologize in advance, and humbly request to be redirected to the proper facility.

I've discovered to my chagrin that README* files which are symlinks do not get recognized by github, or at least they are not being displayed as the README file for the branch page.

This would be quite useful, since I usually write my documentation in markdown, but for some projects, e.g. Python modules, it's important to have a README file with a name other than README.markdown. Since markdown is text, ln -s README.txt README.markdown && git add README.markdown would work quite well, except that the github web system doesn't seem to follow symlinks.

I guess I could rebuild (i.e. copy) the README.txt file in a commit/merge hook, but it's sort of a hassle to have to write a commit hook to do this, and it's somewhat confusing for people to have two files in their cloned repo or download which are exactly the same. It's also in violation, I'm sure, of some fundamental rule of source control management theory, the one about not committing generated files.

This issue is related to issue #3, in that if that feature were implemented in a way that allowed for reliable detection of markdown within *.txt files it wouldn't be necessary. It's not really clear that that's possible, though, and assuming that somebody is writing markdown when they just want their file displayed as plain text would be an annoying way to do things.

That issue is also related because somebody mentioned this approach in a comment on the issue.

There was also a suggestion made to allow the repo maintainer to indicate what format the README should be parsed as; this was responded to to the effect that such a feature was unlikely to be put into place because it "gains nothing over just adding the correct extension." Hopefully my above statements serve as a sensible objection to this assertion.

Another option, not mentioned in the comments thread for that issue, could be to use a metadata file in the repo to save github-related options, e.g. /.github:

[README]
        file = README.txt
        format = markdown

I leave it to your graces to make a wise ruling on this matter.

Activity

  1. kneath commented on Sep 20, 2010

    @kneath

    That's a lot of text.

    Your second paragraph is fine, I'll see what we can do to support traversing symlinks as well for readme name matching.

  2. intuited commented on Sep 20, 2010

    @intuited
    Author

    Awesome, cheers. I figure it's better to say it up front than to write a bunch of disorganized comments after :)

  3. kneath commented on Sep 23, 2010

    @kneath

    Shipped this yesterday.

  4. intuited commented on Sep 23, 2010

    @intuited
    Author

    Sweet, thanks a bunch.

  5. ravn commented on May 10, 2018

    @ravn

    I just tested having "/Main.md" being a symbolic link to "/src/main/java/demo/Main.java" which is a valid markdown file (this is sort of the whole point of this test as I am looking for a way to document Java code better than javadoc) and it is just rendered as a box with the symbolic link target name. Have I misunderstood how this is to be done?

  6. pepasflo commented on Nov 1, 2018

    @pepasflo
  7. frozenfrank commented on Feb 28, 2025

    @frozenfrank

    I just tested having "/Main.md" being a symbolic link to "/src/main/java/demo/Main.java" which is a valid markdown file (this is sort of the whole point of this test as I am looking for a way to document Java code better than javadoc) and it is just rendered as a box with the symbolic link target name. Have I misunderstood how this is to be done?

    @ravn I believe this feature only affects the rendering of the repo README.md file on the repo landing page and similar places. This feature, unfortunately, does not render all symlinks throughout the filesystem.

    See my example.

    On this repo, the welcome page follows the symlink to display the markdown content stored in PHASE7_PERF_TESTING.md; however, actually visiting the README.md file just shows the text of the file reference 😦

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions