• Stars
    star
    114
  • Rank 308,031 (Top 7 %)
  • Language
    JavaScript
  • Created about 14 years ago
  • Updated 23 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Docs for RavenDB

RavenDB documentation

This repository contains documentation for RavenDB.

Found a bug?

Please create an issue at our YouTrack.

Need help?

If you have any questions please visit our community group.

Language-specific docs inheritance between documentation versions

Rules

  1. If a documentation directory for a specific version does not contain any markdown file related to a documentation page, then all the documentation pages are inherited from the previous documentation version.
  2. If a documentation directory contains any markdown file for a documentation page (for example - dotnet only), then the parser assumes that the current version has an entirely new set of documents. No document from the previous version is inherited.

This behavior ensures us that we don't show obsolete inherited documents for a documentation version. There is a reason why a new language-specific documentation page was introduced for a doc version (for example, the API was changed). This means that all other languages should be also treated as different from the previous version.

Example

In the case of client-api/data-subscriptions/creation/examples, we have these files in the directories:

  • v4.0: dotnet, java, js
  • v4.1: dotnet, java
  • v4.2: dotnet
  • v5.0: no documents

So for v4.1 the parser assumes that the v4.1 version should support dotnet and java. No document from v4.0 is inherited.

The v5.0 directory does not contain any related document, so the documents are inherited from the previous version. v4.2 contains only dotnet document, so v5.0 will support dotnet only.

Fixing missing language page

In order to fix the missing language page, the related markdown file should be copied from the previous version. The pasted file should be analyzed to indicate what needs to be updated for the current documentation version.

Adding new documentation version

  1. Add Documentation/[[version]]/Raven.Documentation.Pages/Raven.Documentation.Pages.csproj project. Make sure that it references the correct RavenDB nuget packages versions.
  2. Add Documentation/[[version]]/Samples/csharp/Raven.Documentation.Samples/Raven.Documentation.Samples.csproj project, similarly as above.
  3. Add version to the AllVersions list in Raven.Documentation.Web.Core.ViewModels.DocsVersion.
  4. Run scripts/populateDocsJson.ps1 in order to populate the correct directory structure and .docs.json files in the newly added Raven.Documentation.Pages project. Please check the script parameters for details.
  5. Add version to the RouteConfig.RouteAvailableVersions constant.

Changing document location between versions

For example, let's say in v4.1 there is a document introduced in the path a/b. It is present in this location also for v4.2. But in v5.0, it was moved to c/d.

Mappings

First, you need to tell each version how to reach the new location for a moved document. This is done by adding document mappings.

In the example described above, you need to add the following mappings:

  • in v4.1:
"Mappings": [
    {
        "Version": 5.0,
        "Key": "c/d"
    }
]
  • in v4.2:
"Mappings": [
    {
        "Version": 5.0,
        "Key": "c/d"
    }
]
  • in v5.0:
"Mappings": [
    {
        "Version": 4.1,
        "Key": "a/b"
    },
    {
        "Version": 4.2,
        "Key": "a/b"
    }
]

Basically, both v4.1 and v4.2 need to know where to go to when v5.0 is selected from the version dropdown. The same goes for v5.0 when you want to reach v4.1 or v4.2.

Last supported version

The document bubbling algorithm assumes that each document will be present in the version it was introduced in and in all the consecutive versions. You can explicitly define the last supported version of an article in the given location to stop this behavior.

For this particular example, the article introduced in v4.1 in location a/b will be present in this location for v4.2, v5.0 etc. Assuming that the article was added to a new location in v5.0, you will end up with two articles: 5.0/a/b and 5.0/c/d. This will ignore the defined mappings.

In order to fix this, you need to tell the algorithm that the last supported version for location a/b is v4.2. You do this by adding the following entries to the related .docs.json file entries:

"LastSupportedVersion": "4.2"

This will tell the algorithm that it shouldn't generate the documentation page for v5.0 and all consecutive versions.

Important: you need to add the LastSupportedVersion entry to .docs.json for each version where a related documentation markdown file exists.

The algorithm skips the LastSupportedVersion analysis for the entries that don't have the markdown file present in the folder. If there are multiple markdown files for different versions, the algorithm will merge their supported versions. If there is no LastSupportedVersion entry for a given document page version, the algorithm will assume that all the consecutive versions are supported.

For example, let's assume that there are documentation files in both 4.1/a/b.markdown and 4.2/a/b.markdown locations. This means that you need to add the "LastSupportedVersion": "4.2" entries for both v4.1 and v4.2 .docs.json files. If you forget to do this for v4.2, the algorithm will assume that there is no supported version cap (for v4.2) and will generate the documentation pages for all consecutive versions.

More Repositories

1

ravendb

ACID Document Database
C#
3,576
star
2

book

RavenDB Book
C#
151
star
3

bootcamp

C#
107
star
4

samples-yabt

"Yet Another Bug Tracker" solution sample for RavenDB and .NET with Angular UI
C#
107
star
5

ravendb-nodejs-client

RavenDB node.js client
TypeScript
63
star
6

ravenmq

Distributed Queuing System
C#
46
star
7

ravendb-go-client

Go
39
star
8

ravendb-python-client

This is the official python client for RavenDB document database
Python
35
star
9

ravendb.contrib

External Contributions to RavenDB
C#
30
star
10

quartznet-RavenDB

RavenDB JobStore support for Quartz.NET scheduler.
C#
27
star
11

awesome-ravendb

27
star
12

raven.munin

Transactional Managed Storage
C#
18
star
13

serilog-sinks-ravendb

A Serilog sink that writes events to RavenDB
C#
17
star
14

ravendb-jvm-client

RavenDB JVM Client
Java
13
star
15

IdentityServer4.Contrib.RavenDB

C#
9
star
16

ravendb-grafana-datasource

TypeScript
7
star
17

Raven.Json

Optimized DOM using Newtonsoft.Json library
C#
7
star
18

terraform-provider-ravendb

Go
6
star
19

ravendb-php-client

PHP
6
star
20

helm-charts

An official Helm chart for RavenDB.
Shell
6
star
21

ravendb-cpp-client

RavenDB C++ Client
C++
4
star
22

demo

C#
4
star
23

ravendb-ruby-client

Ruby
4
star
24

raven.codeanalysis

C#
3
star
25

silverlight

RavenDB's Silverlight Client
C#
3
star
26

samples-hugin

SCSS
3
star
27

ravendb-jvm-testdriver

Java
2
star
28

ravendb-jvm-embedded

Java
2
star
29

template-cloudflare-worker

A batteries included template for kick starting a TypeScript Cloudflare worker project that connects with a RavenDB Cloud database backend.
TypeScript
2
star
30

templates

Templates and starters for RavenDB
HTML
1
star
31

samples-crypto-app

C#
1
star
32

kr-benchmark-scripts

Scripts & Code to reproduce database benchmark with large dataset
C#
1
star
33

samples-jvm

Java
1
star
34

ravendb-python-embedded

Python
1
star
35

ravendb-python-testdriver

Python
1
star