File tree Expand file tree Collapse file tree 3 files changed +30
-8
lines changed Expand file tree Collapse file tree 3 files changed +30
-8
lines changed Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
3
+ module . exports = ( page ) => {
4
+ const segments = [ ]
5
+ if ( page . component . latest !== page . componentVersion ) segments . push ( `${ page . version } @` )
6
+ segments . push ( `${ page . component . name } :` )
7
+ segments . push ( page . module === 'ROOT' ? ':' : `${ page . module } :` )
8
+ segments . push ( page . relativeSrcPath )
9
+ return segments . join ( '' )
10
+ }
Original file line number Diff line number Diff line change
1
+ ; ( function ( ) {
2
+ 'use strict'
3
+
4
+ var editPageLink = document . querySelector ( '.toolbar .edit-this-page a' )
5
+ if ( ! editPageLink ) return
6
+ editPageLink . addEventListener ( 'click' , function ( e ) {
7
+ if ( e . altKey ) navigator . clipboard . writeText ( document . querySelector ( 'head meta[name=page-spec]' ) . content )
8
+ } )
9
+ } ) ( )
Original file line number Diff line number Diff line change 1
1
{{ #with page.canonicalUrl }}
2
2
<link rel =" canonical" href =" {{{ this }}} " >
3
3
{{ /with }}
4
- {{ #unless (eq page.attributes.pagination undefined )}}
5
- {{ #with page.previous }}
6
- <link rel =" prev" href =" {{{ relativize ./url }}} " >
7
- {{ /with }}
8
- {{ #with page.next }}
9
- <link rel =" next" href =" {{{ relativize ./url }}} " >
10
- {{ /with }}
11
- {{ /unless }}
4
+ {{ #if page.component }}
5
+ <meta name =" page-spec" content =" {{ spec page }} " >
6
+ {{ /if }}
12
7
{{ #with page.description }}
13
8
<meta name =" description" content =" {{ this }} " >
14
9
{{ /with }}
18
13
{{ #with (or antoraVersion site.antoraVersion )}}
19
14
<meta name =" generator" content =" Antora {{ this }} " >
20
15
{{ /with }}
16
+ {{ #unless (eq page.attributes.pagination undefined )}}
17
+ {{ #with page.previous }}
18
+ <link rel =" prev" href =" {{{ relativize ./url }}} " >
19
+ {{ /with }}
20
+ {{ #with page.next }}
21
+ <link rel =" next" href =" {{{ relativize ./url }}} " >
22
+ {{ /with }}
23
+ {{ /unless }}
You can’t perform that action at this time.
0 commit comments