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
  • !31233

Add Hugo Pipes logic for local and vendored scripts.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/regisphilibert/master-xmr-hugo-docs-vendor into master-xmr-hugo-docs-vendor Jul 03, 2020
  • Overview 1
  • Commits 2
  • Pipelines 0
  • Changes 3

Created by: regisphilibert

@XhmikosR

I stored the Hugo pipe logic in a returning partial so we can:

  1. not concern ourselves with whitespace and line breaks when working logics
  2. use partialCached on the logic
  3. compontentize.

Also:

  • When missing mounts, I'm using warnings instead of errors, but I think you wanted errors so the build is stopped. In this case we can replace warnf by errorf through the code.
  • For now the docsearch.min.js file is not published at the desired permalink (including version) but will after Hugo .74 introduces the new resources.Put method (see comment)
  • I'm not 100% sure the order in which files should be bundled is correct, but I don't have any errors in console.
  • I used my own conventions for file naming and commenting, feel free to adjust to the team's own.
  • I left alone the asset loaded from CDN (bootstrap.bundle.min.js), but once you are ready to let Hugo handle it we'll just have to include in the GetJSAssets partial.

Preview: https://deploy-preview-29283--twbs-bootstrap.netlify.app/

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/regisphilibert/master-xmr-hugo-docs-vendor