Skip to content

Commit

Permalink
Merge pull request #519 from codenotary/doc/v1.9.3-rc1
Browse files Browse the repository at this point in the history
Add doc section for v1.9.3
  • Loading branch information
ostafen authored May 22, 2024
2 parents 4d77a5d + 64686be commit 4a9ebd6
Show file tree
Hide file tree
Showing 56 changed files with 9,972 additions and 24 deletions.
37 changes: 19 additions & 18 deletions src/.vuepress/theme/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@ export const extRE = /\.(md|html)$/
export const endingSlashRE = /\/$/
export const outboundRE = /^[a-z]+:/i

export function normalize (path) {
export function normalize(path) {
return decodeURI(path)
.replace(hashRE, '')
.replace(extRE, '')
}

export function getHash (path) {
export function getHash(path) {
const match = path.match(hashRE)
if (match) {
return match[0]
}
}

export function isExternal (path) {
export function isExternal(path) {
return outboundRE.test(path)
}

export function isMailto (path) {
export function isMailto(path) {
return /^mailto:/.test(path)
}

export function isTel (path) {
export function isTel(path) {
return /^tel:/.test(path)
}

export function ensureExt (path) {
export function ensureExt(path) {
if (isExternal(path)) {
return path
}
Expand All @@ -42,7 +42,7 @@ export function ensureExt (path) {
return normalized + '.html' + hash
}

export function isActive (route, path) {
export function isActive(route, path) {
const routeHash = decodeURIComponent(route.hash)
const linkHash = getHash(path)
if (linkHash && routeHash !== linkHash) {
Expand All @@ -53,7 +53,7 @@ export function isActive (route, path) {
return routePath === pagePath
}

export function resolvePage (pages, rawPath, base) {
export function resolvePage(pages, rawPath, base) {
if (isExternal(rawPath)) {
return {
type: 'external',
Expand All @@ -76,7 +76,7 @@ export function resolvePage (pages, rawPath, base) {
return {}
}

function resolvePath (relative, base, append) {
function resolvePath(relative, base, append) {
const firstChar = relative.charAt(0)
if (firstChar === '/') {
return relative
Expand Down Expand Up @@ -121,7 +121,7 @@ function resolvePath (relative, base, append) {
* @param { string } localePath
* @returns { SidebarGroup }
*/
export function resolveSidebarItems (page, regularPath, site, localePath) {
export function resolveSidebarItems(page, regularPath, site, localePath) {
const { pages, themeConfig } = site

const localeConfig = localePath && themeConfig.locales
Expand All @@ -148,7 +148,7 @@ export function resolveSidebarItems (page, regularPath, site, localePath) {
* @param { Page } page
* @returns { SidebarGroup }
*/
function resolveHeaders (page) {
function resolveHeaders(page) {
const headers = groupHeaders(page.headers || [])
return [{
type: 'group',
Expand All @@ -165,7 +165,7 @@ function resolveHeaders (page) {
}]
}

export function groupHeaders (headers) {
export function groupHeaders(headers) {
// group h3s under h2
headers = headers.map(h => Object.assign({}, h))
let lastH2
Expand All @@ -179,7 +179,7 @@ export function groupHeaders (headers) {
return headers.filter(h => h.level === 2)
}

export function resolveNavLinkItem (linkItem) {
export function resolveNavLinkItem(linkItem) {
return Object.assign(linkItem, {
type: linkItem.items && linkItem.items.length ? 'links' : 'link'
})
Expand All @@ -190,7 +190,7 @@ export function resolveNavLinkItem (linkItem) {
* @param { Array<string|string[]> | Array<SidebarGroup> | [link: string]: SidebarConfig } config
* @returns { base: string, config: SidebarConfig }
*/
export function resolveMatchingConfig (regularPath, config) {
export function resolveMatchingConfig(regularPath, config) {
if (Array.isArray(config)) {
return {
base: '/',
Expand All @@ -208,13 +208,13 @@ export function resolveMatchingConfig (regularPath, config) {
return {}
}

function ensureEndingSlash (path) {
function ensureEndingSlash(path) {
return /(\.html|\/)$/.test(path)
? path
: path + '/'
}

function resolveItem (item, pages, base, groupDepth = 1) {
function resolveItem(item, pages, base, groupDepth = 1) {
if (typeof item === 'string') {
return resolvePage(pages, item, base)
} else if (Array.isArray(item)) {
Expand Down Expand Up @@ -256,15 +256,16 @@ export const versions = [
'1.5.0',
'1.9DOM.0',
'1.9DOM.1',
'1.9.3',
'master'
]

export function getVersionFromRoute (route = { fullPath: '' }) {
export function getVersionFromRoute(route = { fullPath: '' }) {
const matches = route.fullPath.match(/[^\/]+/)
const [version] = matches === null || !versions.includes(matches[0]) ? [] : matches
return version
}

export function getDefaultVersion () {
export function getDefaultVersion() {
return versions[versions.length - 1];
}
26 changes: 26 additions & 0 deletions src/1.9.3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Welcome

<WrappedSection>

<img align="right" src="/logos/immudb-mascot.svg" width="256px"/>

Welcome to the immudb documentation. Great to see you here!

immudb is a database written in Go, but unlike other databases, it is immutable: history is preserved and can't be changed without clients noticing.

immudb can operate as a key-value, relational (SQL) or document database, making it a truly no-SQL database.

immudb can be run as full database server with replicas or easily embedded as a lightweight database into application.

</WrappedSection>

<WrappedSection>

### Help and Support
Join our [Discord community](https://discord.gg/ThSJxNEHhZ)

<CnSocialButton social="discord" href="https://discord.gg/ThSJxNEHhZ" target="_blank" rel="external" bottom-offset="15"></CnSocialbutton>

<CnSocialButton social="twitter" target="_blank" rel="external" href="https://twitter.com/intent/tweet?text=immudb:%20lightweight,%20high-speed%20immutable%20database!&url=https://github.com/codenotary/immudb"></CnSocialButton>

</WrappedSection>
Loading

0 comments on commit 4a9ebd6

Please sign in to comment.