Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pagefind #2477

Draft
wants to merge 29 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3330492
Add initial plugin
jingting1412 Mar 26, 2024
6cbda19
Add test
jingting1412 Mar 27, 2024
8371395
Fix plugin
jingting1412 Mar 27, 2024
f302eca
Update plugin
jingting1412 Mar 27, 2024
f06a25d
Update code
jingting1412 Mar 27, 2024
abac73f
Update code
jingting1412 Mar 27, 2024
c3453b1
Update plugin and test
jingting1412 Mar 27, 2024
09e8934
Remove old tests
jingting1412 Mar 27, 2024
d8e4936
Add pagefind as dependency
jingting1412 Mar 29, 2024
44fe0e0
Add pagefind as dependency
jingting1412 Mar 29, 2024
974795c
Merge branch 'MarkBind:master' into addFullSearch
jingting1412 Mar 29, 2024
db737a4
Merge branch 'addFullSearch' of https://github.com/jingting1412/markb…
jingting1412 Mar 29, 2024
106a5cd
Modify build process
jingting1412 Mar 29, 2024
a64819a
Change pagefind import
jingting1412 Mar 29, 2024
88489ba
Merge branch 'master' into addFullSearch
jingting1412 Mar 29, 2024
c198553
Merge branch 'MarkBind:master' into addFullSearch
jingting1412 Mar 30, 2024
106ca72
Merge branch 'addFullSearch' of https://github.com/jingting1412/markb…
jingting1412 Mar 30, 2024
a0c301c
Remove index.ts changes
jingting1412 Mar 30, 2024
b4f6d6c
Merge branch 'MarkBind:master' into addFullSearch
jingting1412 Apr 8, 2024
99d9ae2
Merge branch 'MarkBind:master' into addFullSearch
jingting1412 Apr 11, 2024
b15c6a5
Merge branch 'addFullSearch' of https://github.com/jingting1412/markb…
jingting1412 Apr 11, 2024
5e9fc03
Eslint ignore import
jingting1412 Apr 11, 2024
916b44e
Merge branch 'master' into addFullSearch
kaixin-hc Apr 12, 2024
caafbc5
Merge branch 'addFullSearch' of https://github.com/jingting1412/markb…
jingting1412 Apr 12, 2024
8ee05e7
change build process
jingting1412 Apr 12, 2024
6088950
Merge branch 'MarkBind:master' into addFullSearch
jingting1412 Apr 12, 2024
c618c38
Merge branch 'MarkBind:master' into addFullSearch
jingting1412 Apr 15, 2024
0725d76
Update implementation
jingting1412 Apr 15, 2024
fe5407e
Merge branch 'addFullSearch' of https://github.com/jingting1412/markb…
jingting1412 Apr 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"fs-extra": "^9.0.1",
"live-server": "1.2.1",
"lodash": "^4.17.15",
"pagefind": "^1.0.4",
"url-parse": "^1.5.10",
"winston": "^2.4.4",
"winston-daily-rotate-file": "^3.10.0"
Expand Down
23 changes: 23 additions & 0 deletions packages/cli/test/functional/test_site_pagefind/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
_markbind/logs/

# Dependency directories
node_modules/

# Production
_site/

# Env
.env
.env.local

# IDE configs
.vscode/
.idea/*
*.iml
7 changes: 7 additions & 0 deletions packages/cli/test/functional/test_site_pagefind/404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<frontmatter>
title: Page not found
layout: 404.md
</frontmatter>

-><p style="font-size: 10rem">404</p><-
-><p style="font-size: 1.5rem">File not found<br>Click <a href="/">here</a> to go back to the home page.</p><-
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div>{{ content }}</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<head-bottom>
<link rel="stylesheet" href="{{baseUrl}}/stylesheets/main.css">
</head-bottom>

<header sticky>
<navbar type="dark">
<a slot="brand" href="{{baseUrl}}/index.html" title="Home" class="navbar-brand">Your Logo</a>
<li><a href="{{baseUrl}}/contents/topic1.html" class="nav-link">Topic 1</a></li>
<li><a href="{{baseUrl}}/contents/topic2.html" class="nav-link">Topic 2</a></li>
<dropdown header="Topic 3" class="nav-link">
<li><a href="{{baseUrl}}/contents/topic3a.html" class="dropdown-item">Topic 3a</a></li>
<li><a href="{{baseUrl}}/contents/topic3b.html" class="dropdown-item">Topic 3b</a></li>
</dropdown>
<li slot="right">
<form class="navbar-form">
<searchbar :data="searchData" placeholder="Search" :on-hit="searchCallback" menu-align-right></searchbar>
</form>
</li>
</navbar>
</header>

<div id="flex-body">
<nav id="site-nav">
<div class="site-nav-top">
<div class="fw-bold mb-2" style="font-size: 1.25rem;">Contents</div>
</div>
<div class="nav-component slim-scroll">
<site-nav>
* [Home :house:]({{ baseUrl }}/index.html)
* [Topic 1]({{baseUrl}}/contents/topic1.html)
* [Topic 2]({{baseUrl}}/contents/topic2.html)
* Topic 3 :expanded:
* [Topic 3a]({{baseUrl}}/contents/topic3a.html)
* [Topic 3b]({{baseUrl}}/contents/topic3b.html)
</site-nav>
</div>
</nav>
<div id="content-wrapper">
<breadcrumb />
{{ content }}
</div>
<nav id="page-nav">
<div class="nav-component slim-scroll">
<page-nav />
</div>
</nav>
<scroll-top-button></scroll-top-button>
</div>

<footer>
<!-- Support MarkBind by including a link to us on your landing page! -->
<div class="text-center">
<small>[Generated by {{MarkBind}}]</small>
</div>
</footer>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"jsonVariableExample": "Your variables can be defined here as well"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<variable name="example">
To inject this HTML segment in your MarkBind files, use {{ example }} where you want to place it.
More generally, surround the segment's id with double curly braces.
</variable>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<frontmatter>
title: Topic 1
</frontmatter>

<br>

# Topic 1

> This is a placeholder page - more content to be added.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<frontmatter>
title: Topic 2
</frontmatter>

<br>

# Topic 2

> This is a placeholder page - more content to be added.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<frontmatter>
title: Topic 3a
</frontmatter>

<br>

# Topic 3a

> This is a placeholder page - more content to be added.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<frontmatter>
title: Topic 3b
</frontmatter>

<br>

# Topic 3b

> This is a placeholder page - more content to be added.
Loading
Loading