From e0aafd03d855ca77eff8bd5edf8a137c3d1dd000 Mon Sep 17 00:00:00 2001 From: jmg Date: Sat, 11 Aug 2018 13:14:56 +0200 Subject: [PATCH] Generate README.md from examples/README.jl as an example. --- README.md | 10 ++++++++++ examples/README.jl | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 examples/README.jl diff --git a/README.md b/README.md index 213c677..0aec609 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,14 @@ an option to "clean" the source from all metadata, and produce a pure Julia scri Using a single source file for multiple purposes reduces maintenance, and makes sure your different output formats are synced with each other. +This README was generated directly from +[this source file](https://github.com/fredrikekre/Literate.jl/blob/master/examples/README.jl) +running these commands from the package root of Literate.jl: +```julia +using Literate +Literate.markdown("examples/README.jl", "."; documenter=false) +``` [docs-latest-img]: https://img.shields.io/badge/docs-latest-blue.svg [docs-latest-url]: https://fredrikekre.github.io/Literate.jl/stable/ @@ -28,3 +35,6 @@ your different output formats are synced with each other. [codecov-img]: https://codecov.io/gh/fredrikekre/Literate.jl/branch/master/graph/badge.svg [codecov-url]: https://codecov.io/gh/fredrikekre/Literate.jl + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + diff --git a/examples/README.jl b/examples/README.jl new file mode 100644 index 0000000..4c6d62c --- /dev/null +++ b/examples/README.jl @@ -0,0 +1,36 @@ +# # Literate +# +# | **Documentation** | **Build Status** | +# |:--------------------------------------- |:----------------------------------------------------------------------------------------------- | +# | [![][docs-latest-img]][docs-latest-url] | [![][travis-img]][travis-url] [![][appveyor-img]][appveyor-url] [![][codecov-img]][codecov-url] | +# +# Literate is a package for [Literate Programming](https://en.wikipedia.org/wiki/Literate_programming). +# The main purpose is to facilitate writing Julia examples/tutorials that can be included in +# your package documentation. + +# Literate can generate markdown pages +# (for e.g. [Documenter.jl](https://github.com/JuliaDocs/Documenter.jl)), and +# [Jupyter notebooks](http://jupyter.org/), from the same source file. There is also +# an option to "clean" the source from all metadata, and produce a pure Julia script. +# Using a single source file for multiple purposes reduces maintenance, and makes sure +# your different output formats are synced with each other. +# +# This README was generated directly from +# [this source file](https://github.com/fredrikekre/Literate.jl/blob/master/examples/README.jl) +# running these commands from the package root of Literate.jl: + +using Literate +Literate.markdown("examples/README.jl", "."; documenter=false) + +# [docs-latest-img]: https://img.shields.io/badge/docs-latest-blue.svg +# [docs-latest-url]: https://fredrikekre.github.io/Literate.jl/stable/ +# +# [travis-img]: https://travis-ci.org/fredrikekre/Literate.jl.svg?branch=master +# [travis-url]: https://travis-ci.org/fredrikekre/Literate.jl +# +# [appveyor-img]: https://ci.appveyor.com/api/projects/status/xe0ghtyas12wv555/branch/master?svg=true +# [appveyor-url]: https://ci.appveyor.com/project/fredrikekre/Literate-jl/branch/master +# +# [codecov-img]: https://codecov.io/gh/fredrikekre/Literate.jl/branch/master/graph/badge.svg +# [codecov-url]: https://codecov.io/gh/fredrikekre/Literate.jl +#