off-topic

https://github.com/clojurians/community-development/blob/master/Code-of-Conduct.md Clojurians Slack Community Code of Conduct. Searchable message archives are at https://clojurians-log.clojureverse.org/
gibi 2020-11-28T10:43:36.178800Z

Hi, I am learning Clojure in my own time and I’ve previously spent a few months to learn Haskell basics. I have a decade of experience with Java and would like to get a Clojure job. I was planning to create a side-project and in two/three months start applying. I live in London but I’m afraid it will be hard to accomplish my plan since I can’t offer any professional experience. What kind of advice would you give me? Thanks

borkdude 2020-11-28T11:47:43.179400Z

@francesco.losciale You could try in #jobs-discuss

borkdude 2020-11-28T11:47:59.179800Z

Also you could apply to jobs that are stating that they accept Clojure beginners who are willing to learn

πŸ™Œ 1
borkdude 2020-11-28T17:06:26.182200Z

Is there a way to make the TOC with asciidoc fancier, e.g. collapsible?

borkdude 2020-11-29T08:45:18.188700Z

I'll look into antora

borkdude 2020-11-29T12:21:14.189300Z

Trying to convert to antora, but it's kind of intrusive and it can't find included files...

borkdude 2020-11-29T12:21:34.189500Z

$ antora generate antora-playbook.yml --to-dir /tmp/antora --clean
asciidoctor: ERROR: usage.adoc: line 63: include target not found: usage/download_html.clj
$ ls src/modules/ROOT/pages/usage
download_html.clj io-flags.adoc     repl.adoc

borkdude 2020-11-29T12:22:15.189700Z

Pushed this to the antora branch at https://github.com/babashka/book

2020-11-29T12:36:17.190100Z

maybe you want to follow the standard directory name? https://docs.antora.org/antora/2.3/standard-directories/

borkdude 2020-11-29T12:38:27.190300Z

Could do, but it can't even find a file relative to the adoc file itself...

borkdude 2020-11-29T12:38:40.190500Z

It's kind of an overwhelming and imposing framework

2020-11-29T12:40:06.190800Z

btw, are you leveraging any CI/CD system to publish the doc? I mean pushing to git and you're done, the latest version is automatically generated and deployed

2020-11-29T12:40:50.191100Z

I ask because I don't see the usual CI/CD config there

borkdude 2020-11-29T12:42:24.191300Z

No, I'm doing this locally

2020-11-29T12:42:56.191500Z

ok, let me checkout the code locally

borkdude 2020-11-29T12:42:57.191700Z

Just trying to convert my local asciidoctor setup to antaro by following the docs

borkdude 2020-11-29T12:43:21.191900Z

You can run it from the antaro branch with:

antora generate antora-playbook.yml --to-dir /tmp/antora --clean

2020-11-29T12:44:45.192100Z

regarding CI/CD, I use gitlab, their "gh-pages" equivalent can run any kind of static site generator, not just jekyll

2020-11-29T12:45:39.192300Z

I have walkable's doc deployed there (with antora) http://walkable.gitlab.io

borkdude 2020-11-29T12:45:43.192500Z

yeah, I don't need all of that, I have a simple setup for this

borkdude 2020-11-29T12:46:27.192700Z

the CI part is not the issue

2020-11-29T12:46:29.192900Z

let me check out your code...

borkdude 2020-11-29T12:46:53.193100Z

what I did is basically copy everything I had in src to src/modules/ROOT/pages

2020-11-29T13:11:27.193400Z

@borkdude here's how to do it: 1. move the file you want to include to examples dir: mv pages/usage/download_html.clj examples 2. change the include line like this include::example$download_html.clj[]

2020-11-29T13:12:01.193600Z

notice the example$ string is added

2020-11-29T13:12:16.193800Z

I'm opening a PR for it now

borkdude 2020-11-29T13:19:37.194100Z

Aha...

borkdude 2020-11-29T13:20:51.194300Z

why doesn't it work like it did though? I also had:

[source,clojure]
----
include::usage/download_html.clj[]
----

borkdude 2020-11-29T13:21:13.194500Z

with the clj file in pages/usage/download_html.clj

2020-11-29T13:24:37.194700Z

antora is mostly about multiple repos, multiple version

2020-11-29T13:25:38.194900Z

example$ is only the short form, because that dir is in the same repo and version with the adoc file

2020-11-29T13:26:29.195100Z

the full version would be: version@component:module:family$resource.extπŸ˜„

borkdude 2020-11-29T13:26:48.195300Z

aha

2020-11-29T13:26:50.195500Z

so it's feature for some and headache for others

borkdude 2020-11-29T13:26:57.195700Z

so examples is an antora convention

2020-11-29T13:27:25.195900Z

right

borkdude 2020-11-29T13:27:36.196100Z

Is there a way to fix this emacs warning when using antora?

borkdude 2020-11-29T13:28:27.196500Z

Thanks for the PR

2020-11-29T13:28:37.196800Z

I guess there's not an easy way, such example$ is resolved at build time

borkdude 2020-11-29T13:29:34.197100Z

ok, well, that's a minor issue

borkdude 2020-11-29T13:29:54.197400Z

this looks good, thanks!

2020-11-29T13:30:15.197600Z

sorry for pointing you to the land of complexity :))

borkdude 2020-11-29T13:30:45.197800Z

Do you think antora will be here for a while? I've adopted Octopress a few years ago but now it's totally abandonware and I'm left with Ruby stuff I don't know

2020-11-29T13:32:51.198100Z

I don't know about antora, but asciidoc has been around for 20 years

2020-11-29T13:33:27.198300Z

as long as we don't depend on some cloud service, then it won't be too bad

2020-11-29T13:33:52.198500Z

(as happened to gitbook)

borkdude 2020-11-29T13:49:57.198700Z

I notice I basically want to have the same layout as CIDER: https://docs.cider.mx/ @bozhidar is also using antora, which gives me even more confidence in this framework ;)

πŸ˜‰ 1
dominicm 2020-11-29T14:14:45.199Z

I may have been the seed for that :)

dominicm 2020-11-29T14:15:12.199200Z

I use adoc from clojure a lot. Its how I build my blog. Can't deal with the ruby stuff.

borkdude 2020-11-29T14:46:36.199400Z

@dominicm are you using antora from clj?

2020-11-29T15:57:58.199700Z

asciidoctor is a Ruby implementation of asciidoc the language. Asciidoctor has been transpiled to JVM and nodejs. Antora wraps around asciidoc's nodejs version. Chances are @dominicm is using asciidoctor from Clojure jvm, not antora

πŸ‘ 1
dominicm 2020-11-29T15:58:29.200Z

Yeah, no antora

borkdude 2020-11-29T16:11:49.200200Z

When you use asciidoctor from the JVM, it's probably using JRuby right?

borkdude 2020-11-29T16:56:08.200400Z

@dominicm I am contemplating the options. The antaro makes the stuff look better and gives me a collapsible menu, but I might also be able to get this with some simple javascript which wraps stuff inside details tags. Or maybe asciidoctor lets me do this another way. And then my setup is way simpler then with antaro and I could maybe manage this from Clojure, which is more attractive to me

borkdude 2020-11-29T17:22:40.200600Z

I now added a tocify plugin as JS to the page: https://book.babashka.org/

borkdude 2020-11-29T17:22:53.200900Z

it does something when you click one section or scroll

2020-11-30T04:26:03.238Z

the new menu looks pretty neat @borkdude If you only maintain one latest version then avoiding antora totally makes sense

borkdude 2020-11-30T10:49:43.239Z

@myguidingstar I'm very close to releasing a page based on Antaro now...

borkdude 2020-11-30T10:50:19.239200Z

but I'm running into one last silly issue. This page is obviously in the gh-pages tree: https://github.com/babashka/book/blob/gh-pages/_/intro.html But somehow it doesn't get served: https://book.babashka.org/_/intro.html

2020-11-30T11:24:06.239800Z

what do you mean by "doesn't get served"? I've just opened the http://babashka.org link and it's there

2020-11-30T11:24:28.240Z

maybe you want to clear the browser cache?

borkdude 2020-11-30T11:25:41.240200Z

Problem solved now. I needed a .nojekyll file

borkdude 2020-11-30T11:25:44.240400Z

Thanks :)

2020-11-30T11:26:44.240600Z

ah, nice tips from @borkdude as always :))

borkdude 2020-11-28T17:06:45.182600Z

(I have googled, but it's a jungle of old issues, I'd rather have some to the point information)

2020-11-28T17:08:53.182700Z

You mean, generate HTML from asciidoc that has a collapsible TOC?

borkdude 2020-11-28T17:19:00.182900Z

yes

dominicm 2020-11-28T18:52:39.183700Z

@borkdude antora might do that. I've not seen it done though.

dominicm 2020-11-28T19:55:59.184100Z

I should note, asciidoctor allows overriding most things that it generates if you want to take control of toc generation.

dominicm 2020-11-28T19:56:02.184300Z

No good for github ofc

borkdude 2020-11-28T19:59:27.184500Z

I'm publishing it here: https://book.babashka.org/

2020-11-28T23:18:13.185Z

@borkdude given that the TOC is already generated in HTML tree, you can write a small js script to make it work the way you want. Pure css implementation is hairy to work on there because that requires changing the generated HTML structure which means writing asciidoc plugins πŸ˜„

2020-11-28T23:20:41.185200Z

it's pleasant to see Clojure community are moving towards the use of asciidoc for serious technical writing

2020-11-28T23:21:56.185400Z

I believe it started with Fulcro and Pathom, and now Crux