diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7e4bddef..2a6dfe7b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ If you use jrnl, you can totally make my day by just saying "thanks for the code Docs & Typos ------------ -If you find a typo or a mistake in the docs, just fix it right away and send a pull request. The Right Way™ to fix the docs is to edit the `docs/*.rst` files on the **master** branch. You can see the result if you run `make html` inside docs, and then open `docs/_build/html/index.html` in your browser. Changes to the CSS or Javascript should be made on `docs/_themes/jrnl/`. The `gh-pages` branch is automatically maintained and updates from `master`. +If you find a typo or a mistake in the docs, just fix it right away and send a pull request. The Right Way™ to fix the docs is to edit the `docs/*.rst` files on the **master** branch. You can see the result if you run `make html` inside the project's root directory, and then open `docs/_build/html/index.html` in your browser. Note that this requires [lessc](http://lesscss.org/#using-less-installation) to be installed. Changes to the CSS or Javascript should be made on `docs/_themes/jrnl/`. The `gh-pages` branch is automatically maintained and updates from `master`; you should never have to edit that. Bugs ---- diff --git a/Makefile b/Makefile index 51939f90..56eb4598 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,13 @@ clean: rm -rf _static rm -f *.html +html: + curl https://raw.githubusercontent.com/mateuszkocz/3l/master/3L/3L.less > docs/_themes/jrnl/static/less/3L.less ;\ + lessc --clean-css docs/_themes/jrnl/static/less/jrnl.less docs/_themes/jrnl/static/css/jrnl.css ;\ + cd docs ;\ + make html ;\ + cd .. ;\ + open docs/_build/html/index.html ;\ # Build GitHub Page from docs docs: diff --git a/docs/_themes/jrnl/static/less/docs.less b/docs/_themes/jrnl/static/less/docs.less index 3eaa34b3..eb12bb48 100644 --- a/docs/_themes/jrnl/static/less/docs.less +++ b/docs/_themes/jrnl/static/less/docs.less @@ -108,15 +108,11 @@ a:hover, a:active { background:transparent !important; } -.highlight-output - { - .pre-block; - background: desaturate(lighten(@terminal,10), 10); - } -.highlight-javascript +.highlight-output, .highlight-javascript, .highlight-sh { .pre-block; background: desaturate(lighten(@terminal,10), 10); + pre {color: white;} } .highlight-python { diff --git a/docs/recipes.rst b/docs/recipes.rst index 98fce943..e1aef9a9 100644 --- a/docs/recipes.rst +++ b/docs/recipes.rst @@ -44,7 +44,9 @@ If you want to import a file as an entry to jrnl, you can just do ``jrnl < entry echo `stat -f %Sm -t '%d %b %Y at %H:%M: ' entry.txt` `cat entry.txt` | jrnl -The first part will format the modification date of ``entry.txt``, and then combine it with the contents of the file before piping it to jrnl. If you do that often, consider creating a function in your ``.bashrc`` or ``.bash_profile`` :: +The first part will format the modification date of ``entry.txt``, and then combine it with the contents of the file before piping it to jrnl. If you do that often, consider creating a function in your ``.bashrc`` or ``.bash_profile`` + +.. code-block:: sh jrnlimport () { echo `stat -f %Sm -t '%d %b %Y at %H:%M: ' $1` `cat $1` | jrnl @@ -57,9 +59,11 @@ Using templates Say you always want to use the same template for creating new entries. If you have an :doc:`external editor ` set up, you can use this :: jrnl < my_template.txt - jrnl -1 --edit + $ jrnl -1 --edit -Another nice solution that allows you to define individual prompts comes from `Jacobo de Vera `_ :: +Another nice solution that allows you to define individual prompts comes from `Jacobo de Vera `_: + +.. code-block:: sh function log_question() {