Fork me on GitHub
#off-topic
<
2020-11-28
>
Fra10:11:36

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

borkdude11:11:43

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

borkdude11:11:59

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

🙌 3
borkdude17:11:26

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

andy.fingerhut17:11:53

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

dominicm19:11:59

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

dominicm19:11:02

No good for github ofc

myguidingstar23:11:13

@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 😄

myguidingstar23:11:41

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

myguidingstar23:11:56

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

myguidingstar00:11:42

@borkdude if you're fine with antora (which is a distribution of asciidoc with nice things like versioning), then there's a theme that may fit your description. A demo here https://asciidoctor-docs.netlify.app/asciidoctor/current/

myguidingstar00:11:40

or you may just steal some code from that theme ;)

dominicm02:11:21

No asciidoc plugin needed for overriding a single template. Just the -t option to the cli iirc.

borkdude08:11:18

I'll look into antora

borkdude12:11:14

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

borkdude12:11:34

$ 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

borkdude12:11:15

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

myguidingstar12:11:17

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

borkdude12:11:27

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

borkdude12:11:40

It's kind of an overwhelming and imposing framework

myguidingstar12:11:06

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

myguidingstar12:11:50

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

borkdude12:11:24

No, I'm doing this locally

myguidingstar12:11:56

ok, let me checkout the code locally

borkdude12:11:57

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

borkdude12:11:21

You can run it from the antaro branch with:

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

myguidingstar12:11:45

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

myguidingstar12:11:39

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

borkdude12:11:43

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

borkdude12:11:27

the CI part is not the issue

myguidingstar12:11:29

let me check out your code...

borkdude12:11:53

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

myguidingstar13:11:27

@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[]

myguidingstar13:11:01

notice the example$ string is added

myguidingstar13:11:16

I'm opening a PR for it now

borkdude13:11:51

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

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

borkdude13:11:13

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

myguidingstar13:11:37

antora is mostly about multiple repos, multiple version

myguidingstar13:11:38

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

myguidingstar13:11:29

the full version would be: version@component:module:family$resource.ext😄

myguidingstar13:11:50

so it's feature for some and headache for others

borkdude13:11:57

so examples is an antora convention

borkdude13:11:36

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

borkdude13:11:27

Thanks for the PR

myguidingstar13:11:37

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

borkdude13:11:34

ok, well, that's a minor issue

borkdude13:11:54

this looks good, thanks!

myguidingstar13:11:15

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

borkdude13:11:45

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

myguidingstar13:11:51

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

myguidingstar13:11:27

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

myguidingstar13:11:52

(as happened to gitbook)

borkdude13:11:57

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

😉 3
dominicm14:11:45

I may have been the seed for that :)

dominicm14:11:12

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

borkdude14:11:36

@U09LZR36F are you using antora from clj?

myguidingstar15:11:58

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 @U09LZR36F is using asciidoctor from Clojure jvm, not antora

👍 3
dominicm15:11:29

Yeah, no antora

borkdude16:11:49

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

borkdude16:11:08

@U09LZR36F 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

borkdude17:11:40

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

borkdude17:11:53

it does something when you click one section or scroll

myguidingstar04:11:03

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

borkdude10:11:43

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

borkdude10:11:19

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

myguidingstar11:11:06

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

myguidingstar11:11:28

maybe you want to clear the browser cache?

borkdude11:11:41

Problem solved now. I needed a .nojekyll file

myguidingstar11:11:44

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

borkdude17:11:45

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

dominicm18:11:39

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