The other way is using a repository called. This gives you a URL of – where the repo name will always be a subdirectory of the top-level domain. One has already been featured above, which is having a specific part of your repo (either a branch or directory) hooked up to the publishing feature. GitHub allows you to create public websites in two ways. For everything else, however, there’s a workaround available. The public URL doesn’t change at all, just the source location of the files. ), this should be handled without your intervention. Note: If you’re using a custom domain name (e.g. Which means that if you have your documentation publicly published at and you rename the repository, none of the publicly cached references to your docs will redirect to the equivalent page at. This works for links to the web UI, API requests, git command line operations… but not GitHub Pages. GitHub allows you to rename a git repository and will automatically redirect references from the old name to the new one. Adding a canonical link definition gives an extra hint to update to the new page. Even though search engines can usually understand the refresh meta instruction, there’s no guarantee that they’ll update their caches to point to the new URL. I’ve also got a canonical link in there as well. This is the boilerplate I’ve used previously: For accessibility purposes (and as a back-up if the browser fails to auto-redirect) it’s still best to include some text explaining the redirect, with a link to the new page. This is one of the big downsides of static site hosting. However, today’s browsers optimise those redirects pretty well. ![]() Even though the W3C recommends that redirect meta tags are not used, they’re pretty much the only option for this scenario. Waaaaaait a second, redirect meta tags ⁉️Įrrr, yep. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |