Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Embed source code into generated documentation. (ponylang#2439)
* add js and css file for docs at build time * avoid warning for docs contents and start to list source files into mkdocs.yml. * Get a first basic version of source embedding working. * Fix layout js and css. * Fix source read not putting at null terminator at end.. * Avoid parsing code twice. * Make bigger numbering so it handles up to 9999 lines. * Add more margin for the code so it is spaced properly with the numberings. * Escape triple back tick in markdown so it does not fail parsing when there is markdown code in source code. * Handle name clashes. * cleanup file. * Cleanup file. * Auto scroll to selected lines. * Add link to source code for methods. * Add link to sources for field and entities. * Remove border for code. * Avoid buffer overflow when reading source file. * Move path related function into paths.h * Add the trick to use multiple backtick. * Factorize code for adding source link. * Better display for source link. * remove unsued method. * Avoid leaking memory. * Put each source code in a folder with its package name. * make path more robust when embedding source code in documentation * fix merge. * copy .docs files to the generated documentation. * Add newer version of highlight.js * Fix some compile errors on Linux. * fix more compilations error on Linux. * fix one more compile error on Linux * Add comments and assert. * Embed source code into documentation * Fix a couple of issues thanks to mfelsche code review. * Add support for older browsers by adding retro-compatibility CSS property for the hidden attribute. * Fix more memory leaks in the documentation generation. * Use linked list to manage the source file included in the documentation generation. * Make link to source code fonts smaller using CSS. * Fix compilation on older GCC. * Fix duplicate entry in mkdocs.yml for source file. * Fix get_file_name modifying its argument on linux. * Remove unecessary const on result of some path functions. * Fix confusion for get_file_name which does NOT allocate a new string. * Wrap full source code file into a HTML block to process them later on. * Remove hidden attribute for the div that wrap source file. * Remove extra file that will be part of the official them. Also remove wrappre div for souce code file. * Remove no more used functions for copying extra documentation files. * Remove copy_file_content function which is no more used. * Fix few issues with markdown layout. * Use span instead of div for link to source code. * Use pony custom allocator instead of malloc/calloc/free. * Switch theme for mkdocs from readthedocs to ponylang. * install offical pony mkdocs'theme by default * Fix installation of mkdocs and custom theme in travis script.
- Loading branch information