Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
G
gitlab-pages
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 79
    • Issues 79
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 12
    • Merge Requests 12
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GitLab.org
  • gitlab-pages
  • Issues
  • #95

Closed
Open
Opened Dec 20, 2017 by Arihant@arihantar
  • Report abuse
  • New issue
Report abuse New issue

Automatically resolve .html extension for Pages URLs

  1. Follow this link to the root of my Github repo: https://rdhar.github.io/hub-instance/

  2. In another tab, follow this link to the root of my Gitlab repo: https://rdhar.gitlab.io/lab-instance/

  3. Observe that they are completely identical in build and structure. You can verify this since they're both hosted from public repos accessible from the first "Instance" hyperlink on any page.

  4. Next, click through all the links of the Github instance. Notice that the .html file extension suffix is not visible anywhere in the URL. This is because Github automatically resolves the path to .html by default, without having to explicitly call it. This is very neat.

  5. Similarly, click through all the links of the Gitlab instance. Notice that you can only access the index.html files.The rest of the pages fail to resolve despite using identical paths to Github. This makes me :(

From what I gather, this is because Github does not care (https://rsp.github.io/gh-pages-no-extension/) for the .html file extension if the link can be resolved otherwise. As a result, basic HTML pages have pretty URLs by default. Hence, neat.

Whereas, as you can see, Gitlab appears to explicitly require the .html file extension or fail to resolve the path otherwise. Only index.html pages have pretty URLs while the rest are shown with a .html dangling off at the end :(. Having to depend on Jekyll-config or YAML front-end is not a viable solution when you just want to throw up a few basic HTML pages.

ZD: https://gitlab.zendesk.com/agent/tickets/83774

cc// @nick.thomas @bikebilly

Edited Feb 05, 2019 by Jason Lenny

Related issues

Assignee
Assign to
Epic
11.8
Milestone
11.8
Assign milestone
Time tracking
None
Due date
No due date
7
Labels
Accepting merge requests Community contribution Release devops:release direction feature pages
Assign labels
  • View project labels
Reference: gitlab-org/gitlab-pages#95