Move search to _libraries
This commit is contained in:
parent
b06009ebbd
commit
57b3848430
@ -23,7 +23,6 @@ COPY libs/ /daux/libs/
|
|||||||
COPY templates/ /daux/templates/
|
COPY templates/ /daux/templates/
|
||||||
COPY themes/ /daux/themes/
|
COPY themes/ /daux/themes/
|
||||||
COPY _libraries/ /daux/_libraries/
|
COPY _libraries/ /daux/_libraries/
|
||||||
COPY search/ /daux/search/
|
|
||||||
COPY global.json /daux/global.json
|
COPY global.json /daux/global.json
|
||||||
COPY index.php /daux/index.php
|
COPY index.php /daux/index.php
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
1
_libraries/search.min.js.map
Normal file
1
_libraries/search.min.js.map
Normal file
File diff suppressed because one or more lines are too long
@ -25,7 +25,7 @@ module.exports = {
|
|||||||
search: {
|
search: {
|
||||||
runner: "rollup",
|
runner: "rollup",
|
||||||
source: "src/js/search/index.js",
|
source: "src/js/search/index.js",
|
||||||
destination: "search/search.min.js"
|
destination: "_libraries/search.min.js"
|
||||||
},
|
},
|
||||||
theme_daux: {
|
theme_daux: {
|
||||||
runner: "rollup",
|
runner: "rollup",
|
||||||
|
@ -78,12 +78,8 @@ class Generator implements \Todaymade\Daux\Format\Base\Generator, LiveGenerator
|
|||||||
);
|
);
|
||||||
|
|
||||||
if ($params['html']['search']) {
|
if ($params['html']['search']) {
|
||||||
GeneratorHelper::copyRecursive(
|
|
||||||
$this->daux->local_base . DIRECTORY_SEPARATOR . 'search' . DIRECTORY_SEPARATOR,
|
|
||||||
$destination . DIRECTORY_SEPARATOR . 'search'
|
|
||||||
);
|
|
||||||
file_put_contents(
|
file_put_contents(
|
||||||
$destination . DIRECTORY_SEPARATOR . 'search' . DIRECTORY_SEPARATOR . 'search_index.json',
|
$destination . DIRECTORY_SEPARATOR . '_search_index.json',
|
||||||
json_encode(['pages' => $this->indexed_pages])
|
json_encode(['pages' => $this->indexed_pages])
|
||||||
);
|
);
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
@ -30,7 +30,7 @@ class SearchEngine {
|
|||||||
descriptiveWords: 25,
|
descriptiveWords: 25,
|
||||||
highlightTerms: true,
|
highlightTerms: true,
|
||||||
highlightEveryTerm: false,
|
highlightEveryTerm: false,
|
||||||
contentLocation: "search/search_index.json",
|
contentLocation: "_search_index.json",
|
||||||
...options
|
...options
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
<?php if ($params['html']['search']) { ?>
|
<?php if ($params['html']['search']) { ?>
|
||||||
<!-- Search -->
|
<!-- Search -->
|
||||||
<link href="<?= $base_url; ?>search/search.css" rel="stylesheet">
|
<link href="<?= $base_url; ?>_libraries/search.css" rel="stylesheet">
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</head>
|
</head>
|
||||||
<body class="<?= $params['html']['float'] ? 'with-float' : ''; ?> <?= $this->section('classes'); ?>">
|
<body class="<?= $params['html']['float'] ? 'with-float' : ''; ?> <?= $this->section('classes'); ?>">
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Search -->
|
<!-- Search -->
|
||||||
<script type="text/javascript" src="<?php echo $base_url; ?>search/search.min.js"></script>
|
<script type="text/javascript" src="<?php echo $base_url; ?>_libraries/search.min.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
window.search({'base_url': '<?php echo $base_url?>'})
|
window.search({'base_url': '<?php echo $base_url?>'})
|
||||||
|
Loading…
Reference in New Issue
Block a user