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

nef jekyll --watch #116

Open
ferranpujolcamins opened this issue Jan 21, 2020 · 1 comment
Open

nef jekyll --watch #116

ferranpujolcamins opened this issue Jan 21, 2020 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ferranpujolcamins
Copy link

I usually write my docs on a swift playground while previewing the generated jekyll site in my browser.

I use jekyll serve, but I still to run nef jekyll manually in order for the generated markdown to be updated on a change.

I'd love a --watch option so nef automatically regenerates the markdown files for me.

@miguelangel-dev miguelangel-dev added enhancement New feature or request good first issue Good for newcomers labels Jan 21, 2020
@miguelangel-dev
Copy link
Member

miguelangel-dev commented Jan 21, 2020

Ey @ferranpujolcamins,
firstly, I appreciate your suggestions ^^ - thanks for coming to nef and give it a try!

About your suggestion, I agree it is a nice-to-have feature. Currently, I'm working on big refactor to migrate nef to a complete functional architecture using bow+swift. I comment about it because this refactor will help in future features like this one.

After the refactor, nef will provide APIs like

static func render(playgroundsAt: URL, 
                   mainPage: URL, 
                   into output: URL) -> IO<nef.Error, NEA<URL>>

Where IO<nef.Error, NEA<URL>> will be:

  • fails error with type nef.Error
  • success NEA<URL> list of rendering Playgrounds.

So you can easily call them to regenerate your Jekyll site. On a first review, we should investigate 2 things:

  1. How to subscribe to changes in any folder at mac-filesystem, so reactively we could invoke nef API after for example save any page (or playground)
  2. Let if we could invoke a refresh in the browser to auto-render the new content (prevent cache web-browser...) [maybe Jekyll server does it for us]

On this way, easily we could provide the option you suggest, whereafter any change in your playground it will regenerate your jekyll-site.

While I continue working on the refactor, if you want, you can investigate it... even add this option to jekyll-CLI when the refactor will be completed. (~mid of feb)

wdut?

Of course, when you start to work in the feature, I will provide u with any resource or help you need :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants