Closed xuanblo closed 2 years ago
Do you have more background information, like:
Your version of MKdoc ? (pip3 list | grep mkdocs
)
Are you using the latest version of this plugin ? (pip3 list | grep encryptcontent
)
Can you provide the encryptcontent plugin configuration ?
Do you use material theme ?
Contribution files delivered by the mkdocs repository, still seem to use this feature in the latest version 1.3.0. I only overloading some part of their function to change the construction of the search index in the case of encrypted pages.
mkdocs serve INFO - Building documentation... INFO - "highlightjs" feature is disabled in your plugin configuration. INFO - "arithmatex" feature is disabled in your plugin configuration. INFO - "mermaid2" feature is disabled in your plugin configuration. INFO - Cleaning site directory ERROR - Error building page 'index.md': 'ContentParser' object has no attribute 'stripped_html' Traceback (most recent call last): File "/Users/zhangxuan/miniconda3/bin/mkdocs", line 8, in
sys.exit(cli())
File "/Users/zhangxuan/miniconda3/lib/python3.8/site-packages/click/core.py", line 829, in call
return self.main(args, kwargs)
File "/Users/zhangxuan/miniconda3/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/zhangxuan/miniconda3/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/zhangxuan/miniconda3/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/Users/zhangxuan/miniconda3/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(args, kwargs)
File "/Users/zhangxuan/miniconda3/lib/python3.8/site-packages/mkdocs/main.py", line 133, in serve_command
serve.serve(
File "/Users/zhangxuan/miniconda3/lib/python3.8/site-packages/mkdocs/commands/serve.py", line 141, in serve
config = builder()
File "/Users/zhangxuan/miniconda3/lib/python3.8/site-packages/mkdocs/commands/serve.py", line 136, in builder
build(config, live_server=live_server, dirty=dirty)
File "/Users/zhangxuan/miniconda3/lib/python3.8/site-packages/mkdocs/commands/build.py", line 292, in build
_build_page(file.page, config, files, nav, env, dirty)
File "/Users/zhangxuan/miniconda3/lib/python3.8/site-packages/mkdocs/commands/build.py", line 205, in _build_page
context = config['plugins'].run_event(
File "/Users/zhangxuan/miniconda3/lib/python3.8/site-packages/mkdocs/plugins.py", line 94, in run_event
result = method(item, kwargs)
File "/Users/zhangxuan/miniconda3/lib/python3.8/site-packages/mkdocs/contrib/search/init.py", line 60, in on_page_context
self.search_index.add_entry_from_context(context['page'])
File "/Users/zhangxuan/miniconda3/lib/python3.8/site-packages/encryptcontent/plugin.py", line 222, in _add_entry_from_context
text = parser.stripped_html.rstrip('\n')
AttributeError: 'ContentParser' object has no attribute 'stripped_html'