Giter Club home page Giter Club logo

Comments (6)

nandac avatar nandac commented on June 10, 2024 1

@Tseing I was able to set it as a comma-separated string of selectors I believe. Have you tried that out?

from stork.

jameslittle230 avatar jameslittle230 commented on June 10, 2024

Hello @nandac! This feature is available, but admittedly not well-documented. You can add the exclude_html_selector field to your config file to globally define a selector to exclude from indexing.

To define exclusions on a file-by-file basis, you can use the exclude_html_selector_override config option in a file object.

Let me know if this helps! Happy to provide examples, etc. if this isn't quite enough.

-James

from stork.

nandac avatar nandac commented on June 10, 2024

Thanks, @jameslittle230 that is what I was looking for.

I do have one question though, is it possible to specify multiple selectors to exclude? For example something like:

exclude_html_selector = "figure", "p#author", ...

In addition, I am actually using stork-search with the pelican-search plugin, which unfortunately does not support this setting so that is something I would need to contribute to the plugin I guess.

from stork.

Tseing avatar Tseing commented on June 10, 2024

I have the same question. Is it possible to support to set multiple selectors to be excluded? I found exclude_html_selector is defined as a string, so it can't be set multiple values at least for now.

from stork.

Tseing avatar Tseing commented on June 10, 2024

@nandac Cool, it works! I mistakenly thought exclude_html_selector defines HTML tags to be excluded. Thank you for your reply! I am using Pelican as well : )

from stork.

jameslittle230 avatar jameslittle230 commented on June 10, 2024

Thanks for helping out here! I'm closing this issue and will improve the documentation here.

from stork.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.