neo4j-contrib / neo4j-guides

Tooling to create Neo4j Browser Guides from AsciiDoc Content
33 stars 30 forks source link

Migrate to Gradle and restructure the projet #18

Open ggrossetie opened 4 years ago

ggrossetie commented 4 years ago

Structure:

Workflow:

jexp commented 4 years ago

can we split the build updates and moving the files around? I can do the latter, b/c I know what each was meant for. I like your "examples" thought so we can put each file+images into a folder in examples.

ggrossetie commented 4 years ago

can we split the build updates and moving the files around? I can do the latter, b/c I know what each was meant for. I like your "examples" thought so we can put each file+images into a folder in examples.

Yes we can but the build won't produce a usable browser guide until we have the proper structure (i.e. 01.adoc, 02.adoc...).

jexp commented 4 years ago

I don’t understand. Our guides are in most cases single adoc files.

Only training guides are so large/complex that they are split up in different guides/files.

In general you work on one guide at a time and want only to render that one. Only in some cases you want to render a bulk of guides.

ggrossetie commented 4 years ago

Oh I see so in: https://github.com/neo4j-contrib/neo4j-guides/tree/master/adoc the only browser guide is restaurant_recommendation.adoc?

I can configure the Gradle build to ignore the other AsciiDoc documents in this directory. I thought that they were related.

jexp commented 4 years ago

They are all "examples" that you can render to html

usually we used it this way:

run.sh path/to/file.adoc path/to/file.html [leveloffset=+1] [baseurl=https://guides.neo4j.com/...] other asciidoc-attributes

so you can render any file in any location and the ones provided here were just example files to test stuff out

ggrossetie commented 4 years ago

They are all "examples" that you can render to html

I'm fine with "examples" but my goal was to create a "module" that contains a complete/fully-working browser guide.

For instance, template-table.adoc query-template.adoc contains useful snippets of syntax but they are not "browser guide".

Also, browser.adoc relies on a local clone of the neo4j-documentation/developer-resources repository and the path does not match (anymore) the structure on the master branch.

usually we used it this way: run.sh path/to/file.adoc path/to/file.html [leveloffset=+1] [baseurl=https://guides.neo4j.com/...] other asciidoc-attributes so you can render any file in any location and the ones provided here were just example files to test stuff out

You don't have the same flexibility with the Gradle build since you need to define tasks. I guess we could create a generic convert task that takes parameters but in my opinion that would defeat the purpose of a build tool. If we want to do that it's probably better to use the Asciidoctor CLI directly.

Anyway, I will keep the files in the same place and generate a browser guide for "restaurant_recommendation.adoc" file. Is that OK?