Git Product home page Git Product logo

gh-md-to-moodle's People

Contributors

jkittner avatar pre-commit-ci[bot] avatar

Stargazers

 avatar

Watchers

 avatar

gh-md-to-moodle's Issues

Add `requirements.txt`? and other questions & suggestions

Hello,
I'm the maintainer of gh-md-to-html and I have some questions and suggestions regarding gh-md-to-moodle, if that's okay with you :)

I noticed gh-md-to-moodle declares its dependencies in your setup.cfg-file. Whilst this is (as far as I'm aware?) the recommended method, it is neither recognized by dependabot, nor is it recognized by the GitHub Dependency Graph, who both only look at setup.py and requirements.txt.
Having the project's dependencies recognized by the GitHub Dependency Graph means that (a) you are notified of potential vulnerabilities in your dependencies if they arise, (b) your dependencies are publically and easily visible in the Insights-Tab of your repository, and (c) your project gets listed in the dependents of the repositories you depend on, which potentially helps their maintainers (like me) become aware of your usage of your tool (potentially useful if they want to learn more about their user base), plus it looks good in their repositories (which actually is the main reason I decided to file this issue for).
You might consider additionally adding your dependencies to a requirements.txt-file for the reasons above.

Another thing I noticed is that you strip the newline after and in front of opening and closing code-tags. I'm not exactly sure why you are doing this, but if this serves to compensate for a bug in gh-md-to-html, then I'd be happy to fix said bug! :D

It also seems like you inject some JavaScript into the generated page, that then embeds some CSS into the page's header, which causes Moodle not to display the file correctly in the preview (according to your README). Did you consider using the extra_css argument in gh_md_to_html.main() to add some additional HTML like gh-md-to-html's README suggests? It might work too (unless you need the CSS to be specifically part of the header of the page), and display better in the preview.

It also seems to me like you are trying to reverse the effects of gh-md-to-html caching images and changing links to images within the rendered HTML. You can do this supplying enable_image_downloading=False to gh_md_to_html.main, which is probably a cleaner solution (not properly documented yet, though, admittedly).

I'm also somewhat confused about the nature of the CSS you inject: Is it merely supposed to make the generated page blend in with Moodle better (as seems to be the case with the pink color for code blocks), or does it also fix potential problems with the styling gh-md-to-html injects? If it's (partially) the later one, feel free to file an issue in gh-md-to-html (or tell me about it in this issue) so I can try to fix them. :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.