Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs]: Migrate docs to Sveltekit #372

Merged
merged 38 commits into from
May 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
aafc952
[docs]: Migrated docs to Sveltekit (#273)
Caladan08 Jan 14, 2023
aeacce8
[docs]: small TS fixes
BeeMargarida Feb 3, 2023
f4207dc
[docs]: remove flyin animation since it causes elements to pop in
BeeMargarida Feb 3, 2023
c333b23
[docs]: switch to TS
BeeMargarida Feb 3, 2023
4cd408f
[docs]: add SSR hook solution
BeeMargarida Feb 3, 2023
3d2ac34
[docs]: remove and move includes/ files
BeeMargarida Feb 3, 2023
b5a5fbf
[docs]: Added a slash to search links
Caladan08 Mar 21, 2023
c3dc0c3
[docs]: Changed design of headers and changed structure of html
Caladan08 Mar 22, 2023
b46e95d
[docs]: Use media queries instead of <svelte:window> for Sidebar
Caladan08 Mar 22, 2023
5481754
[docs]: Removed ComponentPreview in /components
Caladan08 Mar 22, 2023
407c70a
[docs]: Use media queries instead of <svelte:window> for Topbar
Caladan08 Mar 24, 2023
6845440
[docs]: Fixed styling in Topbar Menu component
Caladan08 Mar 24, 2023
62ad50c
[docs]: Deleted unused window_width variable in layout
Caladan08 Mar 24, 2023
72c775f
[docs]: Implemented suggested changes
Caladan08 Apr 5, 2023
5771e06
[docs]: Updated the design of the search bar
Caladan08 Apr 14, 2023
b110241
[docs]: Changed 'Search' text to paragraph tag
Caladan08 Apr 15, 2023
a7f16fc
[docs]: Enforce 100% width
Caladan08 Apr 15, 2023
ab6c739
[docs]: Removed blue background color of search modal
Caladan08 Apr 15, 2023
1e16f0b
[docs]: Made the search links keyboard focusable
Caladan08 Apr 16, 2023
7aa8b89
[docs]: Corrected wrong language declarations in code blocks
Caladan08 Apr 17, 2023
abf38d8
fix: links in changelog docs
BeeMargarida Apr 20, 2023
a64ce58
[docs]: fix dark mode styles in docs
BeeMargarida Apr 20, 2023
16afae0
[@svelteui/demos]: fix dark theme demo
BeeMargarida Apr 21, 2023
f3dbc9f
[docs]: Tweaks and fixes in dark theme
Caladan08 Apr 21, 2023
7e34cc5
[docs]: Fixed dark theme in tables
Caladan08 Apr 21, 2023
13fe5b2
[docs]: Implemented suggested changes
Caladan08 Apr 22, 2023
19aee31
[docs]: Fix dark theme in mobile
Caladan08 Apr 22, 2023
cd7ed54
[docs]: Store colorScheme value in localStorage
Caladan08 Apr 22, 2023
bd8b0b7
[docs]: Change backgroundColor of Heading and MinorHeading to match a…
Caladan08 Apr 22, 2023
278c79b
[docs]: Linted and tested code
Caladan08 Apr 22, 2023
20ebc9c
[docs]: changed dark mode heading background color
BeeMargarida Apr 23, 2023
d16cb7e
[docs](docs): fix source code button color
BeeMargarida Apr 24, 2023
60df4da
[fix](docs): fix highlight in code blocks in the docs
BeeMargarida Apr 27, 2023
b846e85
[feat](docs): Refactor the whole docs structure and set deployment setup
BeeMargarida Apr 29, 2023
b79dd0a
[fix](docs): set correct base path
BeeMargarida Apr 29, 2023
e221093
[feat](docs): trigger docs deploy workflow manually
BeeMargarida Apr 29, 2023
de65559
[fix](docs): merge conflict
BeeMargarida May 13, 2023
bc23eee
[fix](core): revert svelte-preprocess version and fix scripts
BeeMargarida May 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy Docs to GitHub Pages

on: workflow_dispatch

jobs:
build_site:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: Install dependencies
run: yarn --immutable

- name: build
env:
BASE_PATH: ''
run: |
cd apps/docs
yarn build
touch build/.nojekyll
touch apps/docs/__DOCS__/dist/CNAME && echo 'www.svelteui.org' > apps/docs/__DOCS__/dist/CNAME

- name: Upload Artifacts
uses: actions/upload-pages-artifact@v1
with:
# this should match the `pages` option in your adapter-static options
path: 'build/'

deploy:
needs: build_site
runs-on: ubuntu-latest

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v1
10 changes: 9 additions & 1 deletion apps/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
.DS_Store
node_modules
__DOCS__
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
1 change: 1 addition & 0 deletions apps/docs/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
38 changes: 38 additions & 0 deletions apps/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# create-svelte

Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npm create svelte@latest

# create a new project in my-app
npm create svelte@latest my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

To create a production version of your app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
2 changes: 0 additions & 2 deletions apps/docs/decs.d.ts

This file was deleted.

42 changes: 0 additions & 42 deletions apps/docs/jsconfig.json

This file was deleted.

36 changes: 17 additions & 19 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
{
"private": true,
"name": "svelteui-docs",
"version": "0.11.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
},
"type": "module",
"dependencies": {
"@svelte-docs/server": "0.1.6",
"radix-icons-svelte": "1.2.1"
},
"devDependencies": {
"@svelte-docs/core": "0.10.13",
"@svelte-docs/publisher": "0.2.3",
"@svelte-docs/themes": "1.0.1",
"npm-run-all": "4.1.5",
"svelte-tooltip": "1.2.0",
"rollup": "2.79.1"
},
"scripts": {
"build": "rollup -c ../../node_modules/@svelte-docs/core/rollup.config.js",
"autobuild": "rollup -c ../../node_modules/@svelte-docs/core/rollup.config.js -w",
"prepare:docs": "deno run --unstable --allow-read --allow-write ./prepare.ts",
"dev": "yarn prepare:docs & yarn start:dev & yarn autobuild",
"start": "node ../../node_modules/@svelte-docs/server",
"start:dev": "PORT=3002 node ../../node_modules/@svelte-docs/server --dev --single",
"start:pagewatch": "node ../../node_modules/@svelte-docs/core/watcher",
"deploy": "yarn prepare:docs & yarn build && deno run -A --unstable ../../scripts/docs/build.ts",
"deploy:nobuild": "node ../../node_modules/@svelte-docs/publisher"
"@sveltejs/adapter-static": "2.0.2",
"@sveltejs/kit": "1.15.9",
"mdsvex": "0.10.6",
"svelte": "3.58.0",
"svelte-check": "3.2.0",
"tslib": "2.5.0",
"typescript": "4.9.3",
"vite": "4.3.3"
}
}
39 changes: 0 additions & 39 deletions apps/docs/pre-release.md

This file was deleted.

34 changes: 0 additions & 34 deletions apps/docs/prepare.ts

This file was deleted.

9 changes: 9 additions & 0 deletions apps/docs/src/app.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
// and what to do when importing types
declare namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface Platform {}
}
12 changes: 12 additions & 0 deletions apps/docs/src/app.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
25 changes: 0 additions & 25 deletions apps/docs/src/components/MinorHeading.svelte

This file was deleted.