-
Notifications
You must be signed in to change notification settings - Fork 182
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
Generate a quick index.html with sakura loaded #11
Comments
This doesn't seem like it should be in the main repo. Sounds like it should be its own npm package, with a name like |
This is a great idea. I've been using this in my shellrc (to convert from markdown) from quite some time now: sakura () {
pandoc --css /cabinet/lab/sakura.css/css/sakura.css $1 -o /tmp/$1.html
xdg-open /tmp/$1.html
} To make my life even more easier, I made smurf, which works with sakura (or any css really) quite well. But I've got a few concerns with this:
This sounds perfect. If there is a need for a command line tool by the users, another repository named sakura-cli would be more appropriate. Any thoughts? |
I think if you want to specialize the command line tool, you should make a full-fledged static site generator (like Jekyll) using markdown and sakura. Of course, the philosophy would be to keep it simple, so it would be ideal for 1-5 page websites. You could have two primary commands,
This way, In any case, whatever you decide to do, I'd be down to help develop it! |
I agree that it shouldn't be part of Now, regarding the concerns you raised:
Solved if published as a separate package.
Without the cli, you would need to:
With the cli, you would need to:
The first method saves me from writing some custom css. The second saves me from scaffolding a new project. The cli is definitely not a requirement but it'd probably increase the usage of sakura over time.
You're right. But then you'd need to whether create an entirely new project (with the "marketing" efforts involved) or add support for a tool that is already adopted by the community. The latter would be a great solution. If anyone knows a tool that does that, I'd be interested. Anyway, thanks for the interesting discussion 👍 It's just a suggestion after all so feel free to do what you think is best 😉 |
Since I intended to quicken developer time (especially for people who just don't want to bother with css), it's a probably a good guess that they don't want to bother with HTML either. So if all the 4 steps you listed could get compressed down into 1 simple command, that'd be really really awesome!
Another really awesome idea @purag ! Maybe we could combine both these scenario as follows:
Though some people will inevitably be dissatisfied with the static generator, given the simplicity of it. I'm sure it will appeal to a lot of people, just like sakura.css did 😊 If you guys are excited about any of this, I'm totally down to help and collaborate! ^_^ |
If it's gonna be as thorough as that (making a blog directory, etc), it may be better to just ship it as a theme for jekyll, hugo, etc. I think it might be nice to just have
There are lots of use cases for a static site generator without blogging capabilities. This would be awesome for github pages, as right now people are resorting to jekyll for that since github supports it, but maybe that's overkill. |
Although I like the idea, I believe Jekyll and other static site generators would defeat the purpose of sakura. They're complex tools that add a level of abstraction that makes it hard to understand how everything works together. It should be easy to understand and tweak the result of running the sakura command. I believe the simplest way to create a server would be to add an index.js (using express for example) along with the appropriate npm scripts. |
I like the idea of having a demo page/blog/landing page with little efforts. It would be even easier if we could just run
sakura
to create:index.html would include a basic html structure with sakura.css loaded. It could do more than that though, for example:
sakura README.md
- generate an index.html file with the html generated from the markdown filesakura --theme light
- generate html file with the light theme loadedTo accomplish that, the repository would just need to include a few js files. You can then declare executables in the package.json and publish them. Users could run
npm install sakura --global
and thensakura
.No need to lookup for the cdn url or download the css file. No need to create an index.html files with the basic structure.
Happy to submit a PR if that sounds good.
The text was updated successfully, but these errors were encountered: