@apify/docs-theme 1.0.20 → 1.0.21

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/docs-theme",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -19,8 +19,10 @@
19
19
  "@docusaurus/theme-common": "^2.2.0",
20
20
  "@vcarl/remark-headings": "^0.1.0",
21
21
  "babel-loader": "^9.1.0",
22
+ "highlight.js": "^11.7.0",
22
23
  "prism-react-renderer": "^1.3.5",
23
24
  "react-markdown": "^8.0.4",
25
+ "rehype-highlight": "^6.0.0",
24
26
  "remark-parse": "^10.0.1",
25
27
  "remark-slug": "^7.0.1",
26
28
  "remark-stringify": "^10.0.2",
@@ -11,6 +11,8 @@ import remarkSlug from 'remark-slug';
11
11
  import remarkParse from 'remark-parse';
12
12
  import remarkStringify from 'remark-stringify';
13
13
  import remarkHeadings from '@vcarl/remark-headings';
14
+ import rehypeHighlight from 'rehype-highlight';
15
+ import dockerfile from 'highlight.js/lib/languages/dockerfile';
14
16
 
15
17
  export default function ChangelogPage({ changelog }) {
16
18
  const windowSize = useWindowSize();
@@ -41,21 +43,30 @@ function ChangelogPageDesktop({ changelog, toc }) {
41
43
  title={`Changelog · ${siteConfig.tagline}`}
42
44
  description={siteConfig.tagline}
43
45
  >
44
- <div className='col apiItemCol' style={{ margin: 'auto', display: 'flex', flexDirection: 'row' }}>
45
- <div style={{ flexDirection: 'column' }} className='theme-doc-markdown markdown'>
46
- <ReactMarkdown
47
- remarkPlugins={[remarkSlug]}
48
- >
49
- {changelog}
50
- </ReactMarkdown>
51
- </div>
52
- <div style={{ width: '50%' }}>
53
- <TOC
54
- {...{
55
- toc,
56
- minHeadingLevel: 1,
57
- }}
58
- />
46
+ <div className='docPage docMainContainer' style={{ margin: 'auto' }}>
47
+ <div className="row" style={{ flexWrap: 'nowrap' }}>
48
+ <div style={{ flexDirection: 'column' }} className='theme-doc-markdown markdown col--9'>
49
+ <ReactMarkdown
50
+ remarkPlugins={[remarkSlug]}
51
+ rehypePlugins={[
52
+ [rehypeHighlight,
53
+ {
54
+ languages: { dockerfile },
55
+ ignoreMissing: true,
56
+ },
57
+ ]]}
58
+ >
59
+ {changelog}
60
+ </ReactMarkdown>
61
+ </div>
62
+ <div className="col--3">
63
+ <TOC
64
+ {...{
65
+ toc,
66
+ minHeadingLevel: 1,
67
+ }}
68
+ />
69
+ </div>
59
70
  </div>
60
71
  </div>
61
72
  </Layout>
@@ -591,3 +591,27 @@ html[data-theme='dark'] .actionLink:hover::after {
591
591
  background-image: url('/img/arrow-right-primary.svg');
592
592
  margin-left: 8px;
593
593
  }
594
+
595
+
596
+ pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
597
+ Theme: GitHub
598
+ Description: Light theme as seen on github.com
599
+ Author: github.com
600
+ Maintainer: @Hirse
601
+ Updated: 2021-05-15
602
+
603
+ Outdated base version: https://github.com/primer/github-syntax-light
604
+ Current colors taken from GitHub's CSS
605
+ */
606
+ .hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#005cc5}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-code,.hljs-comment,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}
607
+
608
+ /*!
609
+ Theme: GitHub Dark Dimmed
610
+ Description: Dark dimmed theme as seen on github.com
611
+ Author: github.com
612
+ Maintainer: @Hirse
613
+ Updated: 2021-05-15
614
+
615
+ Colors taken from GitHub's CSS
616
+ */
617
+ html[data-theme="dark"] .hljs{color:#adbac7;background:#22272e}html[data-theme="dark"] .hljs-doctag,html[data-theme="dark"] .hljs-keyword,html[data-theme="dark"] .hljs-meta .hljs-keyword,html[data-theme="dark"] .hljs-template-tag,html[data-theme="dark"] .hljs-template-variable,html[data-theme="dark"] .hljs-type,html[data-theme="dark"] .hljs-variable.language_{color:#f47067}html[data-theme="dark"] .hljs-title,html[data-theme="dark"] .hljs-title.class_,html[data-theme="dark"] .hljs-title.class_.inherited__,html[data-theme="dark"] .hljs-title.function_{color:#dcbdfb}html[data-theme="dark"] .hljs-attr,html[data-theme="dark"] .hljs-attribute,html[data-theme="dark"] .hljs-literal,html[data-theme="dark"] .hljs-meta,html[data-theme="dark"] .hljs-number,html[data-theme="dark"] .hljs-operator,html[data-theme="dark"] .hljs-selector-attr,html[data-theme="dark"] .hljs-selector-class,html[data-theme="dark"] .hljs-selector-id,html[data-theme="dark"] .hljs-variable{color:#6cb6ff}html[data-theme="dark"] .hljs-meta .hljs-string,html[data-theme="dark"] .hljs-regexp,html[data-theme="dark"] .hljs-string{color:#96d0ff}html[data-theme="dark"] .hljs-built_in,html[data-theme="dark"] .hljs-symbol{color:#f69d50}html[data-theme="dark"] .hljs-code,html[data-theme="dark"] .hljs-comment,html[data-theme="dark"] .hljs-formula{color:#768390}html[data-theme="dark"] .hljs-name,html[data-theme="dark"] .hljs-quote,html[data-theme="dark"] .hljs-selector-pseudo,html[data-theme="dark"] .hljs-selector-tag{color:#8ddb8c}html[data-theme="dark"] .hljs-subst{color:#adbac7}html[data-theme="dark"] .hljs-section{color:#316dca;font-weight:700}html[data-theme="dark"] .hljs-bullet{color:#eac55f}html[data-theme="dark"] .hljs-emphasis{color:#adbac7;font-style:italic}html[data-theme="dark"] .hljs-strong{color:#adbac7;font-weight:700}html[data-theme="dark"] .hljs-addition{color:#b4f1b4;background-color:#1b4721}html[data-theme="dark"] .hljs-deletion{color:#ffd8d3;background-color:#78191b}
package/src/theme.js CHANGED
@@ -20,6 +20,9 @@ function theme(
20
20
  ) {
21
21
  return {
22
22
  name: '@apify/docs-theme',
23
+ getPathsToWatch() {
24
+ return ['./pages'];
25
+ },
23
26
  getThemePath() {
24
27
  return '../src/theme';
25
28
  },