Git Product home page Git Product logo

mkdocs-bootstrap's Introduction

MkDocs Bootstrap Theme

See the documentation for more details:

https://mkdocs.github.io/mkdocs-bootstrap/

PyPI Version BSD License

Release Notes

Version 1.1.1 (2023-07-28)

  • Fix issue with package distribution files (#32).

Version 1.1 (2020/02/22)

  • Update to support MkDocs version 1.1.
  • Update to support Bootstrap 4.

Version 1.0.1 (2018/10/01)

  • Include mkdocs_theme.yml in MANIFEST.

Version 1.0 (2018/08/03)

  • Inherit from the mkdocs theme and get all the parent theme's features.
  • Update to support MkDocs version 1.0.

Version 0.2 (2018/02/13)

  • Added support for MkDocs version 0.17 (#17).
  • Fixed use of Bootstrap Grid (#15).
  • Updated to FontAwesome 4.7.0 (#14).
  • Updated to Bootstrap 3.3.7 (#11).
  • Updated RespondJS and html5shiv (#9).

Version 0.1.1 (2015/06/23)

Initial release.

mkdocs-bootstrap's People

Contributors

coliff avatar d0ugal avatar jimporter avatar tomchristie avatar waylan avatar withlovee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mkdocs-bootstrap's Issues

Error: The theme 'bootstrap' does not appear to have a configuration file.

gitlab-ci.log
Mkdocs is failing to build my site with the latest version of the mkdocs-bootstrap theme.

I suggest adding *.yml to the MANIFEST.in, in order to make sure mkdocs_theme.yml gets included in the release.

diff --git a/MANIFEST.in b/MANIFEST.in
index 9993b1f..cc6f29f 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,3 +1,3 @@
-recursive-include mkdocs_bootstrap *.ico *.js *.css *.png *.html *.eot *.svg *.ttf *.woff *.woff2
+recursive-include mkdocs_bootstrap *.ico *.js *.css *.png *.html *.eot *.svg *.ttf *.woff *.woff2 *.yml
recursive-exclude * __pycache__
recursive-exclude * *.py[co]

Add mkdocs_theme.yml for 0.17.x support

mkdocs v0.17 added a required mkdocs_theme.yml file. Without the file present the template causes the build to fail.

This config file should be added to mkdocs-bootstrap to allow the theme to work with the latest mkdocs release.

Version 1.1 wheel package distribution is broken

I think that the released 1.1 version have a broken wheel package.

Bug

Only with those command

$ mkdocs new website
$ mkdocs build

When you open the website, you can observe a big white space between the top of the screen and the top menu.

Primary cause

After some investigation, I found that the version 1.1 use bootstrap version 4 but if you install wheel package, it will generate an index.html like this :

<link href="css/bootstrap-3.3.7.min.css" rel="stylesheet">
<script src="js/bootstrap-3.3.7.min.js" defer></script>

With those files :

css/bootstrap.min.css
css/bootstrap-3.3.7.min.css
js/bootstrap-3.3.7.min.js
js/bootstrap.min.js

Root cause

If look for bootstrap files inside mkdocs-bootstrap-1.1.tar.gz and mkdocs_bootstrap-1.1-py2.py3-none-any.whl, you will be surprised

_ .tar.gz .whl
css/bootstrap.min.css present
css/bootstrap-3.3.7.min.cs present
js/bootstrap-3.3.7.min.js present present
grep bootstrap main.html bootstrap-3.3.7.min.js bootstrap.min.js

A workaround

When installing theme the flag --no-binary :all: can be used. This permit to use the not bugged .tar.gz file.

A way to fix the problem

You can maybe create a new version 1.1.1 with a fixed wheel package.
I think that override the 1.1 version is a bad thing because local mirroring software will may not download a new file with the same version number.

Update to latest version of Font Awesome (4.7.0)

Currently mkdocs-bootstrap uses Font Awesome 4.0.3. I'd like to see this updated to the latest version; 4.7.0. There would be no breaking changes - just more available icons.

Shall I open a PR for this?

TOC text is invisible unless hovered on

I tested the theme with a minimal setup, here's my mkdocs.yaml file:

site_name: Test
site_description: Test Bootstrap Theme
site_author: Anonymous
theme:
  name: bootstrap
  shortcuts:
    help: 191    # ?
    next: 78     # n
    previous: 80 # p
    search: 83   # s

The resulting navigation of the theme is hard to use because the text is blue on blue:

bootstrap

Any ideas why that might be happening? Thanks!

Font files missing

Installation via

pip install mkdocs

using standard theme which is bootstrap theme

URL        `../fonts/glyphicons-halflings-regular.eot'
Parent URL http://127.0.0.1:8000/css/bootstrap-custom.min.css, line 1, col 36239
Real URL   http://127.0.0.1:8000/fonts/glyphicons-halflings-regular.eot
Check time 3.413 seconds
Result     Error: 404 File not found

URL        `../fonts/glyphicons-halflings-regular.eot?#iefix'
Parent URL http://127.0.0.1:8000/css/bootstrap-custom.min.css, line 1, col 36292
Real URL   http://127.0.0.1:8000/fonts/glyphicons-halflings-regular.eot#iefix
Check time 3.466 seconds
Result     Error: 404 File not found

URL        `../fonts/glyphicons-halflings-regular.woff'
Parent URL http://127.0.0.1:8000/css/bootstrap-custom.min.css, line 1, col 36376
Real URL   http://127.0.0.1:8000/fonts/glyphicons-halflings-regular.woff
Check time 3.551 seconds
Result     Error: 404 File not found

URL        `../fonts/glyphicons-halflings-regular.ttf'
Parent URL http://127.0.0.1:8000/css/bootstrap-custom.min.css, line 1, col 36441
Real URL   http://127.0.0.1:8000/fonts/glyphicons-halflings-regular.ttf
Check time 3.218 seconds
Result     Error: 404 File not found

URL        `../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular'
Parent URL http://127.0.0.1:8000/css/bootstrap-custom.min.css, line 1, col 36509
Real URL   http://127.0.0.1:8000/fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular
Check time 3.062 seconds
Result     Error: 404 File not found

So looks like many font files are missing.
Please correct

Issue raised earlier at mkdocs/mkdocs#894 (comment) and was redirected here.

The theme can't be used?

Python 2.7.13
mkdocs, version 0.17.2
mkdocs-bootstrap 0.1.1

site_description: knowledge Document
theme: bootstrap

then I use mkdocs serve , will report an error below

INFO    -  Building documentation... 
WARNING -  The theme 'bootstrap' does not appear to have a configuration file. Please upgrade to a current version of the theme. 
INFO    -  Cleaning site directory 
ERROR   -  Error building page index.md 
Traceback (most recent call last):
  File "/usr/local/bin/mkdocs", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/mkdocs/__main__.py", line 127, in serve_command
    livereload=livereload
  File "/usr/local/lib/python2.7/site-packages/mkdocs/commands/serve.py", line 117, in serve
    config = builder()
  File "/usr/local/lib/python2.7/site-packages/mkdocs/commands/serve.py", line 112, in builder
    build(config, live_server=live_server, dirty=dirty)
  File "/usr/local/lib/python2.7/site-packages/mkdocs/commands/build.py", line 282, in build
    build_pages(config, dirty=dirty)
  File "/usr/local/lib/python2.7/site-packages/mkdocs/commands/build.py", line 242, in build_pages
    _build_page(page, config, site_navigation, env)
  File "/usr/local/lib/python2.7/site-packages/mkdocs/commands/build.py", line 150, in _build_page
    template = env.get_template('main.html')
  File "/usr/local/lib/python2.7/site-packages/jinja2/environment.py", line 830, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/usr/local/lib/python2.7/site-packages/jinja2/environment.py", line 804, in _load_template
    template = self.loader.load(self, name, globals)
  File "/usr/local/lib/python2.7/site-packages/jinja2/loaders.py", line 113, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/usr/local/lib/python2.7/site-packages/jinja2/loaders.py", line 187, in get_source
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: main.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.