Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Eudris Cabrera Rodriguez
    @ecabrerar
    Hello,
    Somebody knows how to do a multi language site with jbake and thymeleaf ?
    Thanks in advance !
    leluna
    @leluna
    Hi ~ I'm trying to upgrade to 2.6 and found out that all relative image paths such as ../images/something.png does not work anymore. Is there any configurations I missed?
    Frank Becker
    @ancho
    Hi. There are several problems with relative image paths espacially for index pages or rss feeds. Have you looked at https://jbake.org/docs/2.6.3/#images_path?
    I recommend using img.path.prepend.host to get full access to images. There is one bugfix regarding relative image paths which hasn't been released yet. jbake-org/jbake#554
    David Amend
    @raDiesle
    Hi, how to generate multiple standalone HTML files? I tried by reading the documentation, but no success.
    Frank Becker
    @ancho
    what do you mean by multiple standalone HTML files?
    David Amend
    @raDiesle
    like index.html, index.mobile.html, impressum.html, application.html, ...
    Frank Becker
    @ancho
    So is it basically the problem that you don't know how and where to begin? Have you tried to initalize one of the example projects (e.g. jbake -i -t thymeleaf) and played around with it? I would recommend to take a look at real life projects. like https://github.com/jbake-org/jbake.org, https://github.com/apache/sling-site or https://github.com/apache/incubator-netbeans-website/tree/master/netbeans.apache.org to see how others do it.
    David Amend
    @raDiesle
    I am using the mvn plugin. Had a look on the examples - thx. Still not clear: should I place /content files and start with content:
    = Events
    :jbake-type: page
    ?
    Frank Becker
    @ancho
    yes. makes sense. start with the basic types built in. which are post and page. See https://jbake.org/docs/latest/#content_files
    Frank Becker
    @ancho
    maybe this presentation helps you a bit. https://youtu.be/XRpBnWFL7XA?t=917
    please feel free to open an issue at https://github.com/jbake-org/jbake.org if you have any idea how to enhance the documentation to getting started with jbake or everything else that makes it difficult to understand.
    David Amend
    @raDiesle
    Thx! I will try tomorrow. Seems like: 1. create content file with type "page" 2. create page.ftl with ${content.body}
    leluna
    @leluna
    @ancho thank! I'm gonna try to use the img.path.prepend.host config
    Tobias Roeser
    @lefou
    In the mood of updating JBake plugins for SBuild, sbt and newly writing one for mill, I noticed, that since 2.6.2 it is not possible to serve a local site when there is no subfolder "output".
    E.g. jbake -s dest/pathalways assumes, that my contents root is dest/path/output, which is not.
    This was not the case for jbake versions prior to 2.6.2.
    Tobias Roeser
    @lefou
    Isn't the "default.properties" config file loaded from the classloader?
    I get an exception when trying to run JBake from a dedicated classloader (all jars from lib/ dir included)
    Caused by: org.apache.commons.configuration.ConfigurationException: Cannot locate configuration source default.properties
            at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:259)
            at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:238)
            at org.apache.commons.configuration.AbstractFileConfiguration.<init>(AbstractFileConfiguration.java:158)
            at org.apache.commons.configuration.PropertiesConfiguration.<init>(PropertiesConfiguration.java:252)
            at org.jbake.app.configuration.ConfigUtil.load(ConfigUtil.java:47)
            at org.jbake.app.configuration.ConfigUtil.loadConfig(ConfigUtil.java:58)
            at org.jbake.app.configuration.JBakeConfigurationFactory.createDefaultJbakeConfiguration(JBakeConfigurationFactory.java:29)
            at org.jbake.launcher.Main.run(Main.java:78)
    Tobias Roeser
    @lefou
    I don't have an default.properties in my src folder

    The following works:

        val proc = os.proc(
          "java",
          "-cp", classpath.mkString(":"),
          "org.jbake.launcher.Main",
          args
        )

    but this one does not:

    val cl = new URLClassLoader(classpath, null)
    val mainClass = cl.loadClass("org.jbake.launcher.Main")
    val mainMethod = mainClass.getMethod("main", Seq(classOf[Array[String]]): _*)
    mainMethod.invoke(null, args)
    The classpathis identical for both
    Any idea?
    Tobias Roeser
    @lefou
    One difference might be the process working dir, but as the file is not in the filesystem, that should not be the issue.
    matrixbot
    @matrixbot
    ancho hmm...interesting. it should be loaded from the classloader. a default.properties is located in the resources bundle of jbake-core. do you mind open a bugreport?
    Tobias Roeser
    @lefou
    I can do, but was not sure, if it is a bug in jbake or in my usage
    The default.properties is present in the jbake-core.jar, which is present in the classloader.
    matrixbot
    @matrixbot
    ancho hmm....curious....
    Tobias Roeser
    @lefou
    Here is the classloader:
    Creating Classloader with classpath: [Vector(/tmp/jbake-2.6.4-bin/lib/args4j-2.33.jar,
     /tmp/jbake-2.6.4-bin/lib/asciidoctorj-1.5.8.1.jar,
     /tmp/jbake-2.6.4-bin/lib/asciidoctorj-diagram-1.5.11.jar,
     /tmp/jbake-2.6.4-bin/lib/asm-5.0.3.jar,
     /tmp/jbake-2.6.4-bin/lib/asm-analysis-5.0.3.jar,
     /tmp/jbake-2.6.4-bin/lib/asm-tree-5.0.3.jar,
     /tmp/jbake-2.6.4-bin/lib/asm-util-5.0.3.jar,
     /tmp/jbake-2.6.4-bin/lib/attoparser-2.0.5.RELEASE.jar,
     /tmp/jbake-2.6.4-bin/lib/autolink-0.6.0.jar,
     /tmp/jbake-2.6.4-bin/lib/commons-collections-3.2.2.jar,
     /tmp/jbake-2.6.4-bin/lib/commons-configuration-1.10.jar,
     /tmp/jbake-2.6.4-bin/lib/commons-io-2.6.jar,
     /tmp/jbake-2.6.4-bin/lib/commons-jexl-2.1.1.jar,
     /tmp/jbake-2.6.4-bin/lib/commons-lang-2.6.jar,
     /tmp/jbake-2.6.4-bin/lib/commons-lang3-3.8.1.jar,
     /tmp/jbake-2.6.4-bin/lib/commons-logging-1.2.jar,
     /tmp/jbake-2.6.4-bin/lib/commons-vfs2-2.2.jar,
     /tmp/jbake-2.6.4-bin/lib/concurrentlinkedhashmap-lru-1.4.2.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-ext-abbreviation-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-ext-anchorlink-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-ext-aside-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-ext-autolink-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-ext-definition-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-ext-emoji-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-ext-escaped-character-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-ext-footnotes-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-ext-gfm-strikethrough-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-ext-gfm-tasklist-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-ext-ins-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-ext-jekyll-front-matter-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-ext-superscript-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-ext-tables-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-ext-toc-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-ext-typographic-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-ext-wikilink-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-ext-yaml-front-matter-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-formatter-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-jira-converter-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-profile-pegdown-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/flexmark-util-0.40.8.jar,
     /tmp/jbake-2.6.4-bin/lib/freemarker-2.3.28.jar,
     /tmp/jbake-2.6.4-bin/lib/groovy-2.5.5.jar,
     /tmp/jbake-2.6.4-bin/lib/groovy-dateutil-2.5.5.jar,
     /tmp/jbake-2.6.4-bin/lib/groovy-templates-2.5.5.jar,
     /tmp/jbake-2.6.4-bin/lib/groovy-xml-2.5.5.jar,
     /tmp/jbake-2.6.4-bin/lib/jade4j-1.2.7.jar,
     /tmp/jbake-2.6.4-bin/lib/javassist-3.20.0-GA.jar,
     /tmp/jbake-2.6.4-bin/lib/javax.servlet-api-3.1.0.jar,
     /tmp/jbake-2.6.4-bin/lib/jbake-core-2.6.4.jar,
     /tmp/jbake-2.6.4-bin/lib/jbake-dist-2.6.4.jar,
     /tmp/jbake-2.6.4-bin/lib/jcommander-1.35.jar,
     /tmp/jbake-2.6.4-bin/lib/jetty-http-9.2.26.v20180806.jar,
     /tmp/jbake-2.6.4-bin/lib/jetty-io-9.2.26.v20180806.jar,
     /tmp/jbake-2.6.4-bin/lib/jetty-server-9.2.26.v20180806.jar,
     /tmp/jbake-2.6.4-bin/lib/jetty-util-9.2.26.v20180806.jar,
     /tmp/jbake-2.6.4-bin/lib/jna-4.5.0.jar,
     /tmp/jbake-2.6.4-bin/lib/jna-platform-4.5.0.jar,
     /tmp/jbake-2.6.4-bin/lib/jruby-complete-9.1.17.0.jar,
     /tmp/jbake-2.6.4-bin/lib/json-simple-1.1.1.jar,
     /tmp/jbake-2.6.4-bin/lib/jsoup-1.11.3.jar,
     /tmp/jbake-2.6.4-bin/lib/jul-to-slf4j-1.7.25.jar,
     /tmp/jbake-2.6.4-bin/lib/logback-classic-1.2.3.jar,
     /tmp/jbake-2.6.4-bin/lib/logback-core-1.2.3.jar,
     /tmp/jbake-2.6.4-bin/lib/logging, /tmp/jbake-2.6.4-bin/lib/ognl-3.1.12.jar,
     /tmp/jbake-2.6.4-bin/lib/orientdb-core-2.2.37.jar,
     /tmp/jbake-2.6.4-bin/lib/parboiled-core-1.1.7.jar,
     /tmp/jbake-2.6.4-bin/lib/parboiled-java-1.1.7.jar,
     /tmp/jbake-2.6.4-bin/lib/pegdown-1.6.0.jar,
     /tmp/jbake-2.6.4-bin/lib/slf4j-api-1.7.25.jar,
     /tmp/jbake-2.6.4-bin/lib/snappy-java-1.1.0.1.jar,
     /tmp/jbake-2.6.4-bin/lib/thymeleaf-3.0.11.RELEASE.jar,
     /tmp/jbake-2.6.4-bin/lib/unbescape-1.1.6.RELEASE.jar)]
    Configuration error: Cannot locate configuration source default.properties
    matrixbot
    @matrixbot
    ancho I guess it is a bug. But need to see what's happening in the ConfigUtil first....
    Tobias Roeser
    @lefou
    Ok, I will open a ticket
    matrixbot
    @matrixbot
    ancho thanks
    Tobias Roeser
    @lefou
    Frank Becker
    @ancho
    :+1:
    Frank Becker
    @ancho
    see #597 on how to make it possible to configure DEBUG logging for apache commons with logback.
    Tobias Roeser
    @lefou
    Ok, for the reference, here's fix to work around the TCCL issue when using JBake main as library entry point.
    Frank Becker
    @ancho
    nice. thanks for sharing.
    Tobias Roeser
    @lefou
    I also added the plugin to the documentation
    umairarshadbutt
    @umairarshadbutt

    If you don’t require any of these special pages to be rendered then you can turn off the rendering of them by adding the following lines to your jbake.properties file:

    ...
    render.index=false
    render.archive=false (these lines are not working....is there i need to install anything else?)

    Frank Becker
    @ancho
    after you change these options you need to purge your destination folder and bake your site again. does that help?
    umairarshadbutt
    @umairarshadbutt
    no
    Frank Becker
    @ancho
    Please file a bugreport at github. I'm not able to reproduce that behaviour. What Version of jbake are you using?
    Frank Becker
    @ancho

    A quick example:

    Create a folder and initialize a jbake project:

    mkdir /tmp/test
    cd /tmp/test
    jbake -i

    Edit the jbake.properties file:

    render.index = false
    render.archive = false

    Build the project:

    jbake -b

    There is no index.html or archive.html file present:

     ls -lR output
    output:
    insgesamt 40
    -rw-r--r-- 1 frank frank 4363 Feb 23 10:03 about.html
    drwxr-xr-x 3 frank frank 4096 Feb 23 10:03 blog
    drwxr-xr-x 2 frank frank 4096 Feb 23 10:03 css
    -rw-r--r-- 1 frank frank  894 Feb 23 10:02 favicon.ico
    -rw-r--r-- 1 frank frank 6486 Feb 23 10:03 feed.xml
    drwxr-xr-x 2 frank frank 4096 Feb 23 10:03 fonts
    drwxr-xr-x 2 frank frank 4096 Feb 23 10:03 js
    -rw-r--r-- 1 frank frank  877 Feb 23 10:03 sitemap.xml
    
    output/blog:
    insgesamt 4
    drwxr-xr-x 2 frank frank 4096 Feb 23 10:03 2013
    
    output/blog/2013:
    insgesamt 32
    -rw-r--r-- 1 frank frank 4765 Feb 23 10:03 first-post.html
    -rw-r--r-- 1 frank frank 4704 Feb 23 10:03 fourth-post.html
    -rw-r--r-- 1 frank frank 4620 Feb 23 10:03 second-post.html
    -rw-r--r-- 1 frank frank 4704 Feb 23 10:03 third-post.html
    
    output/css:
    insgesamt 140
    -rw-r--r-- 1 frank frank 29015 Feb 23 10:02 asciidoctor.css
    -rw-r--r-- 1 frank frank   959 Feb 23 10:02 base.css
    -rw-r--r-- 1 frank frank 99961 Feb 23 10:02 bootstrap.min.css
    -rw-r--r-- 1 frank frank   607 Feb 23 10:02 prettify.css
    
    output/fonts:
    insgesamt 152
    -rw-r--r-- 1 frank frank 20335 Feb 23 10:02 glyphicons-halflings-regular.eot
    -rw-r--r-- 1 frank frank 62927 Feb 23 10:02 glyphicons-halflings-regular.svg
    -rw-r--r-- 1 frank frank 41280 Feb 23 10:02 glyphicons-halflings-regular.ttf
    -rw-r--r-- 1 frank frank 23320 Feb 23 10:02
    glyphicons-halflings-regular.woff
    
    output/js:
    insgesamt 148
    -rw-r--r-- 1 frank frank 29110 Feb 23 10:02 bootstrap.min.js
    -rw-r--r-- 1 frank frank  2636 Feb 23 10:02 html5shiv.min.js
    -rw-r--r-- 1 frank frank 95786 Feb 23 10:02 jquery-1.11.1.min.js
    -rw-r--r-- 1 frank frank 14551 Feb 23 10:02 prettify.js
    umairarshadbutt
    @umairarshadbutt
    v2.6.4
    leluna
    @leluna
    For my custom jbake type, I defined an attribute jbake-title which is used in the template. For some reason, I cannot use asciidoc replacement with jbake properties here. If I for example have :jbake-title: {mavenversion}, I will get "null" in the template evaluation. It works just fine in the asciidoc text body though. Any ideas? (Prio to v2.6, it doesn't get replaces at all when used as :jabke-title:, {mavenversion} should be directly displayed as is)
    Asad
    @asadganiev
    Hi, guys. How to make my website available externally
    now it only works on localhost