Skip to content
This repository has been archived by the owner on Nov 13, 2022. It is now read-only.

Separate autogenerated posts from manually created posts. #138

Closed
wroscoe opened this issue Feb 27, 2020 · 5 comments
Closed

Separate autogenerated posts from manually created posts. #138

wroscoe opened this issue Feb 27, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@wroscoe
Copy link

wroscoe commented Feb 27, 2020

Is your feature request related to a problem? Please describe.
When writing notebook posts locally I'm finding it frustrating that autogenerated .md posts created from notebooks are being mixed in with my manual .md posts. This is also a little confusing with the images copied over from the notebooks into the /images folder. This makes managing commits difficult because some files need to be included while others ignored. It also makes it difficult to clear the state of your site because you have to delete the autogenerated posts.

Describe the solution you'd like
It would be simple if the project followed a simple rule to never mix autogenerated code into folders that contain manually created files.

Describe alternatives you've considered
When preparing the files for jekyll copy all the files to a new temporary folder rather than an existing folder.

Additional context
None

@wroscoe wroscoe added the enhancement New feature or request label Feb 27, 2020
@hamelsmu
Copy link
Member

Hi @wroscoe the way Jekyll works is everything needs to be converted to .md in _posts. The magic of fastpages it it allows you to see the intermediate step of this being converted for you. The point is not for you to commit these files, however, they are just generated for you for debugging purposes.

Therefore, I don't believe it is possible to seperate autogenerated md posts from real md posts. If you have an idea let me know, but they need to be put into _posts so you can see a preview of what they look like.

closing this issue for now, happy to keep discussing and we can reopen if we determine this is something that is possible. Thank you

@wroscoe
Copy link
Author

wroscoe commented Feb 28, 2020

Thanks for the fast response. Still familiarizing myself with the workflow. So when you're developing locally, what does your .gitignore file look like to ignore the notebook created posts?

@hamelsmu
Copy link
Member

I don’t ignore them because the automated build process converts them on the fly so they are never committed to GitHub :)

The intermediate step of converting to md that you would normally have to do is automated once you push the notebook to GitHub, but the intermediate step isn’t saved ( unless you turn that option on ), because it doesn’t need to be saved.

When you are debugging remotely, it’s often necessary to see the intermediate files

As such i don’t have them in .gitignore

You could if you named your notebooks a special way, I suppose

@wroscoe
Copy link
Author

wroscoe commented Feb 28, 2020

Would it make sense to have a separate folder _staging where all the markdown and image files are created and saved. This _staging folder would be what jekyll would use to create the site.

This wouldn't be needed if the only supported/recommend workflow is to edit/commit on github. But I've found the remote/local dev environment important as you work on notebooks that need specific libraries.

If you can link where in the code these folder are defined, I can take a stab a prototyping this flow. Cheers.

@hamelsmu
Copy link
Member

I don’t think that approach will work. Jekyll requires you to put you to put things in _posts to render them

If you are very interested in this problem I highly recommend going through the Jekyll tutorials
https://jekyllrb.com/docs/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants