= Neo4j Developer Guides
image::https://github.com/neo4j-documentation/developer-guides/workflows/Trigger%20Publish/badge.svg[Trigger Publish] image::https://github.com/neo4j-documentation/docs-refresh/workflows/Publish%20Developer/badge.svg[Publish Developer]
Built with link:https://antora.org/[Antora^].
== Installation
To build these docs locally you will need link:https://nodejs.org/en/download/package-manager/[Node & NPM^] installed. Antora requires Node version 10 or higher.
To install the dependencies run:
[source,sh] npm install
== Contributing
To make changes to this repository, please create a new branch to stage your changes.
Your branch should be prefixed with the type of change, for example content/new-cypher-guide
or fix/broken-links
.
When you are finished with your changes push the branch to the remote repository and create a Pull Request. Please add at least one approver.
The changes will be merged into the publish
branch, which will in turn trigger a rebuild of the content in the link:https://github.com/neo4j-documentation/docs-refresh[docs-refresh^] repository.
git clone https://github.com/neo4j-documentation/developer-guides
git checkout -b content/my-fix
touch modules/ROOT/pages/new-guide.adoc
git add modules/ROOT/pages/new-guide.adoc
git commit -m "Added a new guide"
At the end of the build process, the files are uploaded to the static-content.neo4j.com
S3 Bucket. From there, they are synced up to the Neo4j.com server once an hour, on the hour by a cronjob.
== Live Preview
To preview the docs run:
[source,sh] npm start
This will build a set of HTML files in build/site
and then serve them through an express server at http://localhost:8000.
The dev script will also listen for changes and automatically rebuild the files automatically.
You'll still need to refresh the page to view the changes.
== Publishing
Merging changes into the publish
branch of this repo will trigger a rebuild of the HTML and CSS files in the link:https://github.com/neo4j-documentation/docs-refresh[Docs Refresh^] repo using a link:.github/[Github Action].
// [source,sh] // ---- // # clone the repo // git clone https://github.com/neo4j-documentation/developer-guides // # stage the commit // touch modules/ROOT/page.adoc // git add . // # Commit // git commit -m "My changes" // # Optionally, do a pull to make sure you have the latest. // git pull // # Merge the latest changes on the remote branch // git push origin master // # Push the HEAD of the branch to the publish branch // git push origin HEAD:publish // ----