Skip to content

Make All Links Permanent #47

@sunjay

Description

@sunjay

All over the code documentation we have links like this:

turtle/src/turtle.rs

Lines 62 to 64 in 1476e1a

///
/// ![turtle moving forward](https://github.com/sunjay/turtle/raw/master/forward.gif)
///

Or this:

turtle/src/turtle.rs

Lines 680 to 682 in 1476e1a

///
/// ![turtle pen thickness](https://github.com/sunjay/turtle/raw/gh-pages/assets/images/docs/pen_thickness.png)
///

The problem with linking directly to master or gh-pages is that those links will break if we ever move the files or put them somewhere else. Instead, we should link directly to a ref that contains those images.

Instructions

  1. To do that, go to the GitHub page for each image
    • e.g. for https://github.com/sunjay/turtle/raw/master/forward.gif, the GitHub URL is https://github.com/sunjay/turtle/blob/master/forward.gif
  2. Click on the short hash for the latest commit and copy the full hash from the URL
    • e.g. for forward.gif, the short hash was 17bf90d and the full hash was 17bf90d65abf51bb46549bf5036c8f284ed1b4de
      screenshot from 2017-12-20 13-11-44
  3. Replace master or gh-pages in the original image URL with the full hash
  4. Test that the link still works
  5. Replace the link in the source with the now permanent link

There may be other non-image links too that link directly to master or gh-pages. These should all be updated.

More info: https://help.github.com/articles/getting-permanent-links-to-files/

  • Delete gh-pages branch once this is merged

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions