Skip to content

Commit 76a556c

Browse files
committed
refactor: migrate to docus
1 parent 6c312f6 commit 76a556c

File tree

330 files changed

+13886
-37389
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

330 files changed

+13886
-37389
lines changed

.env.example

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
2-
# Create one with no scope selected on https://github.com/settings/tokens/new
3-
GITHUB_TOKEN=
1+
# Algolia API key and application ID
2+
ALGOLIA_SEARCH_API_KEY=""
3+
ALGOLIA_APPLICATION_ID=""
4+
ALGOLIA_INDEX_NAME=""

.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist
2+
node_modules
3+
.output
4+
.nuxt

.eslintrc.cjs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
root: true,
3+
extends: "@nuxt/eslint-config",
4+
rules: {
5+
"vue/max-attributes-per-line": "off",
6+
"vue/multi-word-component-names": "off",
7+
semi: ["error", "never"],
8+
},
9+
}

.gitignore

100644100755
+10-104
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,12 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
lerna-debug.log*
8-
9-
# Diagnostic reports (https://nodejs.org/api/report.html)
10-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11-
12-
# Runtime data
13-
pids
14-
*.pid
15-
*.seed
16-
*.pid.lock
17-
18-
# Directory for instrumented libs generated by jscoverage/JSCover
19-
lib-cov
20-
21-
# Coverage directory used by tools like istanbul
22-
coverage
23-
*.lcov
24-
25-
# nyc test coverage
26-
.nyc_output
27-
28-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29-
.grunt
30-
31-
# Bower dependency directory (https://bower.io/)
32-
bower_components
33-
34-
# node-waf configuration
35-
.lock-wscript
36-
37-
# Compiled binary addons (https://nodejs.org/api/addons.html)
38-
build/Release
39-
40-
# Dependency directories
41-
node_modules/
42-
jspm_packages/
43-
44-
# TypeScript v1 declaration files
45-
typings/
46-
47-
# TypeScript cache
48-
*.tsbuildinfo
49-
50-
# Optional npm cache directory
51-
.npm
52-
53-
# Optional eslint cache
54-
.eslintcache
55-
56-
# Microbundle cache
57-
.rpt2_cache/
58-
.rts2_cache_cjs/
59-
.rts2_cache_es/
60-
.rts2_cache_umd/
61-
62-
# Optional REPL history
63-
.node_repl_history
64-
65-
# Output of 'npm pack'
66-
*.tgz
67-
68-
# Yarn Integrity file
69-
.yarn-integrity
70-
71-
# dotenv environment variables file
72-
.env
73-
.env.test
74-
75-
# parcel-bundler cache (https://parceljs.org/)
76-
.cache
77-
78-
# Next.js build output
79-
.next
80-
81-
# Nuxt.js build / generate output
1+
node_modules
2+
*.iml
3+
.idea
4+
*.log*
825
.nuxt
6+
.vscode
7+
.DS_Store
8+
coverage
839
dist
84-
85-
# Gatsby files
86-
.cache/
87-
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88-
# https://nextjs.org/blog/next-9-1#public-directory-support
89-
# public
90-
91-
# vuepress build output
92-
.vuepress/dist
93-
94-
# Serverless directories
95-
.serverless/
96-
97-
# FuseBox cache
98-
.fusebox/
99-
100-
# DynamoDB Local files
101-
.dynamodb/
102-
103-
# TernJS port file
104-
.tern-port
105-
106-
.DS_Store
10+
sw.*
11+
.env
12+
.output

.npmrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
shamefully-hoist=true
2+
strict-peer-dependencies=false

LICENSE

-21
This file was deleted.

README.md

100644100755
+35-51
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,57 @@
1-
![Banner](/static/banner.png)
1+
# Docus Starter
22

3-
# Docs
3+
Starter template for [Docus](https://docus.dev).
44

5-
[Hoppscotch](https://www.hoppscotch.io)
5+
## Clone
66

7-
[Documentation](https://docs.hoppscotch.io)
7+
Clone the repository (using `nuxi`):
8+
9+
```bash
10+
npx nuxi init -t themes/docus
11+
```
812

913
## Setup
1014

1115
Install dependencies:
1216

1317
```bash
14-
npm run install
18+
yarn install
1519
```
1620

1721
## Development
1822

1923
```bash
20-
npm run dev
24+
yarn dev
25+
```
26+
27+
## Edge Side Rendering
28+
29+
Can be deployed to Vercel Functions, Netlify Functions, AWS, and most Node-compatible environments.
30+
31+
Look at all the available presets [here](https://v3.nuxtjs.org/guide/deploy/presets).
32+
33+
```bash
34+
yarn build
2135
```
2236

2337
## Static Generation
2438

25-
This will create the `dist/` directory for publishing to static hosting:
39+
Use the `generate` command to build your application.
40+
41+
The HTML files will be generated in the .output/public directory and ready to be deployed to any static compatible hosting.
42+
43+
```bash
44+
yarn generate
45+
```
46+
47+
## Preview build
48+
49+
You might want to preview the result of your build locally, to do so, run the following command:
2650

2751
```bash
28-
npm run generate
52+
yarn preview
2953
```
3054

31-
To preview the static generated app, run `npm run start`
32-
33-
## Contributors Guide
34-
35-
We are looking for translators to help us with translations of Docs. [docs.hoppscotch](https://docs.hoppscotch.io) is built with nuxt-content.
36-
For detailed explanation on how things work, checkout [nuxt/content](https://content.nuxtjs.org) and [@nuxt/content theme docs](https://content.nuxtjs.org/v1/examples/docs-theme).
37-
38-
### Steps
39-
40-
1. Follow the Setup Guide
41-
2. To add your language to the dropdown menu, go to `nuxt.config.js`, add code,iso,file and name of the language.
42-
43-
```bash
44-
{
45-
code: 'fr',
46-
iso: 'fr-FR',
47-
file: 'fr-FR.js',
48-
name: 'Français'
49-
}
50-
```
51-
52-
3. To add translated content, navigate to `\content`, add a folder with language code as the name and add `.md` files.
53-
```bash
54-
content
55-
|
56-
|- en
57-
| |- article.md
58-
|- fr
59-
|-article.md <----translated
60-
```
61-
4. Make sure that the file names for translated content are the same as that of the english document.
62-
5. Add screenshots to `\static\Resources\<your lang>\` or re-use screenshots of the english version.
63-
64-
[nuxt-shield]: https://img.shields.io/badge/nuxt.js-00C58E?style=flat-sqaure&logo=nuxtdotjs&logoColor=white
65-
[tailwind-shield]: https://img.shields.io/badge/Tailwind_CSS-38B2AC?style=flat-square&logo=tailwind-css&logoColor=white
66-
[forks-shield]: https://img.shields.io/github/forks/hoppscotch/docs?style=flat-square
67-
[forks-url]: https://github.com/hoppscotch/docs/network/members
68-
[stars-shield]: https://img.shields.io/github/stars/hoppscotch/docs?style=flat-square
69-
[stars-url]: https://github.com/hoppscotch/docs/stargazers
70-
[issues-shield]: https://img.shields.io/github/issues/hoppscotch/docs?style=flat-square
71-
[issues-url]: https://github.com/hoppscotch/docs/issues
72-
[license-shield]: https://img.shields.io/github/license/hoppscotch/docs?style=flat-square
73-
[license-url]: https://github.com/hoppscotch/docs/blob/main/LICENSE
55+
---
56+
57+
For a detailed explanation of how things work, check out [Docus](https://docus.dev).

app.config.ts

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
export default defineAppConfig({
2+
docus: {
3+
title: "Hoppscotch Documentation",
4+
titleTemplate: "%s • Hoppscotch Documentation",
5+
description: "Open source API development ecosystem",
6+
url: "https://docs.hoppscotch.io",
7+
image: "https://docs.hoppscotch.io/banner.png",
8+
socials: {
9+
twitter: "hoppscotch_io",
10+
github: "hoppscotch/hoppscotch",
11+
},
12+
header: {
13+
logo: true,
14+
},
15+
footer: {
16+
credits: {
17+
text: "© Hoppscotch",
18+
icon: "",
19+
href: "https://hoppscotch.io",
20+
},
21+
},
22+
aside: {
23+
level: 1,
24+
exclude: ["/documentation/self-host", "/guides/videos"], // exclude self-host page from sidebar. TODO: remove this when we launch self-host.
25+
},
26+
github: {
27+
repo: "docs",
28+
branch: "main",
29+
edit: true,
30+
owner: "hoppscotch",
31+
dir: "content",
32+
},
33+
},
34+
})
+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<script setup>
2+
defineProps({
3+
to: {
4+
type: String,
5+
default: "",
6+
},
7+
label: {
8+
type: String,
9+
default: "",
10+
},
11+
})
12+
</script>
13+
14+
<template>
15+
<NuxtLink :to="to" class="link">
16+
<Icon name="lucide:megaphone" class="icon" />
17+
<span>{{ label }}</span>
18+
</NuxtLink>
19+
</template>
20+
21+
<style scoped lang="ts">
22+
css({
23+
'.link': {
24+
color: '{color.primary.900}',
25+
backgroundColor: '{color.primary.100}',
26+
borderColor: '{color.primary.400}',
27+
borderRadius: '{radii.md}',
28+
borderWidth: '{borderWidth.sm}',
29+
borderStyle: 'solid',
30+
display: 'inline-flex',
31+
padding: '{space.2} {space.4}',
32+
marginBottom: '{space.4}',
33+
alignItems: 'center',
34+
justifyContent: 'center',
35+
gap: '{space.1}',
36+
37+
'@dark': {
38+
color: '{color.primary.100}',
39+
backgroundColor: 'transparent',
40+
borderColor: '{color.primary.700}'
41+
},
42+
43+
'&:hover': {
44+
backgroundColor: '{color.primary.200}',
45+
'@dark': {
46+
backgroundColor: '{color.primary.900}'
47+
},
48+
}
49+
},
50+
'.link span': {
51+
// font-medium text-sm
52+
fontWeight: '{fontWeight.medium}',
53+
fontSize: '{fontSize.sm}'
54+
},
55+
'.link .icon': {
56+
width: '{space.4}',
57+
height: '{space.4}',
58+
marginRight: '{space.2}'
59+
}
60+
})
61+
</style>

0 commit comments

Comments
 (0)