This repository was archived by the owner on Jun 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-index-option.js
More file actions
55 lines (47 loc) · 1.75 KB
/
build-index-option.js
File metadata and controls
55 lines (47 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* index.html을 build하기 위한 설정 */
module.exports = {
// written out before index contents
'prepend-to-output': () => `
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>색인</title>
</head>
<body>
`,
// written out after index contents
'append-to-output': () => `</body></html>`,
// index page의 title은 어떤것으로?
'title': 'eos hub 색인 페이지',
// Title template function used to construct the title section
'title-template': (title) =>`<h1 class="index__title">${title}</h1>
`,
// 어느 폴더부터 index 파일 생성에 필요한 정보를 찾을건지
'relativePath': './src/',
// 'relativePath'에서 몇 depth까지 root로 설정하고 싶은지
'pathDepth': 1,
// Section function used to construct each section identified using path depth
'section-template': (sectionContent) => `<section class="index__section">
${sectionContent}</section>
`,
// Section heading function used to construct each section heading
'section-heading-template': (heading) => `<h2 class="index__section-heading">${heading}</h2>
`,
// List function used to construct a file list
'list-template': (listContent) => `<ul class="index__list">
${listContent}</ul>
`,
// Item function used to construct each list item
'item-template': (filepath, filename) => `
<li class="index__item">
<a class="index__item-link" href="${filename}">${filename}</a>
</li>
`,
// name of output file
'outputFile': './index.html',
// initial tab depth
'tab-depth': 4,
// tab string, default is two spaces
'tab-string': ' '
};