Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Gradle and restructure the projet #18

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ggrossetie
Copy link

@ggrossetie ggrossetie commented Jun 25, 2020

Structure:

  • Moved query-template.adoc and template-table.adoc to examples
  • Moved the AsciiDoc files into restaurant-recommendation/docs
  • Moved images into restaurant-recommendation/images

Workflow:

  • Convert to HTML: ./gradlew convert
  • Start HTTP server: ./gradlew httpServer
  • Open the browser guide in Neo4j Browser: :play http://localhost:35729/browser-guide/index.html

'allow-uri-read': '',
'guides': "http://localhost:35729/browser-guide",
'icons': 'font',
'leveloffset': '+1',
Copy link
Author

@ggrossetie ggrossetie Jun 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels like a hack, we should probably revisit the templates (in a future pull request).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the leveloffset, yeah b/c we turn level 2 into slides and level 3 into subslides but most sources have a level lower, i.e. 3 as subsections.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could handle this case in the template but we can do that latter.

@jexp
Copy link
Member

jexp commented Jul 7, 2020

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
Copy link
Author

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
Copy link
Member

jexp commented Jul 7, 2020

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
Copy link
Author

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
Copy link
Member

jexp commented Jul 7, 2020

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
Copy link
Author

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?

@ggrossetie ggrossetie changed the title Migrate to Gradle Migrate to Gradle and restructure the projet Jul 8, 2020
@ggrossetie ggrossetie marked this pull request as draft July 8, 2020 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants