Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !20178

Fix docs asset file paths in /grunt/configBridge.json

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge configbridge into v4-dev Jun 26, 2016
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 2

Created by: cvrebert

Previously, when running the docs locally, the site, rooted at: http://localhost:9001/ would reference docs assets using relative URLs such as: /../assets/js/vendor/anchor.min.js which is equivalent to: http://localhost:9001/../assets/js/vendor/anchor.min.js which is nonsense, since the root directory has no parent directory. Apparently browsers silently ignore this extra .., hence why this wasn't noticed until now. But if you adjust Jekyll's baseurl setting, this mistake causes incorrect URLs to get generated.

This PR corrects the problem by removing the extra ../ from the paths.

These paths are also referenced in the Gruntfile, where the fix actually allows us to simplify the code. Previously, in the Gruntfile, we were doing, e.g.: path.join('./docs/assets', '../assets/js/vendor/anchor.min.js') which calculates to: ./docs/assets/../assets/js/vendor/anchor.min.js which can be simplified to: ./docs/assets/js/vendor/anchor.min.js

So we can remove the /assets suffix from the left argument and the ../ prefix from the right argument and still obtain the same result.

/fyi @hnrch02 @XhmikosR @juthilo

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: configbridge