Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the init command #519

Closed
damithc opened this issue Jan 1, 2019 · 8 comments
Closed

Improve the init command #519

damithc opened this issue Jan 1, 2019 · 8 comments

Comments

@damithc
Copy link
Contributor

damithc commented Jan 1, 2019

Some suggestions for improving the init command (can be broken down to multiple PRs):

The default starter site can be enhanced to make it more useful to the user as a starting point. e.g., create a site that has all typical features (i.e., top nav, site nav, footer, search, a bunch of pages typically used such as home, contact, docs etc.) so that the user can go from there to a production website with least amount of effort.

Perhaps we can have other options?

--minimal: create an empty site
--convert: converts an existing site to a MarkBind site. This can be an 'intelligent' conversion e.g., deduce siteNav items based on page titles
--restore: restores the folder to the previous state (i.e., reverses the init command)

@damithc damithc added s.UnderDiscussion The team will evaluate this issue to decide whether it is worth adding a-CLI labels Jan 1, 2019
@Chng-Zhi-Xuan
Copy link
Contributor

Chng-Zhi-Xuan commented Jan 2, 2019

I would say --minimal and --restore is reasonable to implement, as well as revamping the default init index.md.

However, --convert could prove to be challenging as existing html code could have components that MarkBind does not support (from other static site generators). A straightforward implementation could be using jQuery or Cheerio to extract the <body> of the previous site and place it within the index.md file. Any rendering or formatting issues would have to be manually fixed by the user. An advantage of this is that any of the <frontmatter> components can be used immediately without changes to existing code base.

@damithc
Copy link
Contributor Author

damithc commented Jan 2, 2019

However, --convert could prove to be challenging as existing html code could have components that MarkBind does not support (from other static site generators).

We can limit this feature to simple markdown-based document repositories, such as documentation in GitHub repos/wikis. The main aim is to give an easy way for GitHub repos to convert their documentation into a MarkBind site.

@damithc damithc added a-Process c.Enhancement and removed s.UnderDiscussion The team will evaluate this issue to decide whether it is worth adding labels Mar 15, 2019
@damithc
Copy link
Contributor Author

damithc commented Mar 15, 2019

@amad-person this is somewhat related to your current work.

@amad-person
Copy link
Contributor

@damithc I can look into this once my PR for the workflow task is complete. Thanks for bringing it to my attention!

@damithc
Copy link
Contributor Author

damithc commented May 20, 2019

related #861

@yash-chowdhary
Copy link
Contributor

yash-chowdhary commented Feb 7, 2020

--restore: restores the folder to the previous state (i.e., reverses the init command)

Would this simply cover deleting the files and directories that init created (contents, site.json, index.md and _markbind) or should it be the case that this command can only be run immediately after init is executed (I'm thinking of the case where serve or build has been executed and then --restore is executed, or when it's executed before init)?

@damithc
Copy link
Contributor Author

damithc commented Feb 7, 2020

--restore: restores the folder to the previous state (i.e., reverses the init command)

If we assume most users will be using git, we might not even need a restore option.

@lhw-1
Copy link
Contributor

lhw-1 commented Mar 26, 2023

There are four possible improvements brought up in this issue: --minimal, --convert, --restore, and the updates to the starter site.

As of March 2023:

As such, if there are no objections, I think that it should be safe to close this issue with #2225.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants