Hookdown is a website that hosts a Markdown editor. By using hookdown, you could edit Markdown without any other efforts, and most importantly, it let you configure a webhook which could be used to automatically publish your works.
To use Hookdown, you need firstly find a Hookdown provider, or download the Hookdown deployment pack on GitHub releases, and deploy it by yourself.
The usage of Hookdown is quite simple right now. Basically you could just use it as you use other Markdown editors. The special things are:
- Hookdown offers a toolbar that could be used for visualized editing.
- The toolbar contains a button of settings, click it and you will be able to change the configurations of the website and editor.
- For using webhook, you should first configure the Webhook section in settings. You must provide a URL, and optionally others.
- Once you configured webhook, you could simply click the button nearby the settings button, then Hookdown will send the texts you written to the webhook you've configured.
- Install Node.js. Hookdown is written on Node.js v18.15.0, and has not been tested on other versions, so we suggest you use the same version. But in theory, it should be usable on other versions that Next.js 13 supports (Node.js 14.6.0 or newer).
- Go to releases page to download the
hookdown-deployment-pack
of specified version, or Go to download the latest pack directly. - Unzip the deployment pack to anywhere you like.
- At the root directory of unzipped deployment pack, run following code in bash/cmd:
npm install --omit=dev npm run start
- Now your app should be successfully started. By default it listens to port 3000, you could use the switch
-p
to specify other ports. For example, runnpm run start -p 3001
to listen to port 3001.
- Enable yarn corepack.
- Locates to the root directory of unzipped deployment pack.
- Install workspace tool by running following code in bash/cmd:
This command will download a package from
yarn plugin import workspace-tools
raw.githubusercontent.com
, so you may need set yarn proxy to make it accessible. - Then run:
yarn workspaces focus --production yarn start
- Now your app should be successfully started. By default it listens to port 3000, you could use the switch
-p
to specify other ports. For example, runyarn start -p 3001
to listen to port 3001.
The deployment pack includes a ecosystem.config.js
file which could be used by PM2 to daemonize your app. This is designed for yarn, so make sure you have executed these steps and have not got any error.
ℹ INFO |
---|
Although the original ecosystem.config.js is designed for yarn, you could simply change some of its configurations to switch to npm. Basically, all you need to do is change script: "yarn" to script: "npm run" . For more info about PM2's ecosystem.config.js , see their docs. |
- To install PM2 on your server, run following code in bash/cmd:
npm i -g pm2
- Then run following code start and daemonize your app:
pm2 start ecosystem.config.js
- The status of your app could be checked by:
pm2 list
For more info about PM2, see their docs.
For programmers who want to submit code to this repo, we ask you:
- Respect the code styles of this repo.
- Before making pull request, make sure that there is an issue about what you are going to do.
- Commit with conventional commits.
For all contributors and who want to contribute, make sure you followed the Code of Conduct.
This section is under construction.
We use Visual Studio Code as main editor. Once you opened this project in Visual Studio Code, you could find some recommended extensions in Extension tab. Install them to keep consistent development experience with us. You may be asked by Visual Studio Code to use a workspace edition of TypeScript if you opened a TypeScript file, make sure you accept it.
We use Yarn 3 as package manager, you could find a installation guide on its official website. Once you installed Yarn 3, run code below at the root of the project:
yarn install
It will install all needed dependencies for you.
This project is open-sourced under the MIT license.
Name | |
---|---|
@AkiraVoid | me@akiravoid.com |