@prognovel/cli v0.8.9
💻 ProgNovel CLI
👇 ProgNovel CLI installation
Before you install ProgNovel CLI, you need to host backend for ProgNovel first. Follow installation guide for ProgNovel Workers backend here. Once your backend live, proceed installing the CLI:
- Install ProgNovel CLI to your computer. You need a stable release of Node.js installed first, then in command prompt, run
npm install @prognovel/cli -g
. - In an empty folder, open command prompt and run
prognovel new
. - You need to have a way to connect to Cloudflare Workers servers by setting the value of environment secrets. If you manage your ProgNovel project folder locally in a computer, you can configure environment secrets via
.env
file in your root project folder created in step (2) - (.env
file might be hidden in your Explorer app); if you host this project folder on Github repo, you can consult this page to create your environment secrets. Set the value ofCF_ACCOUNT_ID
andCF_NAMESPACE_ID
the same ID from what you configure inwrangler.toml
when you set up your ProgNovel Workers.CF_API_TOKEN
is something you need to create from Cloudflare Workers dashboard - consult this page to create one. As forSITE_URL
, is the URL you'll have to host your ProgNovel site, which you can set later on. FinallyDISCORD_WEBHOOK_URL
is something you get from your your Discord server. - Replace logo and favicon for the site. Proceed to configure settings as you'd like in
site-settings.yml
and list your website staffs and contributors insite-contributors.yml
(learn more how to set up site contibutors here). - You need at least one novel to publish your own ProgNovel app. Again in root folder of your project (where
site-settings.yml
is), runprognovel novel add some-novel-id
(use alphabets and numbers with dash-
to replace space for your novel ID). Configure novel settings as you'd like. - Once your content is ready, run
prognovel publish
. (PRO tips: if you create Discord bot and get Webhook for it, you can connect it in yoursite-settings.yml
and your bot will automatically announce new content whenever you successfully publish your content)
After your contents already published in your backend, you are ready to install your frontend. Follow this guide to get your frontend published.
🤔 What to know
General rules for ProgNovel app
- Comments and discussions are disabled until you set the value of
disqus_id
insite-settings.yml
file with Disqus shortname. image_resizer_service
insite-settings.yml
connect ProgNovel with remote image optimization service. Image resize service optimize image size of novel banner significantly, allowing some pages to load faster. Original images will be used instead ifimage_resizer_service
is empty, which is not ideal for mobile users. As for now, ProgNovel only supports imaginary image optimization microservice, though it might change in the future. Learn how to self-hostimaginary
microservice here.- You might want to configure how contributors or staffs are getting paid with Web Monetization revenue share. ProgNovel pays differently between site operational staffs and novel/content staffs (such as authors, editors, proofreaders, etc). Learn the difference here.
Rules for novels
This rules mainly applies for configs and naming convention inside folder novels/**
of your ProgNovel project folder.
- Using CLI for project name or novel id should be in lower case and can't have
space
in them. Use dash-
as separator between words instead. - After you create a novel folder inside your project with
prognovel novel add ...
, you can create a new chapter file in markdown with prefixchapter-
(just like previously, use dash-
instead of space). For example, if you have content for chapter 1, createchapter-1.md
insidenovels/{your-novel-folder}/contents/{current-volume-or-book}/chapter-1.md
. - You notice chapters of your novels are inside volume. You can create folders of volume inside
novels/{your-novel-folder}/contents
folder, to separate chapters into several books. Like chapter, volume is formatted to have dash-
instead of space, though you are free to decide their prefix. - ProgNovel will index chapters order with Alphanum sort. This is a bit similar to how Windows Explorer sort names of files. Therefore as a rule of thumb, you can sort the index of your chapters just by having the name sort active in your Explorer - for example
chapter-1.md
,chapter-2.md
,chapter-3.md
will sorted with ascending order inside ProgNovel's table of content. - You can split a chapter or simply having an extra by having it formatted with an extra dash after the chapter index. For example, if you have an extra chapter after Chapter 3 and want to index this extra chapter as Chapter 3.5, you can format the name of chapter markdown as
chapter-3-5.md
. This is also valid when you split chapters into several part with the format, for example,chapter-5-1.md
then havving to proceed tochapter-5-2.md
, so on. - To give a title inside a chapter, you have to create frontmatter part inside the markdown. Frontmatter located at the start of chapter markdown file, with three dash line
---
wrapping above and below the frontmatter attributes. Chapter frontmatter can handletitle
attribute, as well asmonetization
to enable Web Monetization chapter lock and also list contributors for that particular chapter. For example:
---
title: The Youth from Badril Village
monetization: true
author: Radhy
editor: Zoom, MyEditor
---
Bla bla bla this is the content of chapter...
Also inside chapters' frontmatters, you can specify how authors and other novel staffs/contributors are being paid with Web Monetization revenue share. As you notice in example in step (6), in the frontmatter beside
title
andmonetization
attributes we gotauthor
andeditor
. For every person credited with roles, they'll have more shares in Web Monetization revenue share, accumulates for every chapters they are part in. The kind of roles you can assign in chapters' frontmatters and their rate per chapter is configured insite-settings.yml
in your root project folder, under the variablerev_share_contribution_per_chapter
(which you can add or remove roles as well as their rates). For ProgNovel to recognize novel authors/staffs/contributors in chapters' frontmatters, you need to specify their names and payment pointers incontributors.yml
in your novel folder (note that this is different fromsite-contributors.yml
in your root project folder).(Optional) for more information about how revenue share for novel authors and contributors works, read https://demo.prognovel.com/help/monetization/3-setup-web-monetization-novel-staff.
(Optional) You can point Discord server as the novel community by setting the value of
discord_group_id
ininfo.yml
. You can easily get your Discord server ID by turning developer mode on in they advanced setting of your account settings, then right click your server to show theCopy ID
option.
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago