🏝️ Island.js is a static site generator that builds on top of Vite, React and MDX. It is designed to be simple, powerful, and performant. It is built to help you focus on writing and deployed with minimum configuration.It has the following features:
Dark Mode
, Home Page
, API Page
、Full-text Search
, i18n
etc.Next we will walk you through the steps to create a new Island.js doc site.
TIP
At present, we also provide independent tutorial documents to complete project initialization, development, bundling and deployment from scratch, with a better reading and interactive experience, you can click [here] to view.
First, you can create a new directory by following command:
mkdir island-app && cd island-app
Execute npm init -y
to init a project. You can install Island with npm, yarn or pnpm:
# npm
npm install islandjs
# yarn
yarn add islandjs
# pnpm
pnpm add islandjs
Then you can create file:
mkdir docs && echo '# Hello World' > docs/index.md
And then you can add the following scripts in package.json
:
{
"scripts": {
"dev": "island dev docs",
"build": "island build docs",
"preview": "island start docs"
}
}
Serve the documentation site in the local server.
yarn dev
Island will start a development server at http://localhost:5173.
Build the documentation site for production.
yarn build
Island will generate a static site in the .island/dist
directory.
Preview the production build locally.
yarn preview
Island will start a production server at http://localhost:4173.