Skip to content

Commit 6ccaf36

Browse files
authored
Merge pull request #7 from neo4j-documentation/fix-kb-description
2 parents 0985033 + 37125a1 commit 6ccaf36

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/knowledge-base.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ function generateKnowledgeBasePageDescription(pages) {
139139
page.src.basename !== 'index.adoc' &&
140140
page.asciidoc &&
141141
page.asciidoc.attributes &&
142-
!page.asciidoc.attributes['page-description']
142+
!page.asciidoc.attributes['description']
143143
})
144144
.forEach((page) => {
145-
page.asciidoc.attributes['page-description'] = generateExcerpt(page)
145+
page.asciidoc.attributes['description'] = generateExcerpt(page)
146146
})
147147
}
148148

specs/knowledge-base.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ const { generateKnowledgeBasePageDescription } = require('../lib/knowledge-base'
22
const chai = require('chai')
33
const expect = chai.expect
44

5-
describe('Generate KB page-description', () => {
6-
it('should not generate a page-description when already defined', () => {
5+
describe('Generate KB description', () => {
6+
it('should not generate a description when already defined', () => {
77
const input = `<div class="paragraph">
88
<p><strong>Background</strong></p>
99
</div>
@@ -22,12 +22,12 @@ So it was blogged about, and utilized by users looking for that functionality.</
2222
},
2323
asciidoc: {
2424
attributes: {
25-
'page-description': 'Will execution_guard_enabled work in my release of Neo4j? Let\'s find out!'
25+
'description': 'Will execution_guard_enabled work in my release of Neo4j? Let\'s find out!'
2626
}
2727
}
2828
}
2929
generateKnowledgeBasePageDescription([page])
30-
expect(page.asciidoc.attributes['page-description']).to.equal('Will execution_guard_enabled work in my release of Neo4j? Let\'s find out!')
30+
expect(page.asciidoc.attributes['description']).to.equal('Will execution_guard_enabled work in my release of Neo4j? Let\'s find out!')
3131
})
3232
it('should ignore listing block', () => {
3333
const input = `<div class="paragraph">
@@ -72,6 +72,6 @@ Note that Cypher queries must end with a semicolon.</code></pre>
7272
}
7373
}
7474
generateKnowledgeBasePageDescription([page])
75-
expect(page.asciidoc.attributes['page-description']).to.equal('The following will demonstrate how to use cypher-shell to get a better understanding of a Neo4j Causal Cluster instance and its implementation of routing. The initial scenario is described with…')
75+
expect(page.asciidoc.attributes['description']).to.equal('The following will demonstrate how to use cypher-shell to get a better understanding of a Neo4j Causal Cluster instance and its implementation of routing. The initial scenario is described with…')
7676
})
7777
})

0 commit comments

Comments
 (0)