Skip to content

Latest commit

 

History

History
102 lines (80 loc) · 4.16 KB

CONTRIBUTING.md

File metadata and controls

102 lines (80 loc) · 4.16 KB

mkdocs-carbon

Carbon Design System theme for mkdocs

Install and Serve

Not everything works the same when you use custom_dir, e.g. mkdocs_theme.yml is not processed.

python -m pip install --no-dependencies . && mkdocs serve

Build

make build
python -m pip install build
rm -f dist/mkdocs_carbon-*
python -m build .

Release

make release
python -m pip install --upgrade twine
python -m twine upload dist/*

Useful Information

MkDocs Theme Development

Carbon

CSS

Various Things That Didn't Work

Didn't use these in the end, but may be useful in the future:

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">

Getting fonts from Google (they don't have the "Light" variant) as far as I can tell:

    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300&family=IBM+Plex+Sans:wght@300&display=swap" rel="stylesheet">

Getting the fonts per the Carbon docs (only works if you have the fonts installed locally):

    <link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/plex/mono.css" />
    <link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/plex/sans.css" />

Random Stuff:

    <!-- Doesn't work - don't know why -->
    <link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/plex/mono.css" />
    <link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/plex/sans.css" />

    <!-- The following includes Carbon grid (using flex grid) and all corresponding grid classes -->
    <link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/web-components/version/v2.15.0/grid.css" />
    <!-- The following includes Carbon grid (using CSS grid) and all corresponding grid classes -->
    <link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/web-components/version/v2.15.0/cssgrid.css" />

    <!-- This stylesheet is horrible! -->
    <link rel="stylesheet" href="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/plex.css"/>

    <!-- Never got these to work -->
    <script type="module" src="https://1.www.s81c.com/common/carbon/web-components/version/v2.15.0/dropdown.min.js"></script>
    <script type="module" src="https://1.www.s81c.com/common/carbon/web-components/version/v2.15.0/code-snippet.min.js"></script>
    <script type="module" src="https://1.www.s81c.com/common/carbon/web-components/version/v2.15.0/overflow-menu.min.js"></script>