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

Copy button added to code block in documentation #98

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

HYP3R00T
Copy link
Contributor

@HYP3R00T HYP3R00T commented Jul 7, 2024

In the existing documentation, we don't have any option to copy the example code. We have to manually select and copy it.

Material for MkDocs provides an easy way to integrate this feature. So, I have added that to our mkdocs.yml. This allows the users to copy the sample code easily and test it in their local system.

Also, in future, when we add more examples, the users will be able to take advantage of the simple copy button.

NOTE:
As I am facing an issue with testing the code (#97), this pull request is not tested as instructed in the development section. However, as it is a very minor change to the yml file of the documentation (which doesn't affect the code), I believe we can skip the testing for this one.

@petereon
Copy link
Owner

petereon commented Jul 7, 2024

Thank you very much for a contribution, it looks very good.

However, last time I've tried to build the docs it wasn't able to build properly in the CI. The tool that's used to build the docs, novella, is no longer maintained. Seems to be a pattern with tooling I opted to use with the beaupy 🥲

@HYP3R00T
Copy link
Contributor Author

HYP3R00T commented Jul 7, 2024

Thanks for responding so promptly. May I ask, what was the initial reason to utilise novella? I have used mkdocs before and never felt the need to preprocess it in an isolated environment. mkdocs doesn't modify any files of the project (as far as I know). Can't we eliminate the need for novella and create a simple pipeline to publish it directly?

However, last time I've tried to build the docs it wasn't able to build properly in the CI.

How can we then merge this change into the project if the CI is building it properly?

@HYP3R00T
Copy link
Contributor Author

HYP3R00T commented Jul 7, 2024

Thanks for responding so promptly. May I ask, why we have novella integrated into this project? As far as I understand, it's basically a build system designed to process files in a temporary directory isolated from the project's source code. But, when we generate a static site using mkdocs, it doesn't modify any source code of the project. Can't we completely get rid of novella and modify the pipeline to build a static site using mkdocs build?

However, last time I've tried to build the docs it wasn't able to build properly in the CI. The tool that's used to build the docs, novella, is no longer maintained.

As the automatic merging is not working, what can I do to integrate the change into the project?

@petereon
Copy link
Owner

petereon commented Jul 7, 2024

Apologies for brevity and lack of structure, I am only available from the phone atm.

I might be remembering this incorrectly but I believe novella was being used to build the markdown API doc from Python docstrings and to the best of my research, mkdocs didn't do that at the time I postulated the job to build the docs.

I am more than happy to look into alternatives soon.

As for the merging, automatic merging is not enabled for this repo, there is no issue merging these changes outside of the fact documentation doesn't currently build on release.

@petereon
Copy link
Owner

Thanks, I am going to merge these changes and I'll work on dealing with the documentation build issue.

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

Successfully merging this pull request may close these issues.

2 participants