jekyll-theme-docgen 1.1.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +47 -0
  3. data/_includes/break +1 -0
  4. data/_includes/head-docgen.html +17 -0
  5. data/_includes/page-break-docgen +1 -0
  6. data/_layouts/404-docgen.html +39 -0
  7. data/_layouts/default-docgen.html +14 -0
  8. data/_layouts/default.html +4 -15
  9. data/_layouts/index-docgen.html +46 -0
  10. data/_layouts/latex-docgen.html +4 -0
  11. data/_layouts/latex.html +2 -2
  12. data/_layouts/mla-docgen.html +30 -0
  13. data/_layouts/mla.html +2 -2
  14. data/_sass/{docgen-default.scss → docgen/default-docgen.scss} +3 -1
  15. data/_sass/docgen/docgen/_api.scss +76 -0
  16. data/_sass/docgen/{_base.scss → docgen/_base.scss} +33 -7
  17. data/_sass/docgen/{_layout.scss → docgen/_layout.scss} +0 -0
  18. data/_sass/docgen/{_syntax-highlighting.scss → docgen/_syntax-highlighting.scss} +0 -0
  19. data/_sass/docgen/{_utils.scss → docgen/_utils.scss} +0 -0
  20. data/_sass/docgen/fonts/computer-modern.scss +22 -0
  21. data/_sass/docgen/fonts/source-code-pro.scss +240 -0
  22. data/_sass/docgen/latex-docgen.scss +43 -0
  23. data/_sass/docgen/mla-docgen.scss +21 -0
  24. data/_sass/docgen/slides-docgen.scss +2 -0
  25. data/assets/docgen/css/default-style-docgen.scss +4 -0
  26. data/assets/docgen/css/latex-style-docgen.scss +4 -0
  27. data/assets/docgen/css/mla-style-docgen.scss +4 -0
  28. data/assets/fonts/computer-modern/SIL Open Font License.txt b/data/assets/docgen/fonts/computer-modern/SIL Open Font → License.txt +0 -0
  29. data/assets/{fonts → docgen/fonts}/computer-modern/cmunbx.ttf +0 -0
  30. data/assets/{fonts → docgen/fonts}/computer-modern/cmunrm.ttf +0 -0
  31. data/assets/docgen/fonts/computer-modern/cmuntb.ttf +0 -0
  32. data/assets/{fonts → docgen/fonts}/computer-modern/cmunti.ttf +0 -0
  33. data/assets/docgen/fonts/source-code-pro/EOT/SourceCodePro-Black.eot +0 -0
  34. data/assets/docgen/fonts/source-code-pro/EOT/SourceCodePro-BlackIt.eot +0 -0
  35. data/assets/docgen/fonts/source-code-pro/EOT/SourceCodePro-Bold.eot +0 -0
  36. data/assets/docgen/fonts/source-code-pro/EOT/SourceCodePro-BoldIt.eot +0 -0
  37. data/assets/docgen/fonts/source-code-pro/EOT/SourceCodePro-ExtraLight.eot +0 -0
  38. data/assets/docgen/fonts/source-code-pro/EOT/SourceCodePro-ExtraLightIt.eot +0 -0
  39. data/assets/docgen/fonts/source-code-pro/EOT/SourceCodePro-It.eot +0 -0
  40. data/assets/docgen/fonts/source-code-pro/EOT/SourceCodePro-Light.eot +0 -0
  41. data/assets/docgen/fonts/source-code-pro/EOT/SourceCodePro-LightIt.eot +0 -0
  42. data/assets/docgen/fonts/source-code-pro/EOT/SourceCodePro-Medium.eot +0 -0
  43. data/assets/docgen/fonts/source-code-pro/EOT/SourceCodePro-MediumIt.eot +0 -0
  44. data/assets/docgen/fonts/source-code-pro/EOT/SourceCodePro-Regular.eot +0 -0
  45. data/assets/docgen/fonts/source-code-pro/EOT/SourceCodePro-Semibold.eot +0 -0
  46. data/assets/docgen/fonts/source-code-pro/EOT/SourceCodePro-SemiboldIt.eot +0 -0
  47. data/assets/docgen/fonts/source-code-pro/LICENSE.txt +93 -0
  48. data/assets/docgen/fonts/source-code-pro/OTF/SourceCodePro-Black.otf +0 -0
  49. data/assets/docgen/fonts/source-code-pro/OTF/SourceCodePro-BlackIt.otf +0 -0
  50. data/assets/docgen/fonts/source-code-pro/OTF/SourceCodePro-Bold.otf +0 -0
  51. data/assets/docgen/fonts/source-code-pro/OTF/SourceCodePro-BoldIt.otf +0 -0
  52. data/assets/docgen/fonts/source-code-pro/OTF/SourceCodePro-ExtraLight.otf +0 -0
  53. data/assets/docgen/fonts/source-code-pro/OTF/SourceCodePro-ExtraLightIt.otf +0 -0
  54. data/assets/docgen/fonts/source-code-pro/OTF/SourceCodePro-It.otf +0 -0
  55. data/assets/docgen/fonts/source-code-pro/OTF/SourceCodePro-Light.otf +0 -0
  56. data/assets/docgen/fonts/source-code-pro/OTF/SourceCodePro-LightIt.otf +0 -0
  57. data/assets/docgen/fonts/source-code-pro/OTF/SourceCodePro-Medium.otf +0 -0
  58. data/assets/docgen/fonts/source-code-pro/OTF/SourceCodePro-MediumIt.otf +0 -0
  59. data/assets/docgen/fonts/source-code-pro/OTF/SourceCodePro-Regular.otf +0 -0
  60. data/assets/docgen/fonts/source-code-pro/OTF/SourceCodePro-Semibold.otf +0 -0
  61. data/assets/docgen/fonts/source-code-pro/OTF/SourceCodePro-SemiboldIt.otf +0 -0
  62. data/assets/docgen/fonts/source-code-pro/TTF/SourceCodePro-Black.ttf +0 -0
  63. data/assets/docgen/fonts/source-code-pro/TTF/SourceCodePro-BlackIt.ttf +0 -0
  64. data/assets/docgen/fonts/source-code-pro/TTF/SourceCodePro-Bold.ttf +0 -0
  65. data/assets/docgen/fonts/source-code-pro/TTF/SourceCodePro-BoldIt.ttf +0 -0
  66. data/assets/docgen/fonts/source-code-pro/TTF/SourceCodePro-ExtraLight.ttf +0 -0
  67. data/assets/docgen/fonts/source-code-pro/TTF/SourceCodePro-ExtraLightIt.ttf +0 -0
  68. data/assets/docgen/fonts/source-code-pro/TTF/SourceCodePro-It.ttf +0 -0
  69. data/assets/docgen/fonts/source-code-pro/TTF/SourceCodePro-Light.ttf +0 -0
  70. data/assets/docgen/fonts/source-code-pro/TTF/SourceCodePro-LightIt.ttf +0 -0
  71. data/assets/docgen/fonts/source-code-pro/TTF/SourceCodePro-Medium.ttf +0 -0
  72. data/assets/docgen/fonts/source-code-pro/TTF/SourceCodePro-MediumIt.ttf +0 -0
  73. data/assets/docgen/fonts/source-code-pro/TTF/SourceCodePro-Regular.ttf +0 -0
  74. data/assets/docgen/fonts/source-code-pro/TTF/SourceCodePro-Semibold.ttf +0 -0
  75. data/assets/docgen/fonts/source-code-pro/TTF/SourceCodePro-SemiboldIt.ttf +0 -0
  76. metadata +77 -27
  77. data/_includes/head.html +0 -13
  78. data/_layouts/docgen-index.html +0 -25
  79. data/_layouts/slides.html +0 -4
  80. data/_sass/docgen-latex.scss +0 -69
  81. data/_sass/docgen-mla.scss +0 -2
  82. data/_sass/docgen-slides.scss +0 -2
  83. data/_sass/docgen/_api.scss +0 -14
  84. data/assets/css/default-style.scss +0 -3
  85. data/assets/css/latex-style.scss +0 -3
  86. data/assets/css/mla-style.scss +0 -3
  87. data/assets/css/slides-style.scss +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e29b75829d43dba846b8a9f3ff56e0eb0dd814578e895383d4d61fb326122223
