Skip to content

Commit

Permalink
Merge branch 'master' into pensu-feature-descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbosco committed Apr 8, 2021
2 parents 708fd3c + be0560b commit b80ef02
Show file tree
Hide file tree
Showing 119 changed files with 2,282 additions and 1,001 deletions.
14 changes: 13 additions & 1 deletion docs-site/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ As you write content in the content folder, the page should live reload.

Be sure to add new pages to the side bar in `content/.vuepress/config.js` as needed.

### Adding images

Place images in [content/.vuepress/public/images](content/.vuepress/public/images). Prefer using SVGs.

Reference images in markdown files like this:

```
![Typesense DynamoDB Integration Chart](~@images/typesense-dynamodb.svg)
```

where `typesense-dynamodb.svg` is located at `./content/.vuepress/public/images/typesense-dynamodb.svg`

### Template Variables

These variables can be used in markdown files as `{{ variableName }}` or in Vue components.
Expand All @@ -29,7 +41,7 @@ These variables can be used in markdown files as `{{ variableName }}` or in Vue
**Note:** These variables [don't work](https://github.com/vuejs/vuepress/issues/2379) in auto-generated anchor tags and page titles.
To partially fix the issue with page titles, we have a workaround in `plugins/typesense-enhancements` to manually look for `{{ $page.typesenseVersion }}` in page titles and replace them.

## To write documentation for a new version:
### Authoring a new version

1. Add version number to `../typesenseVersions.js`
1. Clone the latest version directory and make edits to it.
Expand Down
4 changes: 2 additions & 2 deletions docs-site/content/.vuepress/components/DocsSections.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<div class="docs-sections">
<DocsSectionButton section-link="#what-s-new" section-name="What's New" />
<DocsSectionButton :section-link="`/${$page.typesenseVersion}/guide`" section-name="Guide" />
<DocsSectionButton :section-link="`/${$page.typesenseVersion}/api`" section-name="API Reference" />
<DocsSectionButton :section-link="`/${$page.typesenseVersion}/guide/`" section-name="Guide" />
<DocsSectionButton :section-link="`/${$page.typesenseVersion}/api/`" section-name="API Reference" />
</div>
</template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {
},
{
from: `/${this.$page.typesenseVersion}/guide/#start-typesense`,
to: `/${this.$page.typesenseVersion}/guide/install-typesense.html#starting-the-typesense-server`,
to: `/${this.$page.typesenseVersion}/guide/install-typesense.html#🎬-start`,
},
{
from: `/${this.$page.typesenseVersion}/guide/#configure-typesense`,
Expand Down
22 changes: 13 additions & 9 deletions docs-site/content/.vuepress/components/Tabs.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<template>
<div class="mb-3">
<ul class="nav-container flex">
<li v-for="tab in tabs" :key="tab" class="nav" :class="{ active: tab === activeTab }" @click="setActiveTab(tab)">
<span class="nav-title">{{ tab }}</span>
</li>
</ul>
<div class="content-container">
<div v-for="tab in tabs" v-show="tab === activeTab" :key="tab" class="tab-content">
<slot :name="tab" />
<ClientOnly>
<ul class="nav-container flex">
<li v-for="tab in tabs" :key="tab" class="nav" :class="{ active: tab === activeTab }" @click="setActiveTab(tab)">
<span class="nav-title">{{ tab }}</span>
</li>
</ul>
<div class="content-container">
<div v-for="tab in tabs" v-show="tab === activeTab" :key="tab" class="tab-content">
<slot :name="tab" />
</div>
</div>
</div>
</ClientOnly>
</div>
</template>

Expand Down Expand Up @@ -97,6 +99,8 @@ export default {
pre[class^=language-]
margin 0
border-top-left-radius 0
border-top-right-radius 0
// Remove the duplicate language display
div[class*="language-"]::before
Expand Down
8 changes: 5 additions & 3 deletions docs-site/content/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ let config = {
},
// Versioned nav links are dynamically populated by .vuepress/plugins/typesense-enhancements.js
// Add any non-versioned pages below
nav: [{ text: 'Help', link: '/help/' }],
nav: [{ text: 'Help', link: '/help' }],
repo: 'typesense/typesense',
smoothScroll: true,
markdown: {
Expand All @@ -88,11 +88,12 @@ let config = {
// if your docs are in a different repo from your main project:
docsRepo: 'typesense/typesense-website',
// if your docs are not at the root of the repo:
docsDir: 'new-site/docs-site/content',
docsDir: 'docs-site/content',
// if your docs are in a specific branch (defaults to 'master'):
editLinks: true,
// custom text for edit link. Defaults to "Edit this page"
editLinkText: 'Edit page',
sidebarDepth: 2,
sidebar: {
'/overview': [
['/', 'Docs Home'],
Expand Down Expand Up @@ -128,6 +129,7 @@ let config = {
['/0.19.0/guide/search-ui-components', 'Search UI Components'],
['/0.19.0/guide/firebase-full-text-search', 'Firebase Full Text Search'],
['/0.19.0/guide/dynamodb-full-text-search', 'AWS DyanamoDB Full Text Search'],
['/0.19.0/guide/mongodb-full-text-search', 'MongoDB Full Text Search'],
],
},
{
Expand Down Expand Up @@ -694,7 +696,7 @@ let config = {
configureWebpack: {
resolve: {
alias: {
'@guide-images': '../../.vuepress/public/images'
'@images': '../../.vuepress/public/images'
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs-site/content/.vuepress/enhanceApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default ({
anonymize_ip: true, // anonymize IP
send_page_view: false, // might be necessary to avoid duplicated page track on page reload
linker: {
domains: ['new-site.typesense.org', 'typesense.org', 'cloud.typesense.org'],
domains: ['typesense.org', 'cloud.typesense.org'],
},
},
},
Expand Down
Loading

0 comments on commit b80ef02

Please sign in to comment.