Skip to content

[WIP] Web v2 #252

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": [
"next/core-web-vitals",
"next/typescript"
]
}
66 changes: 33 additions & 33 deletions .github/workflows/auto-minify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,43 +124,43 @@ jobs:
env:
GITHUB_USER: ${{ secrets.DISPATCH_USER }}
GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
- name: Stage Build
run: |
make build/stage
# - name: Stage Build
# run: |
# make build/stage
- name: Check Changes stage
id: git_diff_stage
run: |
diff=`git diff stage/`
if [ ! -z "$diff" ] ; then \
echo "diff=true" >> $GITHUB_OUTPUT
fi
- name: Stage Deploy
if: steps.git_diff_stage.outputs.diff == 'true'
run: |
export LATEST_VERSION=$(make version/latest)
cd stage
git checkout gh-pages
git add .
git commit --signoff -m ":arrow_up: v${LATEST_VERSION} `date`"
git push origin gh-pages
env:
GITHUB_USER: ${{ secrets.DISPATCH_USER }}
GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
- name: Commit Stage Changes
if: steps.git_diff_stage.outputs.diff == 'true' && github.event_name == 'pull_request'
run: |
git add stage
git commit --signoff -m ":robot: auto update stage :arrow_up:"
git push origin ${{ github.head_ref }}
env:
GITHUB_USER: ${{ secrets.DISPATCH_USER }}
GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
- name: Commit Stage Changes (main)
if: steps.git_diff_stage.outputs.diff == 'true' && github.ref == 'refs/heads/main'
run: |
git add stage
git commit --signoff -m ":robot: auto update stage :arrow_up:"
git push origin main
env:
GITHUB_USER: ${{ secrets.DISPATCH_USER }}
GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
# - name: Stage Deploy
# if: steps.git_diff_stage.outputs.diff == 'true'
# run: |
# export LATEST_VERSION=$(make version/latest)
# cd stage
# git checkout gh-pages
# git add .
# git commit --signoff -m ":arrow_up: v${LATEST_VERSION} `date`"
# git push origin gh-pages
# env:
# GITHUB_USER: ${{ secrets.DISPATCH_USER }}
# GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
# - name: Commit Stage Changes
# if: steps.git_diff_stage.outputs.diff == 'true' && github.event_name == 'pull_request'
# run: |
# git add stage
# git commit --signoff -m ":robot: auto update stage :arrow_up:"
# git push origin ${{ github.head_ref }}
# env:
# GITHUB_USER: ${{ secrets.DISPATCH_USER }}
# GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
# - name: Commit Stage Changes (main)
# if: steps.git_diff_stage.outputs.diff == 'true' && github.ref == 'refs/heads/main'
# run: |
# git add stage
# git commit --signoff -m ":robot: auto update stage :arrow_up:"
# git push origin main
# env:
# GITHUB_USER: ${{ secrets.DISPATCH_USER }}
# GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
tmp_pre/
.hugo_build.lock
node_modules/
.next/
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ run:

.PHONY: subup
subup:
git submodule sync
git submodule foreach git pull origin gh-pages

.PHONY: version/latest version/support version/tag version/sync version/go
Expand Down
118 changes: 22 additions & 96 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,110 +1,36 @@
# Vald WebSite
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).

Vald WebSite repository based on HUGO.
## Getting Started

## Document Tree
First, run the development server:

- Vald WebSite is developed based on [HUGO](https://gohugo.io/), which is one of the popular site generator.<br>
If you don't know about HUGO, please read the official document at first.

```
.
├ archetypes // content front matter deffinition
├ config // config file for each environment
| ├ _default/config.toml
| ├ staging/config.toml
| └ production/config.toml
├ content
| └ docs // public document content
| ├ index.html // index.html
| ├ overview // overview document directory (latest version)
| ├ tutorial // tutorial document directory (latest version)
| ├ ... // another document directory (latest version)
| └ v{major.minor} // document directory for each release version
├ preview // build pages for staging (submodule of vdaas/web/gh-pages)
├ public // build pages for production (submodule of vdaas/vald/gh-pages)
├ static // static files (img, css, js) for content
| └ images
| ├ *.(png/svg) // image files (latest version)
| └ v{major.minor} // image files directory for each release version
└ themes // hugo themes
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

## Requirements

- Hugo: v0.0.69~

## How to develop

- When you'd like to update config, design, template, etc, we recommend to develop using `make run` command which you can check on your browser https://localhost:1313

## How to get the latest contents

- You can get the latest contents of Vald by below

```bash
$ make all
```

The details of progress `init.sh`:
1. check latest version.
1. get the latest Vald package from [vdaas/vald](https://github.com/vdaas/vald) and unpacking it.
1. make sure directory for create contents and static files.
1. create contents at content root directory (/content/docs) and latest version directory (/content/docs/{version}).
1. create static files at static root dir (/static/{type}) and latest version dir (/static/{type}/{version}).
1. correct internal content link and static files' path in each content files (markdown files).


## Deploy to staging environment
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

**NOTE**:
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

Before deploy to a staging environment, please check that there are some contents files and static files.
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.

## Learn More

- When you'd like to create the Pull Request or check update, we recommend you deploy to a staging environment.
The deployment for stage env will be done when you create the PR.
If the deployment via Github Actions ends with failed, please deploy manually from local as below command.

```bash
// build files using Vald for stage env
$ make build/stage

// deploy to stage env
$ make deploy/stage
```

We can check at [Vald Netlify](https://vald.netlify.app)

## Deploy to production environment

**NOTE**:

Before publishing to official WebSite, YOU MUST CHECK the `Draft` value of each content file.<br>
The content whose draft value is `true` WILL NOT BE PUBLISHED.<br>
You can change draft variable by below commands (You can choose the most suit command).

```bash
# the draft value of all content in the root directory and the latest version directory will be `false`
$ make publish/all

# the draft value of all content in the root directory will be `false`
$ make publish/root

# the draft value of all content in the latest version directory will be `false`
$ make publish/version
```
To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

- When you'd like to publish the latest Vald WebSite, please create the PR and merge it whose message is contains "release".
If the deploy is failed, please deploy by below command.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!

```bash
// build files using Vald for production env
$ make build/production
## Deploy on Vercel

// deploy to production env
$ make deploy/production
```
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

We can check at [Vald Official WebSite](https://vald.vdaas.org)
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
110 changes: 110 additions & 0 deletions _README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Vald WebSite

Vald WebSite repository based on HUGO.

## Document Tree

- Vald WebSite is developed based on [HUGO](https://gohugo.io/), which is one of the popular site generator.<br>
If you don't know about HUGO, please read the official document at first.

```
.
├ archetypes // content front matter deffinition
├ config // config file for each environment
| ├ _default/config.toml
| ├ staging/config.toml
| └ production/config.toml
├ content
| └ docs // public document content
| ├ index.html // index.html
| ├ overview // overview document directory (latest version)
| ├ tutorial // tutorial document directory (latest version)
| ├ ... // another document directory (latest version)
| └ v{major.minor} // document directory for each release version
├ preview // build pages for staging (submodule of vdaas/web/gh-pages)
├ public // build pages for production (submodule of vdaas/vald/gh-pages)
├ static // static files (img, css, js) for content
| └ images
| ├ *.(png/svg) // image files (latest version)
| └ v{major.minor} // image files directory for each release version
└ themes // hugo themes
```

## Requirements

- Hugo: v0.0.69~

## How to develop

- When you'd like to update config, design, template, etc, we recommend to develop using `make run` command which you can check on your browser https://localhost:1313

## How to get the latest contents

- You can get the latest contents of Vald by below

```bash
$ make all
```

The details of progress `init.sh`:
1. check latest version.
1. get the latest Vald package from [vdaas/vald](https://github.com/vdaas/vald) and unpacking it.
1. make sure directory for create contents and static files.
1. create contents at content root directory (/content/docs) and latest version directory (/content/docs/{version}).
1. create static files at static root dir (/static/{type}) and latest version dir (/static/{type}/{version}).
1. correct internal content link and static files' path in each content files (markdown files).


## Deploy to staging environment

**NOTE**:

Before deploy to a staging environment, please check that there are some contents files and static files.


- When you'd like to create the Pull Request or check update, we recommend you deploy to a staging environment.
The deployment for stage env will be done when you create the PR.
If the deployment via Github Actions ends with failed, please deploy manually from local as below command.

```bash
// build files using Vald for stage env
$ make build/stage

// deploy to stage env
$ make deploy/stage
```

We can check at [Vald Netlify](https://vald.netlify.app)

## Deploy to production environment

**NOTE**:

Before publishing to official WebSite, YOU MUST CHECK the `Draft` value of each content file.<br>
The content whose draft value is `true` WILL NOT BE PUBLISHED.<br>
You can change draft variable by below commands (You can choose the most suit command).

```bash
# the draft value of all content in the root directory and the latest version directory will be `false`
$ make publish/all

# the draft value of all content in the root directory will be `false`
$ make publish/root

# the draft value of all content in the latest version directory will be `false`
$ make publish/version
```


- When you'd like to publish the latest Vald WebSite, please create the PR and merge it whose message is contains "release".
If the deploy is failed, please deploy by below command.

```bash
// build files using Vald for production env
$ make build/production

// deploy to production env
$ make deploy/production
```

We can check at [Vald Official WebSite](https://vald.vdaas.org)
11 changes: 0 additions & 11 deletions archetypes/default.md

This file was deleted.

7 changes: 0 additions & 7 deletions archetypes/directory-top/index.md

This file was deleted.

7 changes: 0 additions & 7 deletions archetypes/index.md

This file was deleted.

6 changes: 0 additions & 6 deletions archetypes/version-top/index.md

This file was deleted.

21 changes: 21 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "src/app/globals.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"iconLibrary": "lucide"
}
Loading
Loading