03cf04cd077738a247626976f060fe8ef3fe0af5
book.toml
... | ... | @@ -9,13 +9,14 @@ title = "비거니즘 전시 매뉴얼 ver.1" |
9 | 9 | default-theme = "vegan" |
10 | 10 | #git-repository-url = "https://github.com/donghee/zeromakeszero/tree/master/wiki" |
11 | 11 | #edit-url-template = "https://github.com/donghee/zeromakeszero/edit/master/wiki/{path}" |
12 | +additional-js = ["chapters/assets/fzf.umd.js", "chapters/assets/elasticlunr.js"] |
|
12 | 13 | |
13 | 14 | [output.html.playground] |
14 | 15 | editable = true |
15 | 16 | line-numbers = true |
16 | 17 | |
17 | 18 | [output.html.search] |
18 | -enable = false |
|
19 | +enable = true |
|
19 | 20 | #limit-results = 20 |
20 | 21 | #use-boolean-and = true |
21 | 22 | #boost-title = 2 |
... | ... | @@ -28,4 +29,3 @@ enable = false |
28 | 29 | [preprocessor.toc] |
29 | 30 | marker = "[[_TOC_]]" |
30 | 31 | max-level = 3 |
31 | - |
chapters/assets/elasticlunr.js
... | ... | @@ -0,0 +1,28 @@ |
1 | +/** |
|
2 | + * @see https://github.com/HillLiu/docker-mdbook |
|
3 | + */ |
|
4 | +window.elasticlunr.Index.load = (index) => { |
|
5 | + const FzF = window.fzf.Fzf; |
|
6 | + const storeDocs = index.documentStore.docs; |
|
7 | + const indexArr = Object.keys(storeDocs); |
|
8 | + const ofzf = new FzF(indexArr, { |
|
9 | + selector: (item) => { |
|
10 | + const res = storeDocs[item]; |
|
11 | + res.text = `${res.title}${res.breadcrumbs}${res.body}`; |
|
12 | + return res.text; |
|
13 | + }, |
|
14 | + }); |
|
15 | + return { |
|
16 | + search: (searchterm) => { |
|
17 | + const entries = ofzf.find(searchterm); |
|
18 | + return entries.map((data) => { |
|
19 | + const { item, score } = data; |
|
20 | + return { |
|
21 | + doc: storeDocs[item], |
|
22 | + ref: item, |
|
23 | + score, |
|
24 | + }; |
|
25 | + }); |
|
26 | + }, |
|
27 | + }; |
|
28 | +}; |
chapters/assets/fzf.umd.js
... | ... | @@ -0,0 +1,6 @@ |
1 | +/** @license |
|
2 | + * fzf v0.5.1 |
|
3 | + * Copyright (c) 2021-2022 Ajit |
|
4 | + * Licensed under BSD 3-Clause |
|
5 | + */ |
|
6 | +var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(t,e,n)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,__spreadValues=(t,e)=>{for(var n in e||(e={}))__hasOwnProp.call(e,n)&&__defNormalProp(t,n,e[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(e))__propIsEnum.call(e,n)&&__defNormalProp(t,n,e[n]);return t},__spreadProps=(t,e)=>__defProps(t,__getOwnPropDescs(e));!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).fzf={})}(this,(function(t){"use strict";const e={216:"O",223:"s",248:"o",273:"d",295:"h",305:"i",320:"l",322:"l",359:"t",383:"s",384:"b",385:"B",387:"b",390:"O",392:"c",393:"D",394:"D",396:"d",398:"E",400:"E",402:"f",403:"G",407:"I",409:"k",410:"l",412:"M",413:"N",414:"n",415:"O",421:"p",427:"t",429:"t",430:"T",434:"V",436:"y",438:"z",477:"e",485:"g",544:"N",545:"d",549:"z",564:"l",565:"n",566:"t",567:"j",570:"A",571:"C",572:"c",573:"L",574:"T",575:"s",576:"z",579:"B",580:"U",581:"V",582:"E",583:"e",584:"J",585:"j",586:"Q",587:"q",588:"R",589:"r",590:"Y",591:"y",592:"a",593:"a",595:"b",596:"o",597:"c",598:"d",599:"d",600:"e",603:"e",604:"e",605:"e",606:"e",607:"j",608:"g",609:"g",610:"G",613:"h",614:"h",616:"i",618:"I",619:"l",620:"l",621:"l",623:"m",624:"m",625:"m",626:"n",627:"n",628:"N",629:"o",633:"r",634:"r",635:"r",636:"r",637:"r",638:"r",639:"r",640:"R",641:"R",642:"s",647:"t",648:"t",649:"u",651:"v",652:"v",653:"w",654:"y",655:"Y",656:"z",657:"z",663:"c",665:"B",666:"e",667:"G",668:"H",669:"j",670:"k",671:"L",672:"q",686:"h",867:"a",868:"e",869:"i",870:"o",871:"u",872:"c",873:"d",874:"h",875:"m",876:"r",877:"t",878:"v",879:"x",7424:"A",7427:"B",7428:"C",7429:"D",7431:"E",7432:"e",7433:"i",7434:"J",7435:"K",7436:"L",7437:"M",7438:"N",7439:"O",7440:"O",7441:"o",7442:"o",7443:"o",7446:"o",7447:"o",7448:"P",7449:"R",7450:"R",7451:"T",7452:"U",7453:"u",7454:"u",7455:"m",7456:"V",7457:"W",7458:"Z",7522:"i",7523:"r",7524:"u",7525:"v",7834:"a",7835:"s",8305:"i",8341:"h",8342:"k",8343:"l",8344:"m",8345:"n",8346:"p",8347:"s",8348:"t",8580:"c"};for(let ot="̀".codePointAt(0);ot<="ͯ".codePointAt(0);++ot){const t=String.fromCodePoint(ot);for(const n of"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"){const r=(n+t).normalize().codePointAt(0);r>126&&(e[r]=n)}}const n={a:[7844,7863],e:[7870,7879],o:[7888,7907],u:[7912,7921]};for(const ot of Object.keys(n)){const t=ot.toUpperCase();for(let r=n[ot][0];r<=n[ot][1];++r)e[r]=r%2==0?t:ot}function r(t){if(t<192||t>8580)return t;const n=e[t];return void 0!==n?n.codePointAt(0):t}function s(t,e){return t>e?t:e}const o=t=>t.split("").map((t=>t.codePointAt(0))),i=t=>t.map((t=>String.fromCodePoint(t))).join(""),l=new Set(" \f\n\r\t\v \u2028\u2029 \ufeff".split("").map((t=>t.codePointAt(0))));for(let ot=" ".codePointAt(0);ot<=" ".codePointAt(0);ot++)l.add(ot);const a=t=>l.has(t),c=t=>{let e=0;for(const n of t){if(!a(n))break;e++}return e},u=t=>{let e=0;for(let n=t.length-1;n>=0&&a(t[n]);n--)e++;return e},f=".codePointAt(0),h="A".codePointAt(0),d="Z".codePointAt(0),p="a".codePointAt(0),g="z".codePointAt(0),m="0".codePointAt(0),b="9".codePointAt(0);function y(t,e,n){return n?t:e-t-1}const P=16;var _,w;function z(t){return t?new Set:null}function S(t,e,n){if(null!==e&&e.i16.length>t+n){return[t+n,e.i16.subarray(t,t+n)]}return[t,new Int16Array(n)]}function L(t,e,n){if(null!==e&&e.i32.length>t+n){return[t+n,e.i32.subarray(t,t+n)]}return[t,new Int32Array(n)]}function A(t){return t>=p&&t<=g?1:t>=h&&t<=d?2:t>=m&&t<=b?4:0}function v(t){const e=String.fromCodePoint(t);return e!==e.toUpperCase()?1:e!==e.toLowerCase()?2:null!==e.match(/\p{Number}/gu)?4:null!==e.match(/\p{Letter}/gu)?3:0}function C(t){return t<=f?A(t):v(t)}function O(t,e){return 0===t&&0!==e? |
chapters/update_from_wiki.sh
... | ... | @@ -0,0 +1,12 @@ |
1 | +cp ../작품포장.md 03-작품포장.md |
|
2 | +cp ../전시장조성.md 04-전시장조성.md |
|
3 | +cp ../홍보-디자인.md 05-홍보-디자인.md |
|
4 | +cp ../전시운영.md 06-전시운영.md |
|
5 | +cp ../부록.md 07-부록.md |
|
6 | + |
|
7 | +# [[_TOC_|levels=3]] |
|
8 | +#find . -type f -name "*.md" -print0 | xargs -0 sed -i 's/\[\[_TOC_\]\]\|levels\=3=\]\]/[\[\_TOC_\]\]/g' |
|
9 | +find . -type f -name "*.md" -print0 | xargs -0 sed -i 's/|levels=3//g' |
|
10 | + |
|
11 | +cd ../ |
|
12 | +make mdbook |