orzih / mkdocs-extra-sass-plugin Goto Github PK
View Code? Open in Web Editor NEWAdds stylesheets to your mkdocs site from Sass/SCSS.
License: MIT License
Adds stylesheets to your mkdocs site from Sass/SCSS.
License: MIT License
404 pages (and probably all overrides, but haven't tested it yet) render without the extra sass processed.
Error when server: ModuleNotFoundError: No module named 'livereload'
$ mkdocs serve
INFO - Building documentation...
Traceback (most recent call last):
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\Scripts\mkdocs.exe\__main__.py", line 7, in <module>
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 1137, in __call__
return self.main(*args, **kwargs)
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 1062, in main
rv = self.invoke(ctx)
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\site-packages\mkdocs\__main__.py", line 173, in serve_command
serve.serve(dev_addr=dev_addr, livereload=livereload, **kwargs)
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\site-packages\mkdocs\commands\serve.py", line 54, in serve
config = builder()
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\site-packages\mkdocs\commands\serve.py", line 35, in builder
config = load_config(
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\site-packages\mkdocs\config\base.py", line 224, in load_config
errors, warnings = cfg.validate()
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\site-packages\mkdocs\config\base.py", line 108, in validate
run_failed, run_warnings = self._validate()
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\site-packages\mkdocs\config\base.py", line 63, in _validate
self[key] = config_option.validate(value)
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\site-packages\mkdocs\config\config_options.py", line 130, in validate
return self.run_validation(value)
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\site-packages\mkdocs\config\config_options.py", line 636, in run_validation
plgins[item] = self.load_plugin(item, cfg)
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\site-packages\mkdocs\config\config_options.py", line 649, in load_plugin
Plugin = self.installed_plugins[name].load()
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\site-packages\importlib_metadata\__init__.py", line 194, in load
module = import_module(match.group('module'))
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Users\<User>\AppData\Local\Programs\Python\Python39\lib\site-packages\mkdocs_extra_sass_plugin\plugin.py", line 10, in <module>
from livereload import Server
ModuleNotFoundError: No module named 'livereload'
Solved by installing
pip install livereload
Hello, thanks for this plugin!
I understand that this 'livereload' issue has been common with others. This was supposedly fixed in mkdocs 1.2.2. However, I am still getting this error, and only when the mkdocs-extra-sass plugin in enabled in mkdocs.yml
.
This only seems to be happening in GitHub Action's Ubuntu 20.04 with Python v. 3.10 - 3.9; macOS with Python v. 3.9 works fine. I have tried a variety of dependency versions.
Any insight is greatly appreciated.
Edit: I should add that I am attempting to use this in conjunction with @orzih 's mkdocs-with-pdf plugin (thank you for this plugin too!)
When developing the site and modifying files and mkdocs.yml
, a full rebuild of SCSS happens on the page renewal when a Markdown or a config files are modified. It impacts the developer experience quite a lot.
It would be great to update the plugin so that it runs rebuild only when its settings are changed, or when there are changes in the extra_sass
directory
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.