Skip to content

DawChihLiou/dawchihliou.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Daw-Chih's Portfolio

This site is built with

The Hero design is inspired by Vercel.

Versions

Getting Started

First, install the dependencies

yarn

and run the development server:

yarn dev

Open http://localhost:3000 with your browser to see the result.

Wasm Full Text Search

🦀 + 🕸 = ❤️

The Full Text Search in WebAssembly is aiming for minimizing bundle size and heavy computation on the client side. Make sure Cargo and the following tools are installed.

Cargo

curl https://sh.rustup.rs -sSf | sh

wasm-pack

cargo install wasm-pack

binaryen

brew install binaryen

Twiggy

cargo install twiggy

Building wasm/fulltext-search

At the project root, run

# execute script with Cargo
cargo run scripts/fulltext-search

# or npm
yarn fulltext-search

It will generate the WebAssembly and JavaScript glue code in wasm/fulltext-search/pkg.

To lint the script, run

cargo clippy

More information about Clippy, please check out its repository.

Available Scripts

yarn dev

to start development server

yarn start

to start production server

yarn build

to generate production build. The built assets will be in under /.next directory.

yarn export

to export the app to static HTML, which can be run standalone without the need of a Node.js server.

yarn deploy

to deploy the static app from yarn export to github pages. The deployment is triggered by merging into gh-pages branch.

yarn fulltext-search

to generate fulltext-search WebAssembly module.

yarn test

to run unit testing with Jest. To run unit tests in CI, run yarn test:ci.

yarn test:e2e

to run end-to-end testing with Playwright. To run unit tests in CI, run yarn test:e2e:ci.

yarn image

to generate optimized web images.

yarn new:article

Usage: yarn new:article [options] <title>

Bootstrap a new article.

Arguments:
  title                       article title

Options:
  -p, --publishedat <string>  publishing date (default: "Apr 27, 2023")
  -d, --description <string>  description (default: "✍️ Enter description here")
  -t, --tag <string>          tag (default: "✍️ Enter tag here")
  -h, --help                  display help for command

Make sure to run yarn image afterward to generate optimized hero image.