Giter Club home page Giter Club logo

Comments (9)

cmacmackin avatar cmacmackin commented on May 27, 2024

That not exactly how it works. Any doc-comments are processed by markdown and held in a string by whatever object they are documenting. The documentation is actually produced using Jinja2 templates. It would certainly be possible to provide Markdown (or possibly even LaTeX) output, but it would require me to write a whole new set of Jinja2 templates. This is not a trivial task, especially as a lot of the logic of the program is actually contained within the templates. I may do it at some point, but I won't be at the moment.

However, this is something which someone else could certainly work on. Basically, what it would require is you to copy all of the files in ford/templates into a new directory and convert them to Markdown. You'd probably want to decide on whether you needed all of the files, too. You'd then just have to change ford/output.py slightly so that, if specified, it will load templates from this new directory, instead of the old one.

from ford.

szaghi avatar szaghi commented on May 27, 2024

Hi Chris,

Thanks for the explanation. Presently, I have no time, but never say never. Maybe I will try to contribute on this.

See you soon.

from ford.

szaghi avatar szaghi commented on May 27, 2024

Hi Chris,

I have a question not strictly related to this topic, but I can contact you only in this way...

I have just realized that the "engine" of Ford does a similar work of what I have tried to implent into the engine of MaTiSSe. However, I have done a bad work, rewriting many things that other guys have already made better than me. In particular, you have done a great work using jnija2 and beautifulsoup. I would like to use them. Can you give a link to some good starting point for learning and using them?
MaTiSSe parses markdown and builds html, this should similar to Ford that parses fortran to obtain html...

Thank you very much!

from ford.

cmacmackin avatar cmacmackin commented on May 27, 2024

For Jinja2 I just used their documentation. http://jinja.pocoo.org/docs/dev/templates/ explains how to build templates, while http://jinja.pocoo.org/docs/dev/api/ explains how to call Jinja2 from your program. My use of BeautifulSoup is minimal, to be honest, and I essentially just copied what others had done in similar circumstances. So I can't really recommend were to learn about it.

from ford.

szaghi avatar szaghi commented on May 27, 2024

Ok, thank you.

from ford.

zbeekman avatar zbeekman commented on May 27, 2024

I'm going to close this issue due to inactivity. If someone wants to implement this, or discuss particulars of their proposed design we can re-open or create a new issue.

Thanks!

from ford.

chucklesoclock avatar chucklesoclock commented on May 27, 2024

I'm raising the dead here, but with the ability of GitHub Pages to automatically render project markdown files into a hosted website, it seems that leveraging the markdown-processed doc comments to produce markdown output is a worthy endeavor. At least, this feature would reduce the friction to actually hosting the documentation, especially for projects already on GitHub.

from ford.

ZedThree avatar ZedThree commented on May 27, 2024

Rendering to markdown might also make it easier to use e.g. Jekyll themes too (see also #280). I'm reopening this, it seems like a useful thing to do if someone has time!

@chucklesoclock You might also be interested in this Github Action I wrote that auto-builds FORD docs on pushes to the main branch and commits them to the gh-pages branch: https://github.com/stellaGK/stella/blob/master/.github/workflows/docs.yml
It's sort of a static Github Pages: hosted on Github, but doesn't need to run Jekyll etc

from ford.

chucklesoclock avatar chucklesoclock commented on May 27, 2024

@ZedThree I am definitely interested! However, the projects I wish to build FORD documentation on live outside of Github and would require some form of access control. But hmm, it looks like Github has easy settings for that. Perhaps this can be a push towards joining the rest of the world here. Will definitely check your action out though, many thanks!

from ford.

Related Issues (20)

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.