Feature request: allow running without git, i.e. with only info from page.meta (YAML frontmatter)
Closed this issue · 4 comments
domenkozar commented
08:45:50.953 | Successfully installed babel-2.11.0 beautifulsoup4-4.11.1 cssselect-1.2.0 lxml-4.9.1 markdown2-2.4.6 mkdocs-material-8.5.10+insiders.4.26.3 paginate-0.5.6 pyquery-1.4.3 readtime-2.0.0 regex-2022.10.31 soupsieve-2.3.2.post1
-- | --
08:45:50.981 | WARNING: You are using pip version 20.2b1; however, version 22.3.1 is available.
08:45:50.981 | You should consider upgrading via the '/opt/buildhome/python3.7/bin/python3.7 -m pip install --upgrade pip' command.
08:45:53.903 | Traceback (most recent call last):
08:45:53.904 | File "/opt/buildhome/python3.7/bin/mkdocs", line 8, in <module>
08:45:53.904 | sys.exit(cli())
08:45:53.904 | File "/opt/buildhome/python3.7/lib/python3.7/site-packages/click/core.py", line 1130, in __call__
08:45:53.905 | return self.main(*args, **kwargs)
08:45:53.905 | File "/opt/buildhome/python3.7/lib/python3.7/site-packages/click/core.py", line 1055, in main
08:45:53.905 | rv = self.invoke(ctx)
08:45:53.905 | File "/opt/buildhome/python3.7/lib/python3.7/site-packages/click/core.py", line 1657, in invoke
08:45:53.905 | return _process_result(sub_ctx.command.invoke(sub_ctx))
08:45:53.905 | File "/opt/buildhome/python3.7/lib/python3.7/site-packages/click/core.py", line 1404, in invoke
08:45:53.905 | return ctx.invoke(self.callback, **ctx.params)
08:45:53.905 | File "/opt/buildhome/python3.7/lib/python3.7/site-packages/click/core.py", line 760, in invoke
08:45:53.906 | return __callback(*args, **kwargs)
08:45:53.906 | File "/opt/buildhome/python3.7/lib/python3.7/site-packages/mkdocs/__main__.py", line 247, in build_command
08:45:53.906 | cfg = config.load_config(**kwargs)
08:45:53.906 | File "/opt/buildhome/python3.7/lib/python3.7/site-packages/mkdocs/config/base.py", line 363, in load_config
08:45:53.906 | errors, warnings = cfg.validate()
08:45:53.906 | File "/opt/buildhome/python3.7/lib/python3.7/site-packages/mkdocs/config/base.py", line 228, in validate
08:45:53.906 | run_failed, run_warnings = self._validate()
08:45:53.906 | File "/opt/buildhome/python3.7/lib/python3.7/site-packages/mkdocs/config/base.py", line 186, in _validate
08:45:53.906 | self[key] = config_option.validate(value)
08:45:53.907 | File "/opt/buildhome/python3.7/lib/python3.7/site-packages/mkdocs/config/config_options.py", line 147, in validate
08:45:53.907 | return self.run_validation(value)
08:45:53.907 | File "/opt/buildhome/python3.7/lib/python3.7/site-packages/mkdocs/config/config_options.py", line 939, in run_validation
08:45:53.907 | self.load_plugin_with_namespace(name, cfg)
08:45:53.907 | File "/opt/buildhome/python3.7/lib/python3.7/site-packages/mkdocs/config/config_options.py", line 975, in load_plugin_with_namespace
08:45:53.907 | return (name, self.load_plugin(name, config))
08:45:53.907 | File "/opt/buildhome/python3.7/lib/python3.7/site-packages/mkdocs/config/config_options.py", line 1001, in load_plugin
08:45:53.907 | plugin = plugin_cls()
08:45:53.907 | File "/opt/buildhome/python3.7/lib/python3.7/site-packages/mkdocs_rss_plugin/plugin.py", line 65, in __init__
08:45:53.908 | self.util = Util()
08:45:53.908 | File "/opt/buildhome/python3.7/lib/python3.7/site-packages/mkdocs_rss_plugin/util.py", line 74, in __init__
08:45:53.908 | CiHandler(git_repo.git).raise_ci_warnings()
08:45:53.908 | File "/opt/buildhome/python3.7/lib/python3.7/site-packages/mkdocs_rss_plugin/git_manager/ci.py", line 28, in raise_ci_warnings
08:45:53.908 | n_commits = self.commit_count()
08:45:53.908 | File "/opt/buildhome/python3.7/lib/python3.7/site-packages/mkdocs_rss_plugin/git_manager/ci.py", line 87, in commit_count
08:45:53.908 | refs = [x.split()[0] for x in refs]
08:45:53.908 | File "/opt/buildhome/python3.7/lib/python3.7/site-packages/mkdocs_rss_plugin/git_manager/ci.py", line 87, in <listcomp>
08:45:53.909 | refs = [x.split()[0] for x in refs]
08:45:53.909 | IndexError: list index out of range
domenkozar commented
@Guts would you accept a PR that makes git integration optional if dates are retrieved using meta
?
Guts commented
Hi @domenkozar,
Thanks for your proposal, it values your issue which was quite... dry until now!
Yes, it's sounds like a good idea to make the plugin independent from git installation. It might represent a huge work to avoid side effects but feel free to submit a PR. I would be happy to review or contribute to it :).
Guts commented
Hi @domenkozar,
Any chance to see your PR adressing this use-case?
domenkozar commented
I didn't bother implementing it properly, just created a fork to move on: cachix@017bdb5