hdoc-tools 0.8.29 → 0.8.31
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/hdoc-build-db.js +7 -7
- package/package.json +1 -1
package/hdoc-build-db.js
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
const db_schema = {
|
9
9
|
hdoc_index: [
|
10
|
-
'
|
10
|
+
'resource_url UNINDEXED',
|
11
11
|
'book_id',
|
12
12
|
'book_audience UNINDEXED',
|
13
13
|
'book_tags',
|
@@ -17,14 +17,14 @@
|
|
17
17
|
'doc_family_id'
|
18
18
|
],
|
19
19
|
hdoc_meta: [
|
20
|
-
'
|
20
|
+
'resource_url',
|
21
21
|
'book_id',
|
22
22
|
'contributor_count INTEGER UNINDEXED',
|
23
23
|
'edit_url UNINDEXED',
|
24
24
|
'last_commit UNINDEXED'
|
25
25
|
],
|
26
26
|
hdoc_contributors: [
|
27
|
-
'
|
27
|
+
'resource_url',
|
28
28
|
'book_id',
|
29
29
|
'login',
|
30
30
|
'name',
|
@@ -78,8 +78,8 @@
|
|
78
78
|
if (!book_config.tags) book_config.tags = [];
|
79
79
|
|
80
80
|
for (let i = 0; i < index_records.length; i++) {
|
81
|
-
let index_path_name = index_records[i].relative_path.replace('\\', '/')
|
82
|
-
index_path_name = index_path_name.replace(path.extname(index_records[i].relative_path), '');
|
81
|
+
let index_path_name = index_records[i].relative_path.replace('\\', '/');
|
82
|
+
index_path_name = '/' + index_path_name.replace(path.extname(index_records[i].relative_path), '');
|
83
83
|
const index_vals = [
|
84
84
|
index_path_name,
|
85
85
|
doc_id,
|
@@ -98,7 +98,7 @@
|
|
98
98
|
|
99
99
|
// Now add metadata
|
100
100
|
const meta_vals = [
|
101
|
-
|
101
|
+
index_path_name,
|
102
102
|
doc_id,
|
103
103
|
index_records[i].metadata.contributor_count,
|
104
104
|
index_records[i].metadata.edit_url,
|
@@ -117,7 +117,7 @@
|
|
117
117
|
// Now add contributor records
|
118
118
|
for (let j = 0; j < index_records[i].contributors.length; j++) {
|
119
119
|
const contrib_vals = [
|
120
|
-
|
120
|
+
index_path_name,
|
121
121
|
doc_id,
|
122
122
|
index_records[i].contributors[j].login,
|
123
123
|
index_records[i].contributors[j].name,
|