📝 Vite & Mdx powered static site generator.Base on islands architecture

Overview

Island.js

A static site generator for the modern web.It has following features:

  • 🚀 Base on Vite, it has great development experience.
  • 🏝️ Islands architecture, implement less client bundle and partial hydration.
  • 📝 Internal Mdx support, you can write React component in markdown file.

Documentation

To check out docs, visit docs.

Changelog

Detailed changes for each release are documented in the CHANGELOG.

Contribution

Please make sure to read the Contributing Guide before making a pull request.

Credits

The theme system references VitePress and VuePress as well as their official docs.Thanks for them.

License

MIT

Copyright (c) 2022-present, Xingyuan Yang

Comments
  • Cli command params support

    Cli command params support

    Is your feature request related to a problem? Please describe.

    Currently, Island.js has a cli but it doesn't support inline params, such as island dev docs --port=8080.

    Describe the solution you'd like

    Support cli inline params and pass on the params to Vite.

    Describe alternatives you've considered

    No response

    Additional context

    No response

    Validations

    • [X] Read the docs.
    • [X] Read the Contributing Guidelines.
    • [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
    opened by sanyuan0704 8
  • feat: support check dead link

    feat: support check dead link

    Is your feature request related to a problem? Please describe.

    Detect dead links and give hints during the building process to avoid the problem of links not opening after going online. eg:

    image

    Describe the solution you'd like

    1. check internal link:by looking up the routing table
    2. check external link: the check-links library is used to check whether the external links are properly accessible

    Describe alternatives you've considered

    No response

    Additional context

    No response

    Validations

    • [X] Read the docs.
    • [X] Read the Contributing Guidelines.
    • [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
    opened by callqh 6
  • Is there any way to inject global style?

    Is there any way to inject global style?

    Is your feature request related to a problem? Please describe.

    For example, if I want to use KaTex, the katex.css should be linked on each page, Otherwise, the formula will not render correctly.

    Describe the solution you'd like

    Maybe supporting template HTML file is one of the solutions.

    Describe alternatives you've considered

    No response

    Additional context

    No response

    Validations

    • [x] Read the docs.
    • [X] Read the Contributing Guidelines.
    • [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
    opened by Hitsuki9 5
  • Init project failed

    Init project failed

    Describe the bug

    according to getting started, using pnpm to init the island-app project, then start dev server using "pnpm run dev", terminal output Error [ERR_MODULE_NOT_FOUND] it seems like it is a small bug that needs me to install unocss as devDependencies additionally

    Reproduction

    • Step1: mkdir island-app && cd island-app
    • Step2: npm init -y
    • Step3: pnpm add islandjs
    • Setp4: mkdir docs && echo '# Hello World' > docs/index.md
    • Step5: add islan dev docs as dev-script in package.json
    • Step6: pnpm run dev
    • reproduce

    Expected behavior

    start the dev server according to the Getting Started Page without any additional behavior

    System Info

    System:
        OS: macOS 12.4
        CPU: (8) x64 Apple M1
        Memory: 18.11 MB / 16.00 GB
        Shell: 5.8.1 - /bin/zsh
      Binaries:
        Node: 16.4.0 - ~/.nvm/versions/node/v16.4.0/bin/node
        Yarn: 1.22.10 - ~/.nvm/versions/node/v14.6.0/bin/yarn
        npm: 7.18.1 - ~/.nvm/versions/node/v16.4.0/bin/npm
      Browsers:
        Chrome: 105.0.5195.125
        Firefox: 104.0.2
        Safari: 15.5
      npmPackages:
        islandjs: ^0.2.6 => 0.2.6
    

    Additional context

    No response

    Validations

    • [X] Read the docs
    • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
    opened by Trojan0523 5
  • Cannot interact in Safari browser.

    Cannot interact in Safari browser.

    Describe the bug

    image

    Reproduction

    Open the docs website in safari browser.

    Expected behavior

    When we open the page, the aside marker and appearance button can be interactive.

    System Info

    -
    

    Additional context

    No response

    Validations

    • [X] Read the docs
    • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
    bug 
    opened by sanyuan0704 5
  • Without initializing the git repository, the program terminates directly

    Without initializing the git repository, the program terminates directly

    Describe the bug

    According to the official documentation, when initializing the project, when the git repository is not initialized, the execution dev will throw an error directly and the page will not be displayed properly. image

    Reproduction

    1. Quick start to initialize the project with the official documentation
    2. Execute pnpm run dev

    Expected behavior

    Correctly display the startup page

    System Info

    System:
        OS: macOS 12.6
        CPU: (8) arm64 Apple M1
        Memory: 137.02 MB / 8.00 GB
        Shell: 5.8.1 - /bin/zsh
      Binaries:
        Node: 16.14.2 - /usr/local/bin/node
        Yarn: 1.22.18 - /usr/local/bin/yarn
        npm: 8.19.2 - /usr/local/bin/npm
      Browsers:
        Chrome: 106.0.5249.91
        Safari: 16.0
      npmPackages:
        islandjs: ^0.2.4 => 0.2.4
    

    Additional context

    No response

    Validations

    • [X] Read the docs
    • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
    opened by callqh 4
  • E2e test needed in this project

    E2e test needed in this project

    Is your feature request related to a problem? Please describe.

    Without e2e test case, we may dismiss some edge case and have some potential risk before publishing the package, e.g. #49

    Describe the solution you'd like

    The e2e test will base on Vitest and playwright, referenced vitepress implement. https://github.com/vuejs/vitepress/pull/1012

    Describe alternatives you've considered

    No response

    Additional context

    No response

    Validations

    • [X] Read the docs.
    • [X] Read the Contributing Guidelines.
    • [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
    enhancement 
    opened by sanyuan0704 4
  • yarn dev 启动 报错: Failed to resolve import

    yarn dev 启动 报错: Failed to resolve import "D:myCodeislanddocsindex.md" from "virtual:routes". Does the file exist?

    Describe the bug

    根据 文档 案例 操作过来 ,最后 yarn dev 启动失败

    Reproduction

    [plugin:vite:import-analysis] Failed to resolve import "D:myCodeislanddocsindex.md" from "virtual:routes". Does the file exist?
    32 |  ;
    33 |  import React from 'react';
    34 |  const Route0 = lazyWithPreload(() => import('D:\myCode\island\docs\index.md'))
       |                                              ^
    35 |  export const routes = [
    36 |  { path: '/', element: React.createElement(Route0), filePath: 'D:\myCode\island\docs\index.md', preload: Route0.preload }
        at formatError (file:///D:/myCode/island/node_modules/islandjs/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:35330:46)
        at TransformContext.error (file:///D:/myCode/island/node_modules/islandjs/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:35326:19)
        at normalizeUrl (file:///D:/myCode/island/node_modules/islandjs/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:40255:33)
        at processTicksAndRejections (node:internal/process/task_queues:96:5)
        at async TransformContext.transform (file:///D:/myCode/island/node_modules/islandjs/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:40389:47)
        at async Object.transform (file:///D:/myCode/island/node_modules/islandjs/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:35579:30)
        at async loadAndTransform (file:///D:/myCode/island/node_modules/islandjs/node_modules/vite/dist/node/chunks
    

    image

    image

    Expected behavior

    希望能正常跑通 流程。

    System Info

    windows 系统
    

    Additional context

    No response

    Validations

    • [X] Read the docs
    • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
    opened by Davont 4
  • support last updated feature

    support last updated feature

    Is your feature request related to a problem? Please describe.

    Now, island.js does not support last updated show in md ,like this image

    Describe the solution you'd like

    use 'git log' to get the last updated timestamp

    Describe alternatives you've considered

    No response

    Additional context

    Now: image

    Expect: image

    Validations

    • [X] Read the docs.
    • [X] Read the Contributing Guidelines.
    • [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
    opened by lweijian 4
  • feat: support multi framework, such as vue

    feat: support multi framework, such as vue

    Is your feature request related to a problem? Please describe.

    Now, island.js only support react, but sometimes we need other framework such as vue

    Describe the solution you'd like

    I am not very clear how to refactor the current infrastructure in island.js.But there is a long way to go.

    Describe alternatives you've considered

    No response

    Additional context

    No response

    Validations

    • [X] Read the docs.
    • [X] Read the Contributing Guidelines.
    • [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
    opened by sanyuan0704 0
  • feat: backTop config

    feat: backTop config

    Is your feature request related to a problem? Please describe.

    Now, BackTop is a boolean config, maybe it can use object to have more control

    Describe the solution you'd like

    backTop config

    Describe alternatives you've considered

    No response

    Additional context

    No response

    Validations

    • [X] Read the docs.
    • [X] Read the Contributing Guidelines.
    • [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
    opened by gumingWu 5
  • feat: support custom global ui component injection

    feat: support custom global ui component injection

    Is your feature request related to a problem? Please describe.

    For example, i want to inject a back to top component, then i can register it by following config:

    // config.ts
    export default {
      globalUIComponents: ['/User/project/src/components/BackToTop/index.tsx']
    }
    

    Then the component will be injected to page automatically.

    Describe the solution you'd like

    1. declare virtual module in Layout component in default theme.
    // Layout/index.tsx
    import globalComponents from 'virtual:components'
    
    1. Generate component exports in vite plugin:
    load(id) {
      if (id === 'virtual:components') {
        return `
          import BackToTop from '/User/project/src/components/BackToTop/index.tsx';
          export default [BackToTop]
       `
      }
    }
    
    1. Render global component:
    // Layout/index.tsx
    function Layout() {
      return (
         // 省略
         globalComponents.map(globalComponent => React.createElement(globalComponent))
      )
    }
    

    Describe alternatives you've considered

    No response

    Additional context

    No response

    Validations

    • [X] Read the docs.
    • [X] Read the Contributing Guidelines.
    • [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
    opened by sanyuan0704 1
  • feat: more island injection strategies

    feat: more island injection strategies

    Is your feature request related to a problem? Please describe.

    Now island component can only hang on window object globally and it is difficult if we want to lazyload it.

    In Astro, you can lazyload the island component by multi directives:

    <ShowHideButton client:idle />
    <HeavyImageCarousel client:visible />
    <SidebarToggle client:media="(max-width: 50em)" />
    

    So the key is that island component can be loaded dynamically.Then we can use requestIdleCallback, IntersectionObserver API or some custom logic to decide to load the component in proper time.

    Describe the solution you'd like

    In Island.js, we can implement above feature in these parts:

    • Expose more island config to user, such as __island="visible" | "idle" | "media".
    • Islands bundle build phase, we should hang the load function instead of component itself so that the component to can be loaded dynamically.
    • In client runtime, we should optimize the hydrate script.Base on the island config by user, we choose to load the island component and hydrate it in the proper time.

    Describe alternatives you've considered

    No response

    Additional context

    No response

    Validations

    • [X] Read the docs.
    • [X] Read the Contributing Guidelines.
    • [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
    opened by sanyuan0704 1
Releases(v0.7.27)
Owner
yangxingyuan
coding
yangxingyuan
🔥 Bon5R — Create static, blog-aware websites with pure MDX.

Bon5R Create static, blog-aware websites with pure MDX. Explore the docs » View Demo · Report Bug · Request Feature Table of Contents About The Projec

Manu Anish 3 Jul 5, 2022
A super simple static site generator

Teeny: A simple static site generator ⚠️ Disclaimer: This is a tool I built in a couple of hours to generate my personal blog yakkomajuri.github.io. I

Yakko Majuri 104 Nov 18, 2022
A tiny, fast and fun static site generator for quick blogging

1POST A tiny, fast and fun static site generator for quick blogging. 1POST is written entirely in NodeJS and has no dependencies. You can install as a

Felippe Regazio 141 Dec 5, 2022
Timers for Lost Ark bosses, islands, events, wandering merchants and more! Never miss an event again.

Timers for Lost Ark bosses, islands, events, wandering merchants and more! Never miss an event again. LostArkTimer.app Website Website Features Event

Joshua Kuan 28 Oct 17, 2022
A demonstration app for Fresh that shows how to use SSR, the islands functionality, APIs and more

Fresh Pokemon Demo Code This is a demonstration app for Fresh that shows how to use SSR, the islands functionality, APIs and more. You do need to conn

Jack Herrington 23 Dec 18, 2022
Simple store for Deno Fresh, to pass state between islands

Fresh Store A minimal store for Fresh, to allow communication between islands. It attach stores to the window component. It uses "pointers" or "keys"

Alexandre Moreau-Lemay 9 Sep 12, 2022
Deta Base UI - A place with more functionality for managing your Deta Base(s).

Deta Base UI - A place with more functionality for managing your Deta Base(s). ✨ Features: Total rows count Quick multi select (click and shift) Searc

Harman Sandhu 13 Dec 29, 2022
Gofiber with NextJS Static HTML is a small Go program to showcase for bundling a static HTML export of a Next.js app

Gofiber and NextJS Static HTML Gofiber with NextJS Static HTML is a small Go program to showcase for bundling a static HTML export of a Next.js app. R

Mai 1 Jan 22, 2022
mini vite, support static server, load ts files, pre-bundling.

Mini Vite 中文 Features Same structure with Vite. Support JS, TS, JSX, TSX, CSS, static files. Support public as public directory. Dependency Pre-Bundli

mysteryven 4 Sep 15, 2022
A simple cli-app that allows you to divide a YouTube video into multiple separate videos base on a video's time stamps. Powered by pkg and yt-scissors library.

YouTube-Scissors CLI A simple CLI app that allows you to divide a YouTube video into multiple separate videos base on a video's time stamps. This proj

Gabe 23 Nov 8, 2022
A util for getting data and metadata for all markdown files in a given dir. Useful for building static site generators

extract-md-data A util for getting data and metadata for all markdown files in a given dir. Useful for building static site generators. Usage Given th

Claire Froelich 2 Jan 6, 2022
Turn any dynamic website (especially wordpress) into a fast, secure, stable static site

Static site publisher Turn any dynamic website (especially wordpress) into a fast, secure, stable static site Reduced complexity - no need to run simp

Alex Ivkin 7 Apr 6, 2022
An obsidian plugin for uploading local images embedded in markdown to remote store and export markdown for publishing to static site.

Obsidian Publish This plugin cloud upload all local images embedded in markdown to specified remote image store (support imgur only, currently) and ex

Addo.Zhang 7 Dec 13, 2022
A Git-based CMS for Static Site Generators

staticjscms.github.io/static-cms A CMS for static site generators. Give users a simple way to edit and add content to any site built with a static sit

StaticJs CMS 147 Jan 2, 2023
Static Page for UptimeRobot. Powered by Next.js

UptimePage Static Page for UptimeRobot. Powered by Next.js 配置 配置文件都位于 config.ts 中,你可以Fork仓库后自行修改配置。 变量名 描述 样例 Config.siteName 站点名 AHdark Status Config

AHdark 10 Aug 2, 2022
⚡ A blazing fast, lightweight, and open source comment system for your static website, blogs powered by Supabase

SupaComments ⚡ A blazing fast, lightweight, and open source comment system for your static website, blogs ?? Demo You can visit the Below demo blog po

MC Naveen 112 Dec 27, 2022
Playful and Colorful One-Page portfolio featuring Parallax effects and animations. Especially designers and/or photographers will love this theme! Built with MDX and Theme UI.

Gatsby Starter Portfolio: Cara Playful and Colorful One-Page portfolio featuring Parallax effects and animations. Using the Gatsby Theme @lekoarts/gat

prashanth s 1 Dec 24, 2021
Starter template for a personal website blog, built with Next.js, MDX, and Tailwind CSS.

nextjs-mdx-blog-theme View: demo site Framework: Next.js Deployment: Vercel Content: MDX Styling: Tailwind CSS Running Locally $ git clone https://git

Alex Carpenter 18 Dec 26, 2022
My personal website built with Next.js, TypeScript, twin.macro, Framer Motion, MDX and deployed on Vercel.

chrvaskos.com My personal website / blog built with some of my favorite technologies where I can showcase my work and write articles about anything ne

Vasilis Christoforidis 4 Mar 25, 2022