Skip to content

Interactive setup for MarkBind sites #2888

@yihao03

Description

@yihao03

Proposal: Interactive commands

uses: Inquirer.js

Problem

Currently, the built-in markbind-cli commands only does what it is supposed to do, i.e. init, build, serve and deploy. It relies on the users to figure out the MarkBind features and configurations by going through the user guide. This limits the feature adoption of MarkBind, causing MarkBind to not be used to the fullest potential, making MarkBind essentially a glorified markdown format. This is especially true for configurations in site.json which users often ignore.

Now, with more and more opt in features (e.g. pagefind, dark mode and perhaps agent skills in the future), it could justify the use of an interactive setup when initializing a MarkBind site.

Proposal

Use inquirer.js to create an interactive command line interface for markbind init command. The interactive CLI will ask users a series of questions to help them configure their MarkBind site.

Configurations

Enabling features

  • PageFind
  • Dark mode
  • Agent skills (if implemented in the future)

Site information

  • favicon
  • site name
  • baseURL

Plugins

Which plugin to install and use e.g. CustardUI (🔥🔥!!)

Git repository

Whether or not to initialize a git repository for the MarkBind site, and populate the baseURL with the repo name accordingly for deployment to GitHub Pages.

Benefits

  • Better user experience for new users, as they can easily configure their MarkBind site without having to read through the documentation.
  • Increased feature adoption, as users are more likely to enable features when they are presented with them in an interactive manner.

Implementation

This might break some CI/CD pipeline but it is unlikely that markbind init is used in CI/CD pipelines. We can also add a --no-interactive flag to skip the interactive setup for users who prefer to. Alternatively, we could create a new command like markbind setup alongside the current commands

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions