-
Notifications
You must be signed in to change notification settings - Fork 0
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
Generates nblog from a template github repo #12
Comments
I would be happy to do that, although this nblog is probably not the best example. it basically has no theming apart from default nimib theme, and the only thing of (dubious) value is the For a similar idea see https://github.com/HugoGranstrom/nimib-playground by @HugoGranstrom (actually inspired by you :)). It has no index but I guess it could be added. |
I'm still testing this idea and haven't implemented all things yet (a somewhat nice index file for example). Something I'm wondering about with Github templates: say that we do an update to the template. Isn't it more cumbersome for someone to merge those updates into their own repo if we do it as a template instead of a fork? As far as I understand it, a template doesn't come with all the history of a repo that a fork would. |
I am surprised to see that I have been quoted in the README of a project :)
import std/[strutils, strformat]
[...]
writeFile("drafts" / folderName / "index.nim", """
import nimib
nbInit
nbText:hlMd"""
{folderPrefix}
{'-'.repeat(folderPrefix.len)}
""""
nbSave
""") I think it would be preferable to add the starting Nimib template in an external file. There could be a task to simply clean the folder when cloned from Hugo repo or you could publish the repo with empty draft folder to nimble, so that you just have to install the nimble pkg with nimble develop nimib-playground. I plan to modify the index.nim just a little bit to add both a new nim and html file to the git, but otherwise, it scans the whole directory and makes what I wish. In the future, once I become more familiar with HTML/CSS/Javascript, I will probably make something more customized. I guess anyone can fork your template and then sync with your template when you make changes. |
Say good things and people will quote you ;)
The date is there as a way to make each folder-name unique and avoid conflicts if (when) you have a bad imagination to come up with a new name for a nimib. But could absolutely make it an option that is on by default, but you can opt-out if you want a specific nimib to have a nicer url.
Yes, this solves many of the points I didn't reply directly to. This way we don't have to have too many options as you can just change it yourself. The only thing that we would need is a way to define pass the
Just delete the folder, no task needed 😜 On a more serious note: the plan is to have a clean template for people to clone with empty folders, but that comes when I "release" this officially. I don't see how making it a nimble package would be useful tbh 🤔 This isn't a package, merely a template with some useful commands (which happens to be done using nimble).
Yes, that's the nice thing with this approach that you can modify everything to your liking :)
I wouldn't consider myself particularly good at any of them, especially not CSS, but if I just do it in small pieces at a time it is actually not toooooooo hard. For example, starting with changing one specific element at a time instead of trying to do a super-duper-fancy-pancy cool new theme at once. But mostly it just involves trying to come up with a good phrase to search for on google/startpage/duckduckgo which gives the answer 🤣
That's a good point, you can actually fork a template as well :O And most of the changes that I would introduce are limited to a few files, so manually updating them by copy-pasting wouldn't be too hard even if you choose to use the template instead. |
note that nimib can easily give access to custom sections in
and I would move this discussion can probably be moved in nimib-playground repo :) |
Yes I started a discussion in the wrong place. |
In Github, you have the possibility to generate a github repository from a template repository.
Maybe you could make the inner structure of your blog (With a basic index.nim, index.html) file, available as a Github template repository, so that we can make easily a blog similar to yours ?
Obviously, with much less theming than yours, so that we don't have all identical blogs ;) (and with a link to your blog, so that you get the credits).
The text was updated successfully, but these errors were encountered: