Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate 'mkdocs_include_markdown_plugin' from project #470

Closed
mondeja opened this issue Nov 29, 2020 · 7 comments
Closed

Separate 'mkdocs_include_markdown_plugin' from project #470

mondeja opened this issue Nov 29, 2020 · 7 comments

Comments

@mondeja
Copy link
Contributor

mondeja commented Nov 29, 2020

First of all, thanks for this utility, it's really useful.

Reading the documentation I've discovered the clean and concise way to include part of the README inside the Home in the documentation that this project has. It would be awesome if the plugin mkdocs_include_markdown_plugin could be separated of this project so could be installed as a PyPI library for reuse it in other projects. Do you plan this separation at some point or is it something that you are not willing to maintain?

@joerick
Copy link
Contributor

joerick commented Dec 1, 2020

Hey @mondeja! Thanks! It was just a workflow that made sense to me. and I can see that other projects might find it useful. But I do wonder how much work it would be to make it generally useful for a variety of projects, and I think I've got enough open source maintenance in my life at the moment! :) however, if you'd like to spin it out as a separate project and publish it on PyPI, please do.

@joerick joerick closed this as completed Dec 1, 2020
@YannickJadoul
Copy link
Member

I guess it should be reasonably easy to vendor this one file in a project? Not as clean, but a nice first solution?

If you do extract the project, do let us know, @mondeja! It might be interesting to reuse in cibuildwheel, then :-)

@mondeja
Copy link
Contributor Author

mondeja commented Dec 1, 2020

Perfect, thanks! I schedule it to organize the package when I have a gap and will comment on it here when it's done.

@mondeja
Copy link
Contributor Author

mondeja commented Dec 4, 2020

I've separated the package. You can found the project at mondeja/mkdocs-include-markdown-plugin with the documentation in the README. Can be installed with:

pip install mkdocs-include-markdown-plugin
plugins:
  - include-markdown

Let me know if you want to change something. These are the details of the implementation:

  • Released in version 0.1.0 instead of 1.0.0 of setup.py. I would plan the bumping to 1.0.0 soon if everything works.
  • Used the Apache 2.0 License included in the setup.py file of the package, using "2017-2020" as years and "Joe Rickerby and contributors" as authors.
  • Changed the name of the directive includemarkdown by include-markdown, so it's more unified with the name of the package.
  • Changed the name of the plugin in setup.py from importmarkdown to include-markdown, so it's more unified with the name of the package and the main directive.
  • Added tests and restructured modules to make testing possible (almost all the code of plugin.py has been separated to event.py).
  • Added flake8 and isort linting to the library.

I've tested in one of my projects and it works at expected.

@joerick
Copy link
Contributor

joerick commented Dec 4, 2020

Nice one, all sounds great!

@mondeja
Copy link
Contributor Author

mondeja commented Dec 4, 2020

I'm going to release the stable 1.0.0 version. Would you accept a pull to use the package in cibuildwheel documentation @joerick?

@joerick
Copy link
Contributor

joerick commented Dec 4, 2020

Absolutely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants