Closed Dup4 closed 3 years ago
Because I'm running some code directly from tools you need to the do the following:
python3 -m mkdocs serve
That will include the CWD directory so that the "tools" module will be found.
Because I'm running some code directly from tools you need to the do the following:
python3 -m mkdocs serve
That will include the CWD directory so that the "tools" module will be found.
It works. Thank you.
Why cant I use md-render ?
PS C:\Users\Admin\source\repos\es.ac.vn> python3 -m mkdocs serve
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
PS C:\Users\Admin\source\repos\es.ac.vn> python -m mkdocs serve
Error: MkDocs encountered an error parsing the configuration file: while constructing a Python object
cannot find module 'tools.pymdownx_md_render' (No module named 'tools.pymdownx_md_render')
in "C:\Users\Admin\source\repos\es.ac.vn\mkdocs.yml", line 1266, column 19
markdown_extensions:
- markdown.extensions.abbr
- markdown.extensions.attr_list
- markdown.extensions.def_list
- markdown.extensions.tables
- markdown.extensions.footnotes
- markdown.extensions.md_in_html
- markdown.extensions.admonition
- markdown.extensions.smarty:
smart_quotes: false
- markdown.extensions.toc:
permalink: ⚓︎
title: Mục lục
toc_depth: 4
permalink_title: Click để đánh dấu trang ⚓︎
slugify: !!python/object/apply:pymdownx.slugs.slugify
kwds:
case: lower
- pymdownx.arithmatex:
generic: true
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.mark
- pymdownx.tilde
- pymdownx.details
- pymdownx.critic:
mode: view
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
options:
custom_icons:
- assets/.icons
- pymdownx.highlight:
anchor_linenums: true
use_pygments: true
auto_title: true
linenums: true
line_spans: __span
linenums_style: pymdownx-inline
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.keys
- pymdownx.smartsymbols
- pymdownx.snippets
- pymdownx.superfences:
preserve_tabs: true
custom_fences:
- name: python
class: python
validator: !!python/name:markdown_exec.validator
format: !!python/name:markdown_exec.formatter
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
- name: vegalite
class: vegalite
format: !!python/name:mkdocs_charts_plugin.fences.fence_vegalite
- name: diagram
class: diagram
format: !!python/name:pymdownx.superfences.fence_code_format
- name: math
class: arithmatex
format: !!python/object/apply:pymdownx.arithmatex.arithmatex_fenced_format {kwds: {mode: generic, tag: pre}}
- name: md-render
class: md-render
format: !!python/name:tools.pymdownx_md_render.md_sub_render
- pymdownx.tabbed:
alternate_style: true
slugify: !!python/object/apply:pymdownx.slugs.slugify
kwds:
case: lower
- pymdownx.tasklist:
custom_checkbox: true
clickable_checkbox: true
- pymdownx.progressbar
- pymdownx.blocks.tab
I do not ship pymdownx_md_render
in pymdown-extensions
. It is only used for my documentation, so you cannot access it simply by installing pymdown-extensions
.
I have no idea what you are doing or how your project is organized. Based on the error, I can only assume you did not copy my personal, custom script into your project.
Keep in mind that I do not provide support for my own personal scripts that I do not document and do not include in the released package. You use them at your own risk and are often left to figure out how to use them yourself.
Oh, as I failed to make the progress bar no matter how I tried with custom js and custom CSS, so I thought I was missing some features from your code
Also the collapsible block feature (which I really want to have), hmmmmmm, it isn't render as expected right now
Anything in this project's tool folder you can copy into your project as it is all licensed under MIT. Currently, I have not opted to officially support anything in the tool folder and distribute them in any of my releases.
You are free to copy the files from tools to your project and adapt them as required. I provide no documentation and do not provide any support currently for them.
I am not exactly sure what you are referring to when you mention "collapsible" blocks. If you are talking about Details, we have to different extensions that can handle that. If you are talking about my custom script in the tools folder to provide collapsible code blocks, those are undocumented and unsupported, but they will require custom CSS.
I thought Progressbar has its own documentation, but there are issues related to it ?
If you have an issue with progressbar, please open a new issue and provide a reproducible example and explain your issue.
What you've linked is an issue about material not providing CSS for progressbar. If it doesn't provide CSS, you have to provide your own.
I try to clone the repo and build documents locally.
Follow this tutorial as follows:
But I failed, the following is my operation process:
I try to find the source of the problem.
In
mkdocs.yml
, need a function namedtools.pymdownx_md_render.md_sub_render
, the function is located in thetools/pymdownx_md_render.py
.But the
tools
directory is excluded insetup.py
.Therefore, if we only install the
pymdown-extensions
, the function will not be included.So I am particularly curious, how did you build the documents for this repo.