by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Ashish K Mondal
    @ashishmondal
    @djencks Great! Thanks a lot!
    djencks
    @djencks
    Feedback welcome :-)
    @eskwayrd I like your download docs! Too bad it can't ask you where you want them and unzip :-)
    Why doesn't your search work with file system access? I think we got that working with both Guillaume and my lunr integrations. I see a spinning radial lines thing.
    bob roro
    @bobroro_gitlab
    I'm currently using the clipboard functionality to add copy buttons to source blocks, what's the best approach here to still use source blocks but not have the button in certain blocks?
    bob roro
    @bobroro_gitlab
    Or optional [#no-copy] id to the block?
    Ewan Edwards
    @eskwayrd
    @djencks Thanks for the feedback. Browsers don’t have access to the local filesystem; how would I prompt for a download location and after the download, unzip the archive?
    djencks
    @djencks
    I know, that's why I said 'too bad' :-)
    Ewan Edwards
    @eskwayrd
    Ah. If it could be done, it would represent one of the greatest malware vectors, so I’m not too disappointed. :-)
    djencks
    @djencks
    yes :-)
    Ewan Edwards
    @eskwayrd
    I don’t know what changes have been made to antora-lunr variations, but there are restrictions on file:// URLs that prevent search from working. If you have a workaround, I’d definitely include that in my own implementation.
    djencks
    @djencks
    yes, instead of computing absolute paths (which doesn't work, as you say) you compute relative paths from the current page.
    let me look for my PR...
    I think this is it: Mogztter/antora-lunr#53
    Ewan Edwards
    @eskwayrd
    Thanks for pointing that out. I’ll get a fix out, hopefully today!
    djencks
    @djencks
    It looks too simple to work, so let me know if there are any problems :-)
    Ewan Edwards
    @eskwayrd
    The logic in my UI incorrectly computes the path to the search index; it uses a base path variable (that can be empty), followed by the /search_index, so it can look like an absolute path. Should be simple to fix.
    James Elliott
    @brunchboy
    Nice, my day job has decided to go with Antora and AsciiDoc for our internal developer documentation, and is excited that I am thinking about exploring how to port our customer-facing API docs to that world.
    Ewan Edwards
    @eskwayrd

    Looking at it further, the path is actually computed correctly, and is relative. However, trying to fetch the search index is running into a CORS limitation:

    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///Users/eskwayrd/repos/fixes/build/faunadb_docs/search_index-current.json. (Reason: CORS request not http).

    Do you have a workaround for that?

    djencks
    @djencks
    @brunchboy Wonderful! 👍
    @eskwayrd I don't. What sets the CORS policy?
    Ewan Edwards
    @eskwayrd
    The browser.
    djencks
    @djencks
    The CORS problem is showing up via file access or https access or both?
    Ewan Edwards
    @eskwayrd
    For file:// access. You wondered why the search doesn’t work with file system access; that’s why. If you have a local Antora site works with file system access, you’re loading your search index in a different way. I’ve been using the JavaScript fetch API, with a fallback to XMLHttpRequest.
    I suppose I’ll have to make that change. :-)
    djencks
    @djencks
    I suspected that was how it's loaded.... you beat me to finding it :-)
    Ewan Edwards
    @eskwayrd
    I did originally use a <script> tag load, but because my index is rather large, it was impacting the initial rendering of the page. That was quite a while ago (just over a year now), so I’ll have to revisit.
    djencks
    @djencks
    I don't really remember.... is there sort of an async script tag or option?
    Ewan Edwards
    @eskwayrd
    There is. It didn’t seem to help my situation at the time. The delayed rendering might have been caused by something else and the search index load merely exacerbated that problem. Debugging browser rendering performance is not my forte. :-)
    djencks
    @djencks
    I'm happy to say I've never tried to do that :-)
    Ewan Edwards
    @eskwayrd
    I hope to never have to do that. But when readers of your documentation complain about slow page loads, you tend to have to try figuring it out. :-)
    djencks
    @djencks
    yes.
    Guillaume Grossetie
    @Mogztter
    @eskwayrd that's nice but the link is not easy to find even with your indication
    Ewan Edwards
    @eskwayrd
    It’s a thing we did for the very few users that asked, so it doesn’t deserve much prominence. Once you know where to look, it’s easy to find again.
    Joseph Cayouette
    @jcayouette
    I built with antora today and noticed the my lunr-antora search results are using the wrong URL? Normally this comes from site.url correct?
    looks like my sitemap is getting the correct url, but the search-index.js is not.
    Joseph Cayouette
    @jcayouette
    Sure enough in the new index im seeing:
    window.antoraLunr.init({"index":{"version":"2.3.8","fields":["title","name","text","component"],"fieldVectors":[["title//uyuni/common_gfdl1.2_i.html"...
    In the previous index im seeing:
    window.antoraLunr.init({"index":{"version":"2.3.3","fields":["title","name","text","component"],"fieldVectors":[["title/https://www.uyuni-project.org/uyuni-docs/uyuni/common_gfdl1.2_i.html"
    Normally the index contains the url specified at site.url. Any idea what could be happening?
    Jose Quesada
    @quesada
    Would antora work as a personal page/blog?
    I know it's not the intended use :)
    It looks like I would prefer its features to mostly any static site generator
    Joseph Cayouette
    @jcayouette
    At my above index comments, looks like in the latest version of antora the antora-site-generator-lunr is not adding the site.url. I used an older version and it worked again. Is this a bug or intended?
    Jose Quesada
    @quesada
    looks like in mainstream site generators like hugo asciidoc is not a first class citizen, hence Antora
    Joseph Cayouette
    @jcayouette
    @quesada Right ^^ I have used antora as a blog, for me its great even if this is not its intended use. I actually enjoy it since I use it for work as well.
    Jose Quesada
    @quesada
    @jcayouette thanks. What's your blog?
    and @jcayouette did you have to do any tweaks? I mean, it doesn't show 'posts' in chrono order, it doesn't do the big image header blogs do these days (inspired by medium)
    djencks
    @djencks
    @jcayouette antora-lunr now uses relative urls not absolute ones. Did you update the UI as well?
    @quesada you might look at @Mogztter's blog https://github.com/yuzutech/blog.yuzutech.fr. I liked it so I turned the code into an experimental Antora pipeline extension so you can have a blog as part of an otherwise normal Antora site. https://gitlab.com/djencks/antora-blog, small example at https://gitlab.com/djencks/antora-extension-examples