umberto 3.2.2 → 4.0.1

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/CHANGELOG.md CHANGED
@@ -1,6 +1,31 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## [4.0.1](https://github.com/cksource/umberto/compare/v4.0.0...v4.0.1) (2023-10-16)
5
+
6
+ ### Bug fixes
7
+
8
+ * Fixed invalid rendering double braces in code snippets. Closes [#1179](https://github.com/cksource/umberto/issues/1179). ([commit](https://github.com/cksource/umberto/commit/68122163660d9e6a3105ac5361cde05c7d4a8a49))
9
+
10
+
11
+ ## [4.0.0](https://github.com/cksource/umberto/compare/v3.2.2...v4.0.0) (2023-10-10)
12
+
13
+ ### BREAKING CHANGES
14
+
15
+ * Upgraded the minimal versions of Node.js to `18.0.0` due to the end of LTS.
16
+
17
+ ### Bug fixes
18
+
19
+ * Added support for perm-link feature on API pages. Closes [#1167](https://github.com/cksource/umberto/issues/1167). ([commit](https://github.com/cksource/umberto/commit/20d167082e126541d3f2867ebebcf57b6c3173f8))
20
+ * Added the `[title]` attribute to the Table of Content and the navigation menu items. Closes [#1175](https://github.com/cksource/umberto/issues/1175). ([commit](https://github.com/cksource/umberto/commit/8f3c15f96864a4e8320d26fb2b0c00746529e06b))
21
+ * Fixed the "See source" button to be clickable when an item does not have a description. Closes [#1172](https://github.com/cksource/umberto/issues/1172). ([commit](https://github.com/cksource/umberto/commit/05b4e3c6893a8d4fdafd5e48c0293a1a50670a35))
22
+
23
+ ### Other changes
24
+
25
+ * Replaced the hyphen-minus (`-`) separator with a vertical pipe (`|`) in the generated title of pages. ([commit](https://github.com/cksource/umberto/commit/8bf6a3afb7337d7d816c3a5206eb3088bc1edf29))
26
+ * Updated the required version of Node.js to 18. See [ckeditor/ckeditor5#14924](https://github.com/ckeditor/ckeditor5/issues/14924). ([commit](https://github.com/cksource/umberto/commit/c7ee14ee127ae5b497569a687e731c40fa6378ef))
27
+
28
+
4
29
  ## [3.2.2](https://github.com/cksource/umberto/compare/v3.2.1...v3.2.2) (2023-08-28)
5
30
 
6
31
  ### Bug fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umberto",
3
- "version": "3.2.2",
3
+ "version": "4.0.1",
4
4
  "description": "CKSource Documentation builder",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -57,8 +57,7 @@
57
57
  "webpack": "^5.74.0"
58
58
  },
59
59
  "engines": {
60
- "node": ">=16.0.0",
61
- "npm": ">=5.7.1"
60
+ "node": ">=18.0.0"
62
61
  },
63
62
  "author": "CKSource (http://cksource.com/)",
64
63
  "license": "MIT",
@@ -39,7 +39,7 @@ hexo.extend.helper.register( 'uToc', ( data, options = {} ) => {
39
39
  .replace( /</g, '&lt;' )
40
40
  .replace( />/g, '&gt;' );
41
41
 
42
- const newItem = `<li><a href="#${ id }">${ text }</a></li>`;
42
+ const newItem = `<li><a href="#${ id }" title="${ text }">${ text }</a></li>`;
43
43
 
44
44
  if ( tocLastLevels[ hLevel ] ) {
45
45
  // If there already is a parent node for current heading level, append the new toc item there.
@@ -52,9 +52,7 @@ class HexoManager {
52
52
  throw new Error( 'Hexo manager is not initialized' );
53
53
  }
54
54
 
55
- // jscs: disable
56
55
  return this.config.public_dir;
57
- // jscs:enable
58
56
  }
59
57
 
60
58
  getSourceDir() {
@@ -62,9 +60,7 @@ class HexoManager {
62
60
  throw new Error( 'Hexo manager is not initialized' );
63
61
  }
64
62
 
65
- // jscs: disable
66
63
  return upath.join( __dirname, '..', this.config.source_dir );
67
- // jscs:enable
68
64
  }
69
65
 
70
66
  getThemePath() {
@@ -72,9 +68,7 @@ class HexoManager {
72
68
  throw new Error( 'Hexo manager is not initialized' );
73
69
  }
74
70
 
75
- // jscs: disable
76
71
  return upath.join( __dirname, '../themes', this.config.theme );
77
- // jscs:enable
78
72
  }
79
73
 
80
74
  /**
@@ -35,3 +35,8 @@ block content
35
35
 
36
36
  block navtree
37
37
  != navTree
38
+
39
+ block projectVersion
40
+ if projectLocals
41
+ meta( name= 'project-version' content= projectLocals.projectVersion )
42
+ meta( name= 'project-slug' content= projectLocals.projectSlug )
@@ -2,7 +2,7 @@ mixin navTreeItem( data )
2
2
  - const _class = page.path === data.path ? 'tree__item__wrapper tree__item__wrapper--active' : 'tree__item__wrapper';
3
3
  - const menuTitle = data[ 'menu-title' ] || uSplitToTitleAndContent( data.content ).title || data.title;
4
4
  li
5
- a( href=relative_url( page.path, data.path ) )
5
+ a( href=relative_url( page.path, data.path ) title=menuTitle )
6
6
  div( class=_class )
7
7
  span( class="tree__item--guide tree__item__text" ) #{ menuTitle }
8
8
  - if( data.shouldDisplayNewIndicator )
@@ -2,7 +2,7 @@ meta( charset='utf-8' )
2
2
  meta( name='viewport' content='width=device-width, initial-scale=1' )
3
3
 
4
4
  - const titleSuffix = page.groupId === 'api-reference' ? page.projectfullname + ' API docs' : page.projectfullname + ' Documentation';
5
- - const title = page[ 'meta-title' ] ? page[ 'meta-title' ] : page[ 'meta-title-short' ] ? page[ 'meta-title-short' ] + ' - ' + titleSuffix : page.title + ' - ' + titleSuffix;
5
+ - const title = page[ 'meta-title' ] ? page[ 'meta-title' ] : page[ 'meta-title-short' ] ? page[ 'meta-title-short' ] + ' | ' + titleSuffix : page.title + ' | ' + titleSuffix;
6
6
  title= title
7
7
 
8
8
  //- Used for meta tag and for og:*
@@ -18,6 +18,9 @@
18
18
  // To keep vertical align with paragraph.
19
19
  top: 0.2em;
20
20
 
21
+ // To keep "See source" link clickable.
22
+ z-index: 1;
23
+
21
24
  // If "See source" exists, we need to add spacing to first paragraph to prevent overlapping text.
22
25
  + .main-description p:first-child{
23
26
  padding-right: 100px;
@@ -1,15 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2017-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md.
4
- */
5
-
6
- 'use strict';
7
-
8
- /**
9
- * Escape character `{{` and `}}` in markdown sources. See #579.
10
- */
11
- hexo.extend.filter.register( 'before_post_render', page => {
12
- page.content = page.content
13
- .replace( /\{\{/g, '{% raw %}{{{% endraw %}' )
14
- .replace( /(?<!%)\}\}/g, '{% raw %}}}{% endraw %}' );
15
- } );