generated from SpineEventEngine/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Docs set 1 #261
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
Draft
alexander-yevsyukov
wants to merge
74
commits into
master
Choose a base branch
from
docs-set-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Docs set 1 #261
Changes from all commits
Commits
Show all changes
74 commits
Select commit
Hold shift + click to select a range
d1a3200
Reduce using "please" in docs
alexander-yevsyukov 11c6121
Improve text layout
alexander-yevsyukov b16788a
Bump version -> `2.0.0-SNAPSHOT.394`
alexander-yevsyukov 9c0a34b
Bump Validation and CoreJvm Compiler
alexander-yevsyukov 6379b9f
Update dependency reports
alexander-yevsyukov 1d17e3b
Merge remote-tracking branch 'origin/master' into docs-set-1
alexander-yevsyukov 1397636
Update config ref.
alexander-yevsyukov 6e2fe2b
Remove "Migration Guide" section
alexander-yevsyukov 479c28c
Improve text layout
alexander-yevsyukov 4230509
Remove unnecessary decorations
alexander-yevsyukov 77bbd9c
Remove hallucinated section links
alexander-yevsyukov 4bf36f0
Remove redundant horizontal lines
alexander-yevsyukov 09a9d47
Convert titles to sentence case
alexander-yevsyukov 90bc7db
Allow empty lines after headers
alexander-yevsyukov 78da3fb
Fix the proto options example
alexander-yevsyukov 2d1f0aa
Use braces around proto options
alexander-yevsyukov 0300e79
Temporarily add source code of proto options
alexander-yevsyukov 94f69c0
Fix capitalization
alexander-yevsyukov 449a789
Backtick code in ToC
alexander-yevsyukov 3671ae4
Put the "Collection constraints" section after "Temporal constraints"
alexander-yevsyukov 16a2736
Describe Validation components
alexander-yevsyukov 7fb87ac
Remove "Configuration & tooling" section
alexander-yevsyukov 51c5036
Rename "Installation" to "Adding Validation to your build"
alexander-yevsyukov d3d0b60
Describe adding Validation to a Gradle build
alexander-yevsyukov 5383ae2
Improve the example type name in the `ValidationError` docs
alexander-yevsyukov 0bb6196
Remove the leading zero in the Introduction section title
alexander-yevsyukov f99685a
Add wording for the `first-model.md`
alexander-yevsyukov 9f5204a
Remove mentioning of temporal constraints
alexander-yevsyukov e409aa5
Add `code/first-model` subproject
alexander-yevsyukov c681d66
Make JVM runtime expose `Base.lib` at the `api` level
alexander-yevsyukov 9e97727
Remove redundant dependencies
alexander-yevsyukov 5918462
Remove commented out code
alexander-yevsyukov fe8e722
Improve package name for the `BankCard` example
alexander-yevsyukov fe75e36
Fix Kotlin package path
alexander-yevsyukov 5316c03
Add Java test for `BankCard`
alexander-yevsyukov 8ee49bd
Improve Kotlin test name
alexander-yevsyukov 652a545
Bump Gradle -> `9.3.0`
alexander-yevsyukov c1dde85
Update dependency reports
alexander-yevsyukov de11e7e
Add `spine-compiler` plugin dependency
alexander-yevsyukov e48782a
Remove outdated configuration proto code
alexander-yevsyukov 5cc8b40
Update dependency reports
alexander-yevsyukov 01e5e12
Add requirements for supported browsers
alexander-yevsyukov 7300c06
Auto-updated by IDEA
alexander-yevsyukov a274f85
Improve the structure of the `docs` directory
alexander-yevsyukov b7f6ab0
Add structure proposal
alexander-yevsyukov ebe0672
Improve formatting
alexander-yevsyukov 69f0da2
Move content under the `content/docs` dir
alexander-yevsyukov e6827a6
Add scripts and settings
alexander-yevsyukov 0e9cc87
Add Gradle project
alexander-yevsyukov ea1dca4
Add Go module for Validation Docs
alexander-yevsyukov 912a91e
Add `docs/.gitignore`
alexander-yevsyukov 0f3b92f
Add assets
alexander-yevsyukov c475633
Rename `_site` to `_preview`
alexander-yevsyukov eff6d99
Add content for the preview
alexander-yevsyukov d383d34
Fix placement of `_index.md`
alexander-yevsyukov f340143
Fix import of `site-commons`
alexander-yevsyukov 3b8236c
Add `buildAll` tasks for building embedded code
alexander-yevsyukov ae5826b
Obtain the example version from the main code build
alexander-yevsyukov d085a55
Use the same `gradle.properties` for the documentation Gradle build
alexander-yevsyukov 091f906
Document Gradle project of the documentation
alexander-yevsyukov bf1ace9
Fix relative paths in scripts
alexander-yevsyukov 9b38339
Fix symlinks to use relative paths
alexander-yevsyukov 90bdaf4
Fix import placement
alexander-yevsyukov 181ba88
Bump Gradle -> `9.3.1`
alexander-yevsyukov 75a0f4e
Ignore `_out` directories in `_code` subprojects
alexander-yevsyukov 011527b
Do not use code from `buildSrc` in example projects
alexander-yevsyukov d299f4d
Add `TIMEOUT_MINUTES` property
alexander-yevsyukov ca70c08
Refer to Spine Maven repositories for plugin management
alexander-yevsyukov 169e733
Stop using `includeBuild`
alexander-yevsyukov a6adb93
Build `firat-model` via `RunGradle`
alexander-yevsyukov 5edee38
Add `docs/buildSrc` reference
alexander-yevsyukov 1df5d08
Improve regex patterns and docs
alexander-yevsyukov e31ae89
Improve regex patterns and docs
alexander-yevsyukov ca5f681
Fix the reference to the `clean` task
alexander-yevsyukov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: Check Code Embedding | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| build-embedded-code: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| with: | ||
| submodules: 'recursive' | ||
|
|
||
| - uses: actions/setup-java@v5 | ||
| with: | ||
| java-version: 17 | ||
| distribution: zulu | ||
|
|
||
| - run: cd docs && ./gradlew :buildAll | ||
|
|
||
| check-embedded-samples: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| with: | ||
| submodules: 'recursive' | ||
|
|
||
| - uses: actions/setup-java@v5 | ||
| with: | ||
| java-version: 17 | ||
| distribution: zulu | ||
|
|
||
| - name: Check Embedding | ||
| run: cd docs && ./gradlew :checkSamples |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule config
updated
8 files
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Hugo cache files | ||
| _preview/resources | ||
| public | ||
|
|
||
| # Node modules | ||
| _preview/node_modules | ||
|
|
||
| # Used to control concurrency between multiple Hugo instances | ||
| _preview/.hugo_build.lock | ||
|
|
||
| # Needed for navigation/intellisense help inside code editors | ||
| jsconfig.json | ||
|
|
||
| # `_out` directory in the example projects | ||
| **/_out |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # Gradle project of the Validation Documentation | ||
|
|
||
| This document describes the Gradle project structure and build configuration for | ||
| building the documentation [preview site](./_preview) for the Spine Validation library. | ||
|
|
||
| The site built by this project is used for development and preview purposes. | ||
| It is not meant to be published as-is, but rather to be used as a staging area for | ||
| the documentation before it is merged into the main [documentation][main-documentation] project. | ||
|
|
||
| ## Build tasks | ||
|
|
||
| The [Gradle build](build.gradle.kts) under the `docs/` provides the following tasks: | ||
|
|
||
| 1. **`buildAll`** — building the code of the examples embedded in the documentation. | ||
| This ensures that all code snippets are valid and can be compiled. | ||
|
|
||
| 2. **`embedCode`** — embedding the source code of the examples into the Markdown files. | ||
| This allows the documentation to include up-to-date code snippets from the source files. | ||
| This task is meant to be run manually when you write or update the documentation. | ||
|
|
||
| 3. **`checkSamples`** — checking that the embedded code snippets in the Markdown files are | ||
| consistent with the source code. | ||
| This is a validation step to ensure that the documentation accurately reflects the example code. | ||
| This task is executed automatically via the [GitHub workflow][check-code-embedding]. | ||
|
|
||
| 4. **`buildSite`** — building the documentation site using Hugo. | ||
| The site is generated in the [_preview/](./_preview) directory. | ||
|
|
||
| 5. **`runSite`** — running a local Hugo server to preview the documentation site. | ||
| This allows you to view the documentation in a web browser during development. | ||
|
|
||
| 6. **`installDependencies`** — installing the Node dependencies for the preview site. | ||
| Tasks related to Hugo depend on this task. It is not meant to be run manually. | ||
|
|
||
| ## Paths in the scripts | ||
|
|
||
| The shell [scripts](./_script) used by the Gradle build assume that **this** `docs/` | ||
| directory is the current working directory. | ||
|
|
||
| So when you start working with the documentation, make sure to `cd` into | ||
| it before running any of the scripts or Gradle tasks. | ||
|
|
||
| ## Including example sources | ||
|
|
||
| It is done in the [`settings.gradle.kts`](settings.gradle.kts) file via `includeBuild` directive. | ||
| If you add another example proejct, please remember to update | ||
alexander-yevsyukov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| the [`settings.gradle.kts`](settings.gradle.kts) file. | ||
|
|
||
| ## Linking to the main project build | ||
|
|
||
| The example projects share the following directories and files with | ||
| the main code project via symlinks: | ||
| * `buildSrc` | ||
| * `gradle.properties` | ||
| * `gradlew` | ||
| * `gradlew.bat` | ||
|
|
||
| When you add an example project, make sure to create the necessary symlinks to | ||
| these files and directories. | ||
|
|
||
| [check-code-embedding]: ../.github/workflows/check-code-embedding.yml | ||
| [main-documentation]: https://github.com/SpineEventEngine/documentation/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,175 @@ | ||
| # Structuring repositories for Hugo documentation using Go modules | ||
|
|
||
| This document describes the **recommended repository layout and Hugo | ||
| Module mount strategy** for building modular documentation where: | ||
|
|
||
| - The **main site** assembles documentation from multiple repositories | ||
| - Each framework/library keeps **all documentation isolated under | ||
| `docs/`** | ||
| - Hugo Modules (Go modules) are used for versioning and composition | ||
|
|
||
| ------------------------------------------------------------------------ | ||
|
|
||
| ## High-level architecture | ||
|
|
||
| - **Main site repository** | ||
| - Hugo site that assembles all documentation | ||
| - Imports documentation modules only | ||
| - **Documentation provider repositories** (framework, libraries) | ||
| - Each repo exposes its documentation as a **Hugo Module** | ||
| - All doc-related files live under `docs/` | ||
|
|
||
| Each `docs/` directory is: | ||
| - a **Go module root** (`go.mod`) | ||
| - a **Hugo project root** (`hugo.yaml`) | ||
|
|
||
| ------------------------------------------------------------------------ | ||
|
|
||
| ## Main site repository | ||
|
|
||
| main-site/ | ||
| go.mod | ||
| hugo.yaml | ||
| content/ | ||
| layouts/ | ||
| assets/ | ||
|
|
||
| ### hugo.yaml | ||
|
|
||
| ``` yaml | ||
| module: | ||
| imports: | ||
| - path: github.com/your-org/framework/docs | ||
| - path: github.com/your-org/lib-foo/docs | ||
| - path: github.com/your-org/lib-bar/docs | ||
| ``` | ||
|
|
||
| ------------------------------------------------------------------------ | ||
|
|
||
| ## Framework documentation repository | ||
|
|
||
| framework/ | ||
| docs/ | ||
| go.mod | ||
| go.sum | ||
| hugo.yaml | ||
| content/ | ||
| framework/ | ||
| _index.md | ||
| layouts/ | ||
| assets/ | ||
|
|
||
| ### docs/go.mod | ||
|
|
||
| ``` go | ||
| module github.com/your-org/framework/docs | ||
| go 1.22 | ||
| ``` | ||
|
|
||
| ### docs/hugo.yaml | ||
|
|
||
| ``` yaml | ||
| module: | ||
| mounts: | ||
| - source: content | ||
| target: content/framework | ||
| - source: layouts | ||
| target: layouts | ||
| - source: assets | ||
| target: assets | ||
| ``` | ||
|
|
||
| ------------------------------------------------------------------------ | ||
|
|
||
| ## Library documentation repository (example: lib-foo) | ||
|
|
||
| lib-foo/ | ||
| docs/ | ||
| go.mod | ||
| hugo.yaml | ||
| content/ | ||
| libraries/ | ||
| foo/ | ||
| _index.md | ||
|
|
||
| ### docs/go.mod | ||
|
|
||
| ``` go | ||
| module github.com/your-org/lib-foo/docs | ||
| go 1.22 | ||
| ``` | ||
|
|
||
| ### docs/hugo.yaml | ||
|
|
||
| ``` yaml | ||
| module: | ||
| mounts: | ||
| - source: content | ||
| target: content/libraries/foo | ||
| - source: layouts | ||
| target: layouts | ||
| - source: assets | ||
| target: assets | ||
| ``` | ||
|
|
||
| ------------------------------------------------------------------------ | ||
|
|
||
| ## Content conventions | ||
| * Always mount into namespaced sections: | ||
| * `content/framework/...` | ||
| * `content/libraries/<libname>/...` | ||
| * Use `_index.md` at section roots to create proper landing pages | ||
| * Avoid mounting directly to `content/` without a subdirectory | ||
|
|
||
| ------------------------------------------------------------------------ | ||
|
|
||
| ## Optional: shared documentation UI module | ||
|
|
||
| For shared shortcodes, partials, and styling: | ||
|
|
||
| docs-ui/ | ||
| go.mod | ||
| hugo.yaml | ||
| layouts/ | ||
| shortcodes/ | ||
| partials/ | ||
| assets/ | ||
|
|
||
| **docs-ui/hugo.yaml:** | ||
|
|
||
| ```yaml | ||
| module: | ||
| mounts: | ||
| - source: layouts | ||
| target: layouts | ||
| - source: assets | ||
| target: assets | ||
| ``` | ||
| Import this module before content modules in the main site. | ||
|
|
||
| ------------------------------------------------------------------------ | ||
|
|
||
| ## Local development | ||
|
|
||
| Run documentation standalone from a repo: | ||
|
|
||
| cd framework | ||
| hugo server --source docs | ||
|
|
||
| For multi-repo development, consider a go.work file to use local checkouts instead of remote module versions. | ||
|
|
||
| ------------------------------------------------------------------------ | ||
|
|
||
| ## Key rules to follow | ||
| * docs/ is the only Hugo + Go module root in doc-providing repos | ||
| * Each docs module defines its own mounts | ||
| * The main site only imports modules | ||
| * Mount targets must be unique and namespaced | ||
| * Commit both go.mod and go.sum for reproducible builds | ||
|
|
||
| ------------------------------------------------------------------------ | ||
|
|
||
| ## References | ||
| * Hugo Modules overview: https://gohugo.io/hugo-modules/ | ||
| * Hugo module configuration: https://gohugo.io/configuration/module/ | ||
| * Go modules reference: https://go.dev/ref/mod |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This introduces a magic-number timeout without context. Consider adding a short KDoc/line comment explaining what this timeout is used for, and/or naming it more specifically (e.g.,
DOCS_BUILD_TIMEOUT_MINUTES,CI_TASK_TIMEOUT_MINUTES) so its scope is clear.