4
- data.tar.gz: 9439fd9810a3bdbd73c96e9395cb6cb1d83f0b15408aed3d39e8055b7c34df9e
3
+ metadata.gz: 7143df9bb7ca7a80f988de7c7004773171ae0448c24cb9a6e1ecf7ec8b6e109c
4
+ data.tar.gz: e3de2138f8d75cbda6e91c856eb44decacacfa6299f92547e8e7c61418311eb2
5
5
  SHA512:
6
- metadata.gz: 2ce0908da296f714bf42f64a1efc1e4836464d3f4e4daf0de13f28435250617f9017ff00605ec41376af69b8d36224cfd0e27f498208b30a955e7becd175922a
7
- data.tar.gz: 4e4aa04db9513daafd4a86c9881ab1d1c28ef06562ad454e699a9712cdfdb5c2cf3635d25bcc41642ba4887c456d9eb495f1537a047368359295355c6f24d656
6
+ metadata.gz: d3387331f92f4ff90e485c7d177eb87459588b28ad69f2f44493e2ee0fe532fdbc978e77f6cc0e40a2fba4583a748d7fa6c47619dc12678c4a87b4f2fd4f95ec
7
+ data.tar.gz: 5aa818ce88b21088d7815f33a1f940bca3662a73b6fe54edd657db51411727811dcc82dcc1a5064329e97d20b9385d875028cbe9158167f9a4f426f56bd2607a
data/README.md CHANGED
@@ -1,3 +1,50 @@
1
1
  # DocGen
2
2
  DocGen is a document generation helper built using Jekyll, as an alternative to
3
3
  LaTeX for the uninitiated. It is NOT for blogging.
4
+
5
+ Uses MathJax for custom styles.
6
+
7
+ ### Examples
8
+ See the `examples` folder for examples of how to use this theme.
9
+
10
+ ### Includes API
11
+ - `{% include page-break-docgen %}` - Inserts a page break when printing, useful
12
+ when printing to PDF
13
+ - `{% include break %}` - Shortcut for `{% include page-break-docgen %}`
14
+
15
+ ### CSS API
16
+ Some of the available styles are easier to use without an `include`.
17
+
18
+ - `pre.utf-box-drawing`, `code.utf-box-drawing` - Sets the font to "Source Code Pro",
19
+ which is compatible with the utf box drawing characters.
20
+ - `div.page-break` - A page break.
21
+ - `div.horizontal-line` - A container with a 1px black border top.
22
+ - `div.display` - A `div` that follows flexbox wrapping rules.
23
+ - `ol.heirarchical` - A list that supports the numbered-lettered-numeraled structure.
24
+
25
+ ### Layouts
26
+
27
+ #### Documents
28
+ - `default-docgen` - Base layout for docgen.
29
+ - `latex-docgen` - Emulates a LaTeX document.
30
+ - `mla-docgen` - Emulates an MLA-style document, i.e. 12pt Times New Roman with header.
31
+
32
+ #### Utility Pages
33
+ - `index-docgen` - Utility page that lists all documents.
34
+ - `404-docgen` - Utility page for handling 404 errors.
35
+ - `default` - shortcut for `default-docgen`.
36
+ - `latex` - shortcut for `latex-docgen`.
37
+ - `mla` - shortcut for `mla-docgen`.
38
+
39
+ ### Page & Site Properties
40
+ - `lang` - Set the language in `_config.yml` or in the front matter
41
+ - `mla` & `mla-docgen` - In the front matter, you can set:
42
+
43
+ - `author`
44
+ - `instructor`
45
+ - `course`
46
+ - `date`
47
+
48
+ All of which are copied verbatim. You can also set `title` in the front matter,
49
+ which is copied verbatim into own paragraph where the MLA standard says it should go.
50
+
@@ -0,0 +1 @@
1
+ {% include page-break-docgen %}
@@ -0,0 +1,17 @@
1
+ <head>
2
+ <meta charset="utf-8">
3
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
4
+ <meta name="viewport" content="width=device-width, initial-scale=1">
5
+ <title>{{ page.title | default: 'docgen-document' }}</title>
6
+ <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
7
+ integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
8
+ crossorigin="anonymous" defer></script>
9
+ <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
10
+ {% assign style = include.style | default: 'default' %}
11
+ {% assign href ='/assets/docgen/css/' | append: style | append: '-style-docgen.css' | relative_url %}
12
+ <link rel="stylesheet" href="{{ href }}">
13
+ {% if include.content %}
14
+ {{ include.content }}
15
+ {% endif %}
16
+ </head>
17
+
@@ -0,0 +1 @@
1
+ <div class="page-break"></div>
@@ -0,0 +1,39 @@
1
+ ---
2
+ ---
3
+ <!DOCTYPE html>
4
+ <html lang="{{ site.lang | default: 'en' }}">
5
+
6
+ {% include head-docgen.html %}
7
+
8
+ <body>
9
+
10
+ <main class="page-content" aria-label="Content">
11
+ <h1>404 Not Found!</h1>
12
+ <p id="404-content">
13
+ The page couldn't be found :(
14
+ </br>
15
+ </br>
16
+ <a href="{{ '/' | relative_url }}">Click here to go back to the homepage</a>
17
+ </p>
18
+ {{ content }}
19
+ </main>
20
+
21
+ <!-- <script>
22
+ function sleep(ms) {
23
+ return new Promise(resolve => setTimeout(resolve, ms));
24
+ }
25
+
26
+ async function redirect() {
27
+ console.log(window.location.pathname);
28
+ if (window.location.pathname == '/') {
29
+ $('#404-content').text("You're being redirected to the correct homepage of this site...");
30
+ await sleep(1000);
31
+ window.location.replace('{{ '/' | relative_url }}');
32
+ }
33
+ }
34
+
35
+ redirect();
36
+ </script> -->
37
+ </body>
38
+
39
+ </html>
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html lang="{{ page.lang | default: site.lang | default: 'en' }}">
3
+
4
+ {% assign page-style = page.layout | downcase | split: '-' | first %}
5
+ {% include head-docgen.html style=page-style %}
6
+
7
+ <body>
8
+ <main class="page-content" aria-label="Content">
9
+ {{ content }}
10
+ <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML' async></script>
11
+ </main>
12
+ </body>
13
+
14
+ </html>
@@ -1,15 +1,4 @@
1
- <!DOCTYPE html>
2
- <html lang="{{ page.lang | default: site.lang | default: 'en' }}">
3
-
4
- {% assign page-style = page.layout | downcase %}
5
- {% include head.html style=page-style %}
6
-
7
- <body>
8
-
9
- <main class="page-content" aria-label="Content">
10
- {{ content }}
11
- </main>
12
-
13
- </body>
14
-
15
- </html>
1
+ ---
2
+ layout: default-docgen
3
+ ---
4
+ {{ content }}
@@ -0,0 +1,46 @@
1
+ ---
2
+ ---
3
+ <!DOCTYPE html>
4
+ <html lang="{{ site.lang | default: 'en' }}">
5
+
6
+ {% include head-docgen.html %}
7
+
8
+ <body>
9
+
10
+ <main class="page-content" aria-label="Content">
11
+ <h1>Pages</h1>
12
+ {% assign sorted-pages = site.pages | sort: "path" %}
13
+ {% for page in sorted-pages %}
14
+ {% assign file-name = page.path | split: '/' | last %}
15
+ {% unless file-name contains 'scss' %}
16
+ <a href="{{ page.url | relative_url }}">{{ page.path }}</a><br/>
17
+ {% endunless %}
18
+ {% endfor %}
19
+
20
+ <br class="clearfix" />
21
+
22
+ {% assign sorted-static-files = site.static_files | sort: "path" %}
23
+ {% assign static-files = '' | split: '' %}
24
+ {% for file in sorted-static-files %}
25
+ {% assign file-name = file.path | split: '/' %}
26
+ {% assign file-path = file.path | append: ':' | split: ':' %}
27
+
28
+ {% unless file-name[1] == 'assets' and file-name[2] == 'docgen' %}
29
+ {% assign static-files = static-files | concat: file-path %}
30
+ {% endunless %}
31
+ {% endfor %}
32
+
33
+ {% if static-files.size > 0 %}
34
+ <h1>Static Files</h1>
35
+ {% for file-path in static-files %}
36
+ <a href="{{ file-path | relative_url }}">{{ file-path }}</a><br/>
37
+ {% endfor %}
38
+ {% endif %}
39
+
40
+ <br class="clearfix" />
41
+ {{ content }}
42
+ </main>
43
+
44
+ </body>
45
+
46
+ </html>
@@ -0,0 +1,4 @@
1
+ ---
2
+ layout: default-docgen
3
+ ---
4
+ {{ content }}
@@ -1,4 +1,4 @@
1
1
  ---
