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

Mixins documentation page

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/MartijnCuppens/mixin-documentation into main May 12, 2018
  • Overview 0
  • Commits 7
  • Pipelines 0
  • Changes 21

Created by: MartijnCuppens

Fixes #25977 (closed).

All mixins are generated by the mixins_documentation jekyll plugin under the _plugins folder. This plugins executes the npm run mixins-documentation --silent command. The --silent parameter prevents the filename to be outputted.

npm run mixins-documentation --silent runs build/mixins-documentation.js. This script reads all the .scss files in the scss/mixins folder and returns a list of the mixin names, the file location and the mixin itself in code block.

It's also possible to add a description to a mixin. Therefore you can add a comment block just above the mixin (no blank lines between the mixin and the comment block). Markdown is supported in these blocks. Stylelint comments are ignored.

Demo: https://deploy-preview-26500--twbs-bootstrap4.netlify.com/docs/4.2/extend/mixins/

TODO:

  • fix stylelint comments detection
  • switch to shell.js's find
  • link to the actual mixin file
  • automatically convert links
  • move Mixins page under Extend nav
  • enable stylelint rule to check for newlines between mixins, and no newlines before mixins when there's a comment
  • maybe sort mixins alphabetically; currently they are sorted by their filename and then alphabetically
  • use smaller headers for mixins in the same file so that ToC detects them properly
  • decouple task from Jekyll maybe (remove the Jekyll plugin)
  • show a callout for deprecated mixins
  • fix link to file line bug
  • Check if https://github.com/twbs/bootstrap/issues/25977#issuecomment-455917335 could be useful to build the docs
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/MartijnCuppens/mixin-documentation