Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Mark Plummer
    @mark-plummer
    I'll try to get a log now.
    there are some warnings about missing attributes, but those never caused a local build to fail.
    djencks
    @djencks
    One thing to try is getting node v. 10.22.1. Node 12 and later has some serious performance problems with asciidoctor.js
    It's just barely possible that that would explain the timeout, IIRC it can cause a 3-4X slowdown.
    Which node version do you have locally?
    even 5-10 minutes seems pretty slow.... I don't recall your site being gigantic?
    Mark Plummer
    @mark-plummer
    btw, I just built locally again and it took 12 minutes. It's not a gigantic site, but there are some files that have many lines (listings of zip codes, counties, etc of different countries). Example, one single file that lists all counties in the united states has over 3000 lines in it alone. And we have files with similar lists for other countries. I noticed when I added those files, that the time it to Antora to build increased significantly.
    djencks
    @djencks
    @ronipolus_gitlab I've updated the README documentation for antora-pdf and the pdf-ui at https://gitlab.com/djencks/antora-pdf. I don't have any code changes so I'm not ready to create a new version. Let me know if it makes more sense now :-)
    @mark-plummer Ah, I remember one of those pages! In that case if you are building with node 10 locally the use of node 12 at netlify would likely explain the timeout.
    Mark Plummer
    @mark-plummer
    I could try removing those from the site and try again, but I'm hoping to find a way to be able to list them on our new Antora site. Here's an example from our old site: https://docs.thoughtspot.com/latest/reference/geomap-reference.html I'm planning to use your tabs instead of the DL triangle thing.
    djencks
    @djencks
    locally what does node --version say?
    Mark Plummer
    @mark-plummer
    v12.16.2
    djencks
    @djencks
    hmmmm.... same as netlify pretty much (12.18). I'd still suggest trying using 10.22.1 locally and at netlify.
    Mark Plummer
    @mark-plummer
    I remember @eskwayrd saying that If I use multiple branches for my content, that I would need to run a script that performs git clone (or equivalent) to fetch all of my repo’s content. I'm not sure if that's required, but I'm not sure how to do it.
    1 reply
    djencks
    @djencks
    That problem is a really good reason not to put your playbook in your content repo!
    the problem only occurs when your content is in the same repo as your playbook, and you use more branches than the one the playbook is on.
    Mark Plummer
    @mark-plummer
    So, a repo for just the playbook? would that solve my problem here?
    djencks
    @djencks
    I have no idea why the build is taking so long, but it would solve any problems with netlify's shallow clone.
    You can also use a remote git url for the non-playbook branches in the playbook. Then Antora will fetch those properly without assuming anything about the local checkout.
    Mark Plummer
    @mark-plummer
    wow. I didn't realize that. Okay. So, since my playbook is indeed in the same respository as my content, I'll try putting my playbook in a totally different repo. Thanks for mentioning that. That way I could avoid creating a git script.
    djencks
    @djencks
    Do you have a script netlify runs for your build? Their docs appear to claim you can run nvm to install any node version you want.
    here we go... this is from the docs.asciidoctor.org netlify.toml...
    [build.environment]
    CI = "true"
    NODE_VERSION = "10"
    # WARNING netlify-build ignores NPM_FLAGS when installing plugins, so use low-level NPM_CONFIG_ flag instead
    #NPM_FLAGS = "--no-optional"
    NPM_CONFIG_OPTIONAL = "false"
    ANTORA_CACHE_DIR = "node_modules/.cache/antora"
    If you have anything like that try specifying at least NODE_VERSION = "10"
    Mark Plummer
    @mark-plummer
    thanks!
    I'm also thinking I need to do something to reduce the impact those files that have thousands of lines in them on build time. Any tips on how I could reduce the impact those? Would it reduce build time, to have those lists as html inside passthrough blocks?
    djencks
    @djencks
    the first thing to try is node 10. The performance problems have to do with arrays, and those lines translate into a lot of array operations. so very possibly the site will build quickly with node 10.
    I think (but I'm not sure) that passthrough content gets split up into an array of lines, so it's very possible that passthrough would have the same problem. If node 10 doesn't build fast enough, you could try it.
    Mark Plummer
    @mark-plummer
    @djencks, I got it working! Following your advice, I put the playbook in it's own repo, added the netlify.toml file you provided, and the site (all three branches) built in 5 minutes. Outstanding! Thanks again for your help.
    djencks
    @djencks
    Wonderful! Thanks for letting me know the outcome!
    Mark Plummer
    @mark-plummer
    One thing I'm curious about for the asciidoctor site, is how you get it to point to "latest", like here: https://docs.asciidoctor.org/asciidoctor/latest/install/supported-platforms/. We do this on our current doc site: https://docs.thoughtspot.com/latest/reference/geomap-reference.html. Can you tell me how I could do that?
    djencks
    @djencks
    I’m not sure what you’re asking but suspect it has to do with antora/antora#314. Look in the asciidoctor docs playbook to see how it’s configured.
    Mark Plummer
    @mark-plummer

    thanks. bascially, the goal is to have the url always have "latest" in it and have it point to the latest version branch. This way, when someone bookmarks a page on the site, it will always take them to the latest, whether the latest. I did notice this in your site playbook:

      latest_version_segment_strategy: redirect:to
      latest_version_segment: latest

    That got me thinking there must be some setting/attribute somewhere that can elegantly control that.

    drykberg
    @drykberg
    Random Quick Question: Is it possible to have subdirectories in the partials directory and then include them with antoras page ID ? Perhaps like so: ...partial$/subdirectory/nthDisclaimer.adoc ?
    djencks
    @djencks
    Sure. Are you having a problem with it?
    drykberg
    @drykberg
    The technical writers say it's not working...
    djencks
    @djencks
    Example?
    Mark: those are the available attributes for controlling this feature.
    drykberg
    @drykberg
    their git flow is messy... sorry, I didnt come prepared.. all i know is this (partial$/sub-folder/ noch mit partial$\sub-folder) apparently didnt work
    2 replies
    but if you say it works, it's fine there error is likely elswhere
    sorry to interject
    djencks
    @djencks
    No problem. I haven’t tried it recently myself, but the resolution algorithm should handle it fine. I’ll check when I get back to my computer.
    drykberg
    @drykberg
    It's fine. I will try, thank you.
    Mark Plummer
    @mark-plummer
    no rush. thanks, as always for your help. :)
    drykberg
    @drykberg
    Subdirectories inside partials folder works :)
    Beni Bilme
    @benibilme_gitlab
    Hello, I would like to use asciidoctor-bibtex extension in antora. As far as I understand from the documentation at https://docs.antora.org/antora/2.2/playbook/configure-asciidoc, I need an npm module version of asciidoctor-bibtex ruby gem. I have not been able to find one. Is there a easy way to to use this module in antora. Any help much appreciated. (I am not familiar with JavaScript and npm modules etc.,just basic install and use)
    djencks
    @djencks
    @benibilme_gitlab This is probably a non-trivial undertaking. There are some Ruby dependencies that I'd at least start by translating using Opal, see https://docs.asciidoctor.org/asciidoctor.js/latest/extend/extensions/compile-ruby-extension/. I guess I'd start by trying to translate the extension also and see what happens. Rewriting the extension itself in javascript while time-consuming probably wouldn't be that hard (at least for me...). However....
    In addition, my understanding of the Ruby extension is that it works on one page. I'd expect that for Antora you'd want a single bibliography for a component-version. Therefore there'd be more work. I expect you'd need the ability to process the page the bibliography appears on last, which requires a pipeline extension or modification so that the pages can be sorted.
    I've never used the Opal compiler, so I might get interested in this to try it out.
    Can you go into more detail about how you want to use this, in particular the scope of each bibliography?
    8 replies
    Guillaume Grossetie
    @Mogztter
    @benibilme_twitter out of curiosity, did you try https://github.com/riboseinc/asciidoctor-bibliography? If so, what do you think of it and/or why do you use asciidoctor-bibtex? Please note that both libraries are written in Ruby so they won't work as-is in Antora but I want to learn more about them (what are the pros and cons)
    djencks
    @djencks
    I'd sure like to understand the reasoning that uses GPL licensed bibtex-ruby in non-GPL projects. It seems to me that both asciidoctor-bibtex and asciidoctor-bibliography would be GPL licensed as a result of this dependency.