Comments (7)
I've been waiting for someone to ask for this 😄
I would love to add it, so I'll have a wee scope. The streaming library we use for parsing files imposes some challenges here around being able to line up selectors with an element that we're indexing, but I have a rough plan for how to implement it 🙂
from pagefind.
Hi all, this is released in v0.10.0 🎉 Let me know how it works out!
from pagefind.
Hello,
I'm looking for something like this as well. I have a theme, but I really don't want to modify it (which I will in the end). So far I have a simple site where I have my search:
Search.md
---
title: "Search"
<!-- date: 2022-11-14T21:43:06+01:00 -->
<!-- draft: true -->
Toc: false
readingTime: false
---
{{< raw_html >}}
<link href="/_pagefind/pagefind-ui.css" rel="stylesheet">
<script src="/_pagefind/pagefind-ui.js" type="text/javascript"></script>
<div id="search"></div>
<script>
window.addEventListener('DOMContentLoaded', (event) => {
new PagefindUI({ element: "#search" });
});
</script>
<style>
body {
--pagefind-ui-primary: #eeeeee;
--pagefind-ui-text: #eeeeee;
--pagefind-ui-background: #152028;
--pagefind-ui-border: #FFA86A;
--pagefind-ui-tag: #152028;
--pagefind-ui-font:'Fira Code'
}
</style>
{{</ raw_html >}}
I'd love to disable the navigation-menu
class whether as a commandlike argument or some config file. I don't like having extra Github repos just to add one thing to the fork 😅
Btw, it works great. Like really great! Love it <3
from pagefind.
Awesome, I'll write up some tests this week and see how hard they'll be to get passing. Keep you posted!
from pagefind.
No way to disable something based on its content, no.
A better solution here would be to use a custom glob to exclude the 404
page from indexing altogether — some discussion of this in #127
from pagefind.
Just an additional note for those using Pagefind with the Eleventy SSG... if you use the official syntax highlighting plugin, you can make this setting in your config file (usually eleventy.js
) to add data-pagefind-ignore
to each code block, assuming you don't want code blocks to appear in your Pagefind results:
// prior to the main `module.exports` section...
const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight')
// then, within the `module.exports` section...
eleventyConfig.addPlugin(syntaxHighlight, {
preAttributes: {
"data-pagefind-ignore": ""
}
})
...h/t to @Aankhen
in the Eleventy Discord server on 2022-12-07:
https://discord.com/channels/741017160297611315/1050124593815367781
from pagefind.
Hi all, this is released in v0.10.0 tada Let me know how it works out!
@bglw Wow, that was fast!
One question. I cannot see if I can do something like this:
I have a 404 page which looks like this in Hugo:
{{ define "main" }}
<aside data-pagefind-ignore>
<div class="post">
<h1 class="post-title">404 — {{ $.Site.Params.missingContentMessage | default "Page not found..." }}</h1>
<div class="post-content">
<a href="{{ "/" | absURL }}">{{ $.Site.Params.missingBackButtonLabel | default "Back to home page" }} →</a>
</div>
</div>
</aside>
{{ end }}
How would I disable the class "post" if it's child (post-title) has 404 in it? Is it possible?
Edit: I'd delete the <aside data-pagefind-ignore
if I'd use the config file
from pagefind.
Related Issues (20)
- Dark mode in default pagefind-modular-ui.css HOT 6
- H1 elements not being indexed HOT 2
- [Feature request] Score exact name of page highly HOT 1
- The path to the image is not found
- Special characters (p.e. Umlauts) in page's file names are not escaped, causing not working links HOT 2
- CSS Validation Parse Error: .pagefind-ui__button.svelte-193m69l | Value Error : color ----pagefind-ui-primary HOT 1
- Runtime error "unreachable executed" when search term contains emoticon HOT 1
- Support of specific "target" for <a> links by default UI to open result documents in different frame HOT 2
- ModularUI results do not update on scroll HOT 4
- Sort ModularUI FilterPills HOT 2
- Difference in the results by including `a` in the middle. HOT 4
- Problem with domains and subdomains HOT 4
- Error in documentation for the bundle path option
- Consider exposing the types on the Pagefind client
- feature request: Python wrapper package, Python API HOT 6
- Allow to specify the path of the config file HOT 1
- Allow to override default weight of HTML elements in config
- Add UI search event hooks HOT 1
- Pagefind 1.1.0 output is not stable HOT 1
- Speical Symbols
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pagefind.