jekyllmd.tpl 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. {%- extends 'markdown.tpl' -%}
  2. <!-- All code cells -->
  3. {%- block codecell %}
  4. {% if 'remove_cell' not in cell.metadata.tags and 'removecell' not in cell.metadata.tags %}
  5. <div markdown="1" class="cell code_cell">
  6. {{- super() }}
  7. </div>
  8. {% endif %}
  9. {% endblock codecell %}
  10. <!-- Add class for input area -->
  11. {% block input %}
  12. {%- if 'remove_input' not in cell.metadata.tags %}
  13. {%- if cell.source != '' -%}
  14. <div class="input_area{% if 'hide_input' in cell.metadata.tags or 'hidecode' in cell.metadata.tags %} hidecode{% endif %}" markdown="1">
  15. ```
  16. {%- if 'magics_language' in cell.metadata -%}
  17. {{ cell.metadata.magics_language}}
  18. {%- elif 'name' in nb.metadata.get('language_info', {}) -%}
  19. {{ nb.metadata.language_info.name }}
  20. {% endif %}
  21. {{- cell.source }}
  22. {% endif %}
  23. ```
  24. </div>
  25. {%- endif %}
  26. {% endblock input %}
  27. <!-- All output areas -->
  28. {% block output %}
  29. <div class="output_wrapper" markdown="1">
  30. <div class="output_subarea{% if 'interactive' in cell.metadata.tags %} output_widget_view{% endif %}" markdown="1">
  31. {{- super() -}}
  32. </div>
  33. </div>
  34. {%- endblock output %}
  35. <!-- Remove indentations for output text -->
  36. {%- block stream %}
  37. {:.output_stream}
  38. ```
  39. {{ output.text -}}
  40. ```
  41. {% endblock stream %}
  42. {% block data_text -%}
  43. {:.output_data_text}
  44. ```
  45. {{ output.data['text/plain'] }}
  46. ```
  47. {% endblock data_text %}
  48. {%- block error %}
  49. {:.output_traceback_line}
  50. ```
  51. {{- super() }}
  52. ```
  53. {% endblock error %}
  54. {%- block data_html %}
  55. <div markdown="0" class="output output_html">
  56. {{ output.data['text/html'] }}
  57. </div>
  58. {% endblock data_html %}
  59. {%- block data_png %}
  60. {:.output_png}
  61. {{- super() -}}
  62. {% endblock data_png %}
  63. <!-- Markdown cells -->
  64. {% block markdowncell %}
  65. {% if 'remove_cell' not in cell.metadata.tags and 'removecell' not in cell.metadata.tags %}
  66. {{- super() }}
  67. {% endif %}
  68. {%- endblock markdowncell %}