Skip to content

Commit

Permalink
docs: add initial documentation (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Jan 8, 2023
1 parent 1125bd1 commit e621c93
Show file tree
Hide file tree
Showing 30 changed files with 2,677 additions and 765 deletions.
3 changes: 3 additions & 0 deletions docs/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Create one with no scope selected on https://github.com/settings/tokens/new
# This token is used for fetching the repository releases.
GITHUB_TOKEN=
12 changes: 12 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
node_modules
*.iml
.idea
*.log*
.nuxt
.vscode
.DS_Store
coverage
dist
sw.*
.env
.output
32 changes: 32 additions & 0 deletions docs/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
export default defineAppConfig({
docus: {
title: 'Elk',
description: 'A nimble Mastodon web client.',
image: 'https://docs.elk.zone/elk-screenshot.png',
socials: {
twitter: 'elk-zone',
github: 'elk-zone/elk',
},
aside: {
level: 0,
exclude: [],
},
header: {
logo: true,
showLinkIcon: true,
exclude: [],
},
footer: {
iconLinks: [
{
href: 'https://nuxt.com',
icon: 'IconNuxtLabs',
},
{
href: 'https://m.webtoo.ls/@elk',
icon: 'IconMastodon',
},
],
},
},
})
15 changes: 15 additions & 0 deletions docs/app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<template>
<AppLayout>
<NuxtPage />
</AppLayout>
</template>

<style>
@font-face {
font-display: swap;
font-family: 'DM Sans';
font-style: normal;
font-weight: 400;
src: url(/fonts/DM-sans-v11.ttf) format('truetype');
}
</style>
9 changes: 9 additions & 0 deletions docs/components/global/IconMastodon.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script>
export default {
name: 'IconMastodon',
}
</script>

<template>
<svg width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M21.258 13.99c-.274 1.41-2.456 2.955-4.962 3.254c-1.306.156-2.593.3-3.965.236c-2.243-.103-4.014-.535-4.014-.535c0 .218.014.426.04.62c.292 2.215 2.196 2.347 4 2.41c1.82.062 3.44-.45 3.44-.45l.076 1.646s-1.274.684-3.542.81c-1.25.068-2.803-.032-4.612-.51c-3.923-1.039-4.598-5.22-4.701-9.464c-.031-1.26-.012-2.447-.012-3.44c0-4.34 2.843-5.611 2.843-5.611c1.433-.658 3.892-.935 6.45-.956h.062c2.557.02 5.018.298 6.451.956c0 0 2.843 1.272 2.843 5.61c0 0 .036 3.201-.397 5.424zm-2.956-5.087c0-1.074-.273-1.927-.822-2.558c-.567-.631-1.308-.955-2.229-.955c-1.065 0-1.871.41-2.405 1.228l-.518.87l-.519-.87C11.276 5.8 10.47 5.39 9.405 5.39c-.921 0-1.663.324-2.229.955c-.549.631-.822 1.484-.822 2.558v5.253h2.081V9.057c0-1.075.452-1.62 1.357-1.62c1 0 1.501.647 1.501 1.927v2.79h2.07v-2.79c0-1.28.5-1.927 1.5-1.927c.905 0 1.358.545 1.358 1.62v5.1h2.08V8.902z" /></svg>
</template>
23 changes: 23 additions & 0 deletions docs/components/global/Logo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<template>
<div class="logo">
<img alt="Elk" src="/logo.svg">
Elk
</div>
</template>

<style lang="ts" scoped>
css({
'.logo': {
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
gap: '0.5rem',
fontSize: '1.5rem',
},
img: {
flexShrink: 0,
aspectRatio: '1/1',
height: '2.5rem'
}
})
</style>
36 changes: 36 additions & 0 deletions docs/content/0.index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: Elk
navigation: false
layout: page
---

::block-hero
---
cta:
- Read more
- /guide
secondary:
- Try it out →
- https://elk.zone
---

#title
Elk

#description
An in-progress, nimble Mastodon web client

#support
![Screenshot of Elk](/docs/screenshot.png)

#extra
::list
- markdown support
- code blocks
- reordering and connecting posts in timelines
- multi account
- GitHub HTML cards
- and more...
::

::
33 changes: 33 additions & 0 deletions docs/content/1.guide/1.index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Introduction

## What is Elk?

::alert{type=warning}
🚧 This section is a work in progress. 🚧
::

## What is Mastodon?
<!-- -> external links -->

::alert{type=warning}
🚧 This section is a work in progress. 🚧
::

## What is a Mastodon Client?

<!-- -> other examples -->

::alert{type=warning}
🚧 This section is a work in progress. 🚧
::

## Sponsors

We want to thank the generous sponsoring and help of:

[![NuxtLabs](/docs/images/nuxtlabs.svg)](https://nuxtlabs.com/)
[![StackBlitz](/docs/images/stackblitz.svg)](https://stackblitz.com/)

And all the companies and individuals sponsoring Elk Team members.

[Find out more about sponsoring Elk](/guide/sponsoring).
14 changes: 14 additions & 0 deletions docs/content/1.guide/2.features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Features

::alert{type=warning}
🚧 This section is a work in progress. 🚧
::

<!-- once the UI is more stable, we can add screenshots -->

<!-- - markdown support
- code blocks
- reordering and connecting posts in timelines
- multi account
- GitHub HTML cards
- and so on... -->
49 changes: 49 additions & 0 deletions docs/content/1.guide/3.contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Contributing

We're really excited that you're interested in contributing to Elk! Before submitting your contribution, please read through the following guide.

## Online

You can use [StackBlitz CodeFlow](https://stackblitz.com/codeflow) to fix bugs or implement features. You'll also see a CodeFlow button on PRs to review them without a local setup. Once the elk repo has been cloned in CodeFlow, the dev server will start automatically and print the URL to open the App. You should receive a prompt in the bottom-right suggesting to open it in the Editor or in another Tab. To learn more, check out the [CodeFlow docs](https://developer.stackblitz.com/codeflow/what-is-codeflow).

[![Open in Codeflow](https://developer.stackblitz.com/img/open_in_codeflow.svg)](https://pr.new/elk-zone/elk)

## Local Setup

Clone the repository and run on the root folder:

```bash
pnpm i
pnpm run dev
```

`Warning`: you will need `corepack` enabled, check out the [Elk Contributing Guide](./CONTRIBUTING.md) for a detailed guide on how to set up the project locally.

We recommend installing [ni](https://github.com/antfu/ni#ni), that will use the right package manager in each of your projects. If `ni` is installed, you can instead run:

```bash
ni
nr dev
```

## Testing

Elk uses [Vitest](https://vitest.dev). You can run the test suite with:

```bash
nr test
```

# Stack

- [Vite](https://vitejs.dev/) - Next Generation Frontend Tooling
- [Nuxt](https://nuxt.com/) - The Intuitive Web Framework
- [Vue](https://vuejs.org/) - The Progressive JavaScript Framework
- [VueUse](https://vueuse.org/) - Collection of Vue Composition Utilities
- [Pinia](https://pinia.vuejs.org/) - The Vue Store that you will enjoy using
- [Vue Macros](https://vue-macros.sxzz.moe/) - More macros and syntax sugar for Vue
- [UnoCSS](https://uno.antfu.me/) - The instant on-demand atomic CSS engine
- [Iconify](https://github.com/iconify/icon-sets#iconify-icon-sets-in-json-format) - Iconify icon sets in JSON format
- [Masto.js](https://neet.github.io/masto.js) - Mastodon API client in TypeScript
- [shiki](https://shiki.matsu.io/) - A beautiful Syntax Highlighter
- [vite-plugin-pwa](https://github.com/vite-pwa/vite-plugin-pwa) - Prompt for update and push notifications
10 changes: 10 additions & 0 deletions docs/content/1.guide/4.sponsoring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Sponsoring

If you're enjoying the app, consider sponsoring our team:

- [Anthony Fu](https://github.com/sponsors/antfu)
- [Daniel Roe](https://github.com/sponsors/danielroe)
- [三咲智子 Kevin Deng](https://github.com/sponsors/sxzz)
- [Patak](https://github.com/sponsors/patak-dev)

We would also appreciate sponsoring other contributors to the Elk project. If someone helps you solve an issue or implement a feature you wanted, supporting them would help make this project and OS more sustainable.
10 changes: 10 additions & 0 deletions docs/netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[build]
publish = "dist"
command = "pnpm generate"

# Allow previewing docs
[[redirects]]
from = "/docs/*"
to = "/:splat"
status = 200
force = true
6 changes: 6 additions & 0 deletions docs/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default defineNuxtConfig({
app: {
baseURL: '/docs',
},
extends: '@nuxt-themes/docus',
})
15 changes: 15 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "elk-docs",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "nuxi dev",
"build": "nuxi build",
"generate": "nuxi generate",
"preview": "nuxi preview"
},
"devDependencies": {
"@nuxt-themes/docus": "^1.4.4",
"nuxt": "^3.0.0"
}
}
Binary file added docs/public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/elk-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/favicon.ico
Binary file not shown.
Binary file added docs/public/fonts/DM-sans-v11.ttf
Binary file not shown.
6 changes: 6 additions & 0 deletions docs/public/images/nuxtlabs.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions docs/public/images/stackblitz.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e621c93

Please sign in to comment.