2
- layout: default
2
+ layout: latex-docgen
3
3
  ---
4
- {{ content }}
4
+ {{ content }}
@@ -0,0 +1,30 @@
1
+ ---
2
+ layout: default-docgen
3
+ ---
4
+ {% if page.header %}
5
+ <p class="noindent">
6
+ {% for line in page.header %}
7
+ {{ line }}
8
+ <br />
9
+ {% endfor %}
10
+ </p>
11
+ {% elsif page.author or page.date or page.instructor or page.course %}
12
+ <p class="noindent">
13
+
14
+ {{ page.author }}
15
+ <br />
16
+ {{ page.instructor }}
17
+ <br />
18
+ {{ page.course }}
19
+ <br />
20
+ {{ page.date }}
21
+ <br />
22
+ </p>
23
+ {% endif %}
24
+ {% assign title = page.title | default: '' | strip %}
25
+ {% unless title == '' %}
26
+ <p class="mla-title">
27
+ {{ title }}
28
+ </p>
29
+ {% endunless %}
30
+ {{ content }}
@@ -1,4 +1,4 @@
1
1
  ---
2
- layout: default
2
+ layout: mla-docgen
3
3
  ---
4
- {{ content }}
4
+ {{ content }}
@@ -12,7 +12,7 @@ $spacing-unit: 30px !default;
12
12
 
