-
Notifications
You must be signed in to change notification settings - Fork 30
More docs updates #136
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
Merged
Merged
More docs updates #136
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ebd1e7a
more docs updates
bmorelli25 2003e3c
sync readmes
bmorelli25 28a6120
add migration and contribution guide placeholders
bmorelli25 76281a4
fix image
bmorelli25 ff0bb49
small update
bmorelli25 a3c2e6d
add configure, contribution, and migration guides
bmorelli25 75f2fff
add more content
bmorelli25 5f5d23d
fix bug?
bmorelli25 ceb422f
remove link
bmorelli25 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
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,5 @@ | ||
--- | ||
title: Attributes | ||
--- | ||
|
||
tbd |
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,5 @@ | ||
--- | ||
title: File structure | ||
--- | ||
|
||
tbd |
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,11 @@ | ||
--- | ||
title: Content set configuration | ||
navigation_title: Content set | ||
--- | ||
|
||
Now we'll zoom into the AsciiDoc book level, and explore the V3 equivalent: content sets. At the book level, the system consists of: | ||
|
||
| System property | Asciidoc | V3 | | ||
| -------------------- | -------------------- | -------------------- | | ||
| **Content source files** --> A whole bunch of markup files as well as any other assets used in the docs (for example, images, videos, and diagrams). | **Markup**: AsciiDoc files **Assets**: Images, videos, and diagrams | **Markup**: MD files **Assets**: Images, videos, and diagrams | | ||
| **Information architecture** --> A way to specify the order in which these text-based files should appear in the information architecture of the book. | `index.asciidoc` file (this can be spread across several AsciiDoc files, but generally starts with the index file specified in the `conf.yaml` file)) | TBD | |
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,5 @@ | ||
--- | ||
title: Navigation | ||
--- | ||
|
||
tbd |
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,4 @@ | ||
--- | ||
title: Configure Elastic Docs | ||
navigation_title: Configuration reference | ||
--- |
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,10 @@ | ||
--- | ||
title: Page configuration | ||
navigation_title: Page | ||
--- | ||
|
||
tbd | ||
|
||
go into frontmatter here? | ||
|
||
for now, see [frontmatter](../syntax/frontmatter.md). |
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,43 @@ | ||
--- | ||
title: Content config | ||
--- | ||
|
||
In both the AsciiDoctor- and V3-based system, there is site-wide configuration where you list all content sources, where to find those sources, and in what order they should be added to the site. | ||
|
||
In the AsciiDoctor system, this all happens in one YAML file in the /docs repo. In the V3 system, this ... | ||
|
||
## AsciiDoctor conf.yml | ||
|
||
In the AsciiDoctor-powered site, content configuration at the site level is done in the [`conf.yaml`](https://github.com/elastic/docs/blob/master/conf.yaml) file in the elastic/docs repo. In the `conf.yml` file, the configuration information for all books are listed in this one file. Here's the example of what it looks like to configure a single book: | ||
|
||
```yaml | ||
- title: Machine Learning | ||
prefix: en/machine-learning | ||
current: *stackcurrent | ||
index: docs/en/stack/ml/index.asciidoc | ||
branches: [ {main: master}, 8.9, 8.8, 8.7, 8.6, 8.5, 8.4, 8.3, 8.2, 8.1, 8.0, 7.17, 7.16, 7.15, 7.14, 7.13, 7.12, 7.11, 7.10, 7.9, 7.8, 7.7, 7.6, 7.5, 7.4, 7.3, 7.2, 7.1, 7.0, 6.8, 6.7, 6.6, 6.5, 6.4, 6.3 ] | ||
live: *stacklive | ||
chunk: 1 | ||
tags: Elastic Stack/Machine Learning | ||
subject: Machine Learning | ||
sources: | ||
- | ||
repo: stack-docs | ||
path: docs/en/stack | ||
- | ||
repo: elasticsearch | ||
path: docs | ||
- | ||
repo: docs | ||
path: shared/versions/stack/{version}.asciidoc | ||
- | ||
repo: docs | ||
path: shared/attributes.asciidoc | ||
- | ||
repo: docs | ||
path: shared/settings.asciidoc | ||
``` | ||
|
||
## V3 configuration | ||
|
||
TO DO |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,24 @@ | ||
--- | ||
title: Site configuration | ||
navigation_title: Site | ||
--- | ||
|
||
Start by understanding how the new V3 system works at the site level compared to how our custom AsciiDoctor system works. The system consists of: | ||
|
||
|
||
| System property | Asciidoc | V3 | | ||
| -------------------- | -------------------- | -------------------- | | ||
| **Content sources** --> Collections of markup files containing doc content. These are split up across many docs repos. | _Books_ | _Content sets_ | | ||
| **Content configuration** --> A way to specify where to find those content sources, and in what order they should be added to the site. | Configuration file ([`conf.yml`](https://github.com/elastic/docs/blob/master/conf.yaml) in elastic/docs) | Config file location TBD | | ||
| **Cross-site values** --> Key-value pairs that should be substituted across all sources as web pages are built. | Shared attributes ([`shared/`](https://github.com/elastic/docs/tree/master/shared) in elastic/docs) | Shared attrs file TBD | | ||
| **Docs build tool** --> An engine used to take the markup in the content sources and transform it into web pages. | Customized version of AsciiDoctor (lives in [**elastic/docs**](https://github.com/elastic/docs)) | Customized doc builder using open source tools (lives in [**elastic/docs-builder**](https://github.com/elastic/docs-builder)) | | ||
|
||
Where these pieces live and what format they are in varies between the two systems, but they generally achieve the same goal. | ||
|
||
## Asciidoc | ||
|
||
 | ||
|
||
## V3 | ||
|
||
DIAGRAM NEEDED |
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,5 @@ | ||
--- | ||
title: Landing page | ||
--- | ||
|
||
tbd |
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,26 @@ | ||
--- | ||
title: Redirects | ||
--- | ||
|
||
## From an elastic.co/guide page | ||
|
||
The web team owns redirects for `elastic.co`. Writers do not have direct access to the system where www.elastic.co redirects are managed. | ||
|
||
### Permanent redirect | ||
|
||
Currently the only way to implement true redirects from a page on `elastic.co/guide` is to open an issue with the web team, add your request to a Google Sheet, and wait for the web team to address your request. | ||
|
||
### Stopgap | ||
|
||
Writers have developed a stopgap to communicate to users that content has been removed or moved to another location. We create a page at the existing URL that links to the new location of the information. This is better than removing a page without redirecting at all, but is not the best user experience and doesn't align with SEO best practices. | ||
|
||
## From an elastic.co/docs page | ||
|
||
STRATEGY TBD | ||
|
||
## Migration redirects | ||
|
||
Docs inventory script: https://github.com/elastic/docs-helpers/tree/main/docs-inventory | ||
Docs inventory sheet: https://docs.google.com/spreadsheets/d/1LfPI3TZqdpONGxOmL8B8V-Feo1flLwObz9_ibCEMkIQ/edit?gid=605983744#gid=605983744 | ||
|
||
This sheet will be used to request redirects after migration from 8.current to 9.current. |
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,29 @@ | ||
--- | ||
title: Shared attributes | ||
--- | ||
|
||
To promote consistency across documentation, AsciiDoc uses shared attributes for common terms, URLs, and versions. | ||
|
||
In the AsciiDoctor-based system, shared attributes live in the [`shared/` directory](https://github.com/elastic/docs/blob/master/shared) in the elastic/docs repo. The most used files in this directory are: | ||
|
||
The [`attributes.asciidoc` file](https://github.com/elastic/docs/blob/master/shared/attributes.asciidoc), which contains URLs, common words and phrases, and more. | ||
The files in the [`versions/stack` directory](https://github.com/elastic/docs/tree/master/shared/versions/stack), which contain the latest versions for various products for a given Stack version. | ||
|
||
## Versions | ||
|
||
### Asciidoc | ||
|
||
File: [`shared/versions/stack/8.8.asciidoc`](https://github.com/elastic/docs/blob/master/shared/versions/stack/8.8.asciidoc) in the elastic/docs repo | ||
|
||
### V3 | ||
|
||
See [Product availability](../../syntax/applies.md). | ||
|
||
|
||
## URLS | ||
|
||
File: [`shared/attributes.asciidoc`](https://github.com/elastic/docs/blob/master/shared/attributes.asciidoc) in the elastic/docs repo | ||
|
||
## Common terms | ||
|
||
File: [`shared/attributes.asciidoc`](https://github.com/elastic/docs/blob/master/shared/attributes.asciidoc) in the elastic/docs repo |
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,11 @@ | ||
--- | ||
title: Update the docs locally | ||
--- | ||
|
||
1. Install dependencies | ||
2. Clone repositories | ||
3. Make changes | ||
4. Open a Pull Request | ||
5. Work with CI | ||
6. Get approvals and merge | ||
7. View your changes live on elastic.co |
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,3 @@ | ||
--- | ||
title: Update the docs in your web browser | ||
--- |
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,10 @@ | ||
--- | ||
title: Elastic Docs contribution guide | ||
navigation_title: Contribution guide | ||
--- | ||
|
||
Want to contribute to the Elastic documentation? You're in the right spot! Select an option below to get started: | ||
|
||
* I just want to suggest a change --> [Open a docs issue](https://github.com/elastic/docs-content/issues/new?template=internal-request.yaml) | ||
* I want to make a small change to a single page --> [Update the docs in your _web browser_](change-browser.md). | ||
* I want to make a larger change or a change to multiple pages --> [Update the docs in your _code editor_](change-local.md). |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ Options: | |
Commands: | ||
generate Converts a source markdown folder or file to an output folder | ||
serve Continuously serve a documentation folder at http://localhost:5000. | ||
File systems changes will be reflected without having to restart the server. | ||
File systems changes will be reflected without having to restart the server. | ||
``` | ||
|
||
In the near term native code will be published by CI for the following platforms | ||
|
@@ -44,7 +44,8 @@ And we'll invest time in making sure these are easily obtainable (`brew`, `winge | |
For now you can run the tool locally through `docker run` | ||
|
||
```bash | ||
docker run -v "./.git:/app/.git" -v "./docs:/app/docs" -v "./.artifacts:/app/.artifacts" ghcr.io/elastic/docs-builder:edge | ||
docker run -v "./.git:/app/.git" -v "./docs:/app/docs" -v "./.artifacts:/app/.artifacts" \ | ||
ghcr.io/elastic/docs-builder:edge | ||
``` | ||
|
||
This ensures `.git`/`docs` and `.artifacts` (the default output directory) are mounted. | ||
|
@@ -54,15 +55,17 @@ Only the changed files on subsequent runs will be compiled unless you pass `--fo | |
to force a new compilation. | ||
|
||
```bash | ||
docker run -v "./.git:/app/.git" -v "./docs:/app/docs" -v "./.artifacts:/app/.artifacts" ghcr.io/elastic/docs-builder:edge --force | ||
docker run -v "./.git:/app/.git" -v "./docs:/app/docs" -v "./.artifacts:/app/.artifacts" \ | ||
ghcr.io/elastic/docs-builder:edge --force | ||
``` | ||
|
||
#### Live mode | ||
|
||
Through the `serve` command you can continuously and partially compile your documentation. | ||
|
||
```bash | ||
docker run -v "./.git:/app/.git" -v "./docs:/app/docs" -v "./.artifacts:/app/.artifacts" --expose 8080 ghcr.io/elastic/docs-builder:edge serve | ||
docker run -v "./.git:/app/.git" -v "./docs:/app/docs" -v "./.artifacts:/app/.artifacts" \ | ||
-p 8080:8080 ghcr.io/elastic/docs-builder:edge serve | ||
``` | ||
|
||
Each page is compiled on demand as you browse http://localhost:8080 and is never cached so changes to files and | ||
|
@@ -130,18 +133,20 @@ https://github.com/elastic/{your-repository}/settings/pages | |
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are two differences between this file and the readme:
|
||
## Run without docker | ||
|
||
If you have dotnet 8 installed you can use its CLI to publish a self-contained `docs-builder` native code | ||
You can use the .NET CLI to publish a self-contained `docs-builder` native code | ||
binary. (On my M2 Pro mac the binary is currently 16mb) | ||
|
||
Install [.NET 9.0](https://dotnet.microsoft.com/en-us/download/dotnet/9.0), then run: | ||
|
||
```bash | ||
$ dotnet publish "src/docs-builder/docs-builder.csproj" | ||
dotnet publish "src/docs-builder/docs-builder.csproj" | ||
``` | ||
|
||
The resulting binary `./.artifacts/publish/docs-builder/release/docs-builder` will run on machines without .NET installed | ||
The resulting binary `./.artifacts/publish/docs-builder/release/docs-builder` will run on machines without .NET installed. | ||
|
||
# Performance | ||
|
||
To test performance it's best to build the binary and run outside of docker: | ||
|
||
For refence here's the `markitpy-doc` docset (50k markdown files) currently takes `14s` vs `several minutes` compared to | ||
For reference here's the `markitpy-doc` docset (50k markdown files) currently takes `14s` vs `several minutes` compared to | ||
existing surveyed tools |
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.
Uh oh!
There was an error while loading. Please reload this page.