This repository serves for three purposes:
- The Wiki provides documentation for developers contributing to the framework, Commiters.
- Gathering issues improving the documentation of the framework and tasks on writing articles at spine.io and other web resources.
- Storing documentation files that are added as a Hugo module to the spine.io repository.
We have repository for the code of spine.io site. Issues there are for improving the site features.
Tasks for the content of the spine.io site should belong to issues of this repository.
This repository is made to be self-sustainable in terms of editing. A fully-fledged Hugo site has been set up for it. All the contents and links are working as intended. It allows making changes more convenient for authors.
- JDK 8 (x86_64).
- Go
1.12or newer. - Node.js
18+. - Hugo Extended in version
v0.150.0or higher. - Access to the
site-commonsrepository — to download the theme.
- Make sure SSH configured correctly and the passphrase is stored in the keychain.
- Install project dependencies from the
sitedirectory by runningnpm install.
The project has two directories:
docs– contains the documentation files along with all the necessary JS and CSS files. This directory will be added toSpineEventEngine/SpineEventEngine.github.ioas a Hugo Module.site– contains the HTML and CSS files needed only to run the documentation locally.
To build and launch the site on the local server:
./gradlew :runSiteTo build the site without running the server:
./gradlew :buildSiteAnother way to run the site locally is to follow these steps:
-
Navigate to the
sitefolder. -
Start the local server with this command:
hugo server
If you receive a permission denied message, but you are sure that you have
all the rights to the required repositories, try clearing
the cache:
hugo mod clean --allThen run the hugo serve again.
This project uses several components from the site-commons
Hugo theme.
Please note that if you update a theme with any critical changes, it must also
be updated in the main spine.io site repository.
To get theme updates:
-
Navigate to the
sitedirectory. -
Clean the module cache:
hugo mod clean
-
Update the Hugo Modules:
hugo mod get -u
-
Commit and push changes from
go.modandgo.sumfiles. In thego.sumfile keep only two last records to avoid file cluttering.
The code samples used in the framework documentation are added using
the embed-code tool (Go version).
The code resides under the _code directory. For instructions on embedding
the code into the pages, please see the EMBEDDING.md file.
Please note that the following part of the script requires an ARM-based Mac.
To embed the code samples, run:
./gradlew :embedCodeTo verify that the source code samples embedded into the pages are up-to-date, run:
./gradlew :checkSamplesTo release a new version of Spine documentation, see the SPINE_RELEASE.md.
For instructions on adding the content to the documentation, please see
the AUTHORING.md file.
The documentation related styles are placed inside docs/assets/scss.
The docs directory will be automatically added to the main site using Hugo Modules.
There are two main import files:
docs-common.scss— contains the common styles that are also necessary for theSpineEventEngine/SpineEventEngine.github.iorepository. To not duplicate global variables and layout styles, import the file in the main repository at the top of themain.scssdocs.scss— contains styles responsible for the appearance of the documentation. Should be imported into themain.scssof thespine.iosite as well.
Styles needed only for running the documentation locally are located
in site/assets/scss. They will not be available on spine.io.
-
If you are getting the terminal
prompts disabled errorwhen trying to get theme updates, make sure you have allowed 2FA to do its job. Also if you have authentication issues during submodules update. You can resolve it with this command:git config --global --add url."git@github.com:".insteadOf "https://github.com/"
-
If you are getting the
unknown revision upgradeerror when trying to get theme updates, clean the module cache:hugo mod clean --all