13
13
  $text-color: #111 !default;
14
14
  $background-color: #fdfdfd !default;
15
- $brand-color: #2a7ae2 !default;
15
+ $link-color: #2a7ae2 !default;
16
16
 
17
17
  $grey-color: #828282 !default;
18
18
  $grey-color-light: lighten($grey-color, 40%) !default;
@@ -24,6 +24,7 @@ $blockquote-border-color: $grey-color-light !default;
24
24
 
25
25
  $table-border-color: $grey-color-light !default;
26
26
 
27
+ $code-font-family: "Source Code Pro", "Consolas", "Monaco", "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New" !default;
27
28
  $code-text-color: $text-color !default;
28
29
  $code-block-border-color: $grey-color-light !default;
29
30
  $code-block-background-color: #eef !default;
@@ -33,6 +34,7 @@ $syntax-highlighting-background-color: #fff !default;
33
34
  $content-width: 800px !default;
34
35
 
35
36
  @import
37
+ "fonts/source-code-pro",
36
38
  "docgen/utils",
37
39
  "docgen/syntax-highlighting",
38
40
  "docgen/base",
@@ -0,0 +1,76 @@
1
+ // @media print {
2
+ // hr, div.horizontal-line {
3
+ // // -webkit-print-color-adjust: exact;
4
+ // }
5
+ // }
6
+
7
+ %horizontal-line {
8
+ margin-top: $spacing-unit;
9
+ margin-bottom: $spacing-unit;
10
+ border-top: 1px solid black;
11
+ }
12
+
13
+ hr, div.horizontal-line, div.page-break {
14
+ @extend %horizontal-line;
15
+ }
16
+
17
+ div.page-break {
18
+ break-after: page;
19
+ }
20
+
21
+ @media print {
22
+ div.page-break {
23
+ height: 0px;
24
+ border-top: none;
25
+ }
26
+ }
27
+
28
+ div.display {
29
+ display: -webkit-box;
30
+ display: -moz-box;
31
+ display: -ms-flexbox;
32
+ display: -webkit-flex;
33
+ display: flex;
34
+ flex-wrap: wrap;
35
+ padding-left: auto;
36
+ padding-right: auto;
37
+ width: 100%;
38
+ margin: 0px;
39
+
40
+ &.center {
41
+ align-items: center;
42
+ justify-content: center;
43
+ }
44
+
45
+ > * {
46
+ margin-left: $spacing-unit / 4;
47
+ margin-right: $spacing-unit / 4;
48
+ }
49
+ }
50
+
51
+
52
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type#Syntax
53
+ ol.heirarchical > li {
54
+ ol, ul {
55
+ //margin-bottom: 0px;
56
+ }
57
+ > ol > li {
58
+ list-style-type: lower-alpha;
59
+
60
+ > ol > li {
61
+ list-style-type: lower-roman;
62
+ }
63
+ }
64
+ }
65
+
66
+ // .citation-docgen {
67
+ // .citation-number-docgen:after {
68
+ // counter-increment: citation-docgen;
69
+ // content: counter(citation-docgen);
70
+ // }
71
+ // }
72
+
73
+ pre.utf-box-drawing,
74
+ code.utf-box-drawing {
75
+ font-family: "Source Code Pro";
76
+ }
@@ -37,11 +37,11 @@ ul, ol {
37
37
  padding: 0px;
38
38
  }
39
39
 
40
- main > {
41
- ul, ol {
42
- margin-left: 0px;
43
- }
44
- }
40
+ // main > {
41
+ // ul, ol {
42
+ // margin-left: 0px;
43
+ // }
44
+ // }
45
45
 
46
46
  li > {
47
47
  ul, ol {
@@ -49,6 +49,8 @@ li > {
49
49
  }
50
50
  }
51
51
 
52
+
53
+
52
54
  /**
53
55
  * Headings
54
56
  */
@@ -62,11 +64,11 @@ h1, h2, h3, h4, h5, h6 {
62
64
  * Links
63
65
  */
64
66
  a {
65
- color: $brand-color;
67
+ color: $link-color;
66
68
  text-decoration: none;
67
69
 
68
70
  &:visited {
69
- color: darken($brand-color, 15%);
71
+ color: darken($link-color, 15%);
70
72
  }
71
73
 
72
74
  &:hover {
@@ -76,6 +78,7 @@ a {
76
78
  }
77
79
 
78
80
 
81
+
79
82
  /**
80
83
  * Blockquotes
81
84
  */
@@ -99,6 +102,7 @@ blockquote {
99
102
  */
100
103
  pre,
101
104
  code {
105
+ font-family: $code-font-family;
102
106
  @include relative-font-size(0.9375);
103
107
  }
104
108
 
@@ -108,6 +112,7 @@ code {
108
112
 
109
113
  pre {
110
114
  border: 1px solid $code-block-border-color;
115
+ line-height: 1.3;
111
116
  border-radius: 3px;
112
117
  padding: 8px 12px;
113
118
  overflow-x: auto;
@@ -119,3 +124,24 @@ pre {
119
124
  padding-left: 0;
120
125
  }
121
126
  }
127
+
128
+
129
+
130
+ /**
131
+ * Tables
132
+ */
133
+ th, td {
134
+ padding: $spacing-unit / 4;
135
+ border: 1px solid black;
136
+ border-collapse: collapse;
137
+ }
138
+
139
+
140
+
141
+ .error-docgen {
142
+ border: 5px solid red;
143
+ color: white !important;
144
+ font-weight: bold;
145
+ min-width: 100%;
146
+ background: red;
147
+ }