is cryogen suited to use in github pages? #36

Closed
tangrammer opened this Issue Dec 13, 2014 · 21 comments

Comments

Projects
None yet
6 participants
@tangrammer

Hi cryogen guys,
I'm trying to use cryogen in github pages but it's being really complicated,...
Is there some preferred or suited way to do that?

thanks!
Juan

@yogthos

This comment has been minimized.

Show comment
Hide comment
@yogthos

yogthos Dec 13, 2014

Member

Absolutely, you can see a couple of people already running Cryogen on GitHub pages here and here. If I recall correctly you simply have to make a repository and upload the content there as seen here.

Member

yogthos commented Dec 13, 2014

Absolutely, you can see a couple of people already running Cryogen on GitHub pages here and here. If I recall correctly you simply have to make a repository and upload the content there as seen here.

@tangrammer

This comment has been minimized.

Show comment
Hide comment
@tangrammer

tangrammer Dec 13, 2014

Hi Dimitri, I was trying to mean how is the workflow to follow for
deploying to github pages. I asked that because cryogen remove the blog
directory any time you make changes so your .git folder also is removed
... My question is more related with publishing in following occasions, not
the first one. Anyone is doing that? Is using submodules technique? HTML
redirection?

Thanks in advance
El 13/12/2014 15:42, "Dmitri Sotnikov" notifications@github.com escribió:

Absolutely, you can see a couple of people already running Cryogen on
GitHub pages here http://dl1ely.github.io/ and here
http://jonase.github.io/nil-recur/. If I recall correctly you simply
have to make a repository and upload the content there as seen here
https://github.com/dl1ely/dl1ely.github.com.


Reply to this email directly or view it on GitHub
#36 (comment).

Hi Dimitri, I was trying to mean how is the workflow to follow for
deploying to github pages. I asked that because cryogen remove the blog
directory any time you make changes so your .git folder also is removed
... My question is more related with publishing in following occasions, not
the first one. Anyone is doing that? Is using submodules technique? HTML
redirection?

Thanks in advance
El 13/12/2014 15:42, "Dmitri Sotnikov" notifications@github.com escribió:

Absolutely, you can see a couple of people already running Cryogen on
GitHub pages here http://dl1ely.github.io/ and here
http://jonase.github.io/nil-recur/. If I recall correctly you simply
have to make a repository and upload the content there as seen here
https://github.com/dl1ely/dl1ely.github.com.


Reply to this email directly or view it on GitHub
#36 (comment).

@yogthos

This comment has been minimized.

Show comment
Hide comment
@yogthos

yogthos Dec 13, 2014

Member

There's a flag in the config now that allows files to be excluded when the public folder is regenerated, you can see the original pr for it here. It sounds like what you're looking for:

:keep-files [".git"] 
Member

yogthos commented Dec 13, 2014

There's a flag in the config now that allows files to be excluded when the public folder is regenerated, you can see the original pr for it here. It sounds like what you're looking for:

:keep-files [".git"] 
@tangrammer

This comment has been minimized.

Show comment
Hide comment
@tangrammer

tangrammer Dec 13, 2014

Yeah, that seems to solve it!
El 13/12/2014 21:28, "Dmitri Sotnikov" notifications@github.com escribió:

There's a flag in the config now that allows files to be excluded when the
public folder is regenerated, you can see the original pr
#28 for it here. It sounds like
what you're looking for:

`:keep-files [".git"]


Reply to this email directly or view it on GitHub
#36 (comment).

Yeah, that seems to solve it!
El 13/12/2014 21:28, "Dmitri Sotnikov" notifications@github.com escribió:

There's a flag in the config now that allows files to be excluded when the
public folder is regenerated, you can see the original pr
#28 for it here. It sounds like
what you're looking for:

`:keep-files [".git"]


Reply to this email directly or view it on GitHub
#36 (comment).

@yogthos

This comment has been minimized.

Show comment
Hide comment
@yogthos

yogthos Dec 14, 2014

Member

excellent

Member

yogthos commented Dec 14, 2014

excellent

@yogthos yogthos closed this Dec 14, 2014

@tangrammer

This comment has been minimized.

Show comment
Hide comment
@tangrammer

tangrammer Dec 15, 2014

Because it wasn't so easy :) I left here fully instructions
http://tangrammer.github.io/posts/02-12-2014-cryogen-and-github.html

Thanks in advance!

Because it wasn't so easy :) I left here fully instructions
http://tangrammer.github.io/posts/02-12-2014-cryogen-and-github.html

Thanks in advance!

@yogthos

This comment has been minimized.

Show comment
Hide comment
@yogthos

yogthos Dec 15, 2014

Member

I think a future improvement would be to create a documentation site that documents these kinds of instructions.

Member

yogthos commented Dec 15, 2014

I think a future improvement would be to create a documentation site that documents these kinds of instructions.

@dl1ely

This comment has been minimized.

Show comment
Hide comment
@dl1ely

dl1ely Jan 16, 2015

Contributor

@tangrammer I am answering a bit late, but :keep-files was added for that exact reason: Deploying to github pages without having to copy over the generated files to a separate git repo. But i see you selected a different approach in your blog post. There seem to be many ways 😄

Contributor

dl1ely commented Jan 16, 2015

@tangrammer I am answering a bit late, but :keep-files was added for that exact reason: Deploying to github pages without having to copy over the generated files to a separate git repo. But i see you selected a different approach in your blog post. There seem to be many ways 😄

@tangrammer

This comment has been minimized.

Show comment
Hide comment
@tangrammer

tangrammer Jan 16, 2015

@dl1ely Thanks!, could you specify the exact flow to keep your blog in github and your webapp working?
I'll try to get it working with :keep-files but I couldn't ...

@dl1ely Thanks!, could you specify the exact flow to keep your blog in github and your webapp working?
I'll try to get it working with :keep-files but I couldn't ...

@dl1ely

This comment has been minimized.

Show comment
Hide comment
@dl1ely

dl1ely Jan 19, 2015

Contributor

Hi,

for me it felt straightforward. I let Cryogen create the static files, then i used git init in resources/public and added all files and committed them. Then i connected that repo with the github-repo for dl1ely.github.io (using git add remote …) and pushed to remote. Now the public folder was online via github.io. Before recreating the files in resources/public, i added :keep-files ['.git'] to config.edn to protect the git metadata for the resources directory (But you can to this step at first, if you wish). Then i added a post and let cryogen recreate the static files. .git will not get deleted, so git status only shows the differences between the new created files and the previously committed version, despite that ALL files have been recreated. I commit the changed and new files and push to the remote repo. New/Changed files are online.

So, instead of copying over generated files to another directory that is versioned by git, i directly use the resources directory of cryogen and keep the `.git' directory there.

Contributor

dl1ely commented Jan 19, 2015

Hi,

for me it felt straightforward. I let Cryogen create the static files, then i used git init in resources/public and added all files and committed them. Then i connected that repo with the github-repo for dl1ely.github.io (using git add remote …) and pushed to remote. Now the public folder was online via github.io. Before recreating the files in resources/public, i added :keep-files ['.git'] to config.edn to protect the git metadata for the resources directory (But you can to this step at first, if you wish). Then i added a post and let cryogen recreate the static files. .git will not get deleted, so git status only shows the differences between the new created files and the previously committed version, despite that ALL files have been recreated. I commit the changed and new files and push to the remote repo. New/Changed files are online.

So, instead of copying over generated files to another directory that is versioned by git, i directly use the resources directory of cryogen and keep the `.git' directory there.

@tangrammer

This comment has been minimized.

Show comment
Hide comment
@tangrammer

tangrammer Jan 19, 2015

@dl1ely But in this case, how do you keep tracked your new .md files that probably you are working on but yet they aren't ready to be published?

@dl1ely But in this case, how do you keep tracked your new .md files that probably you are working on but yet they aren't ready to be published?

@dl1ely

This comment has been minimized.

Show comment
Hide comment
@dl1ely

dl1ely Jan 20, 2015

Contributor

@tangrammer I version the cryogen directory separately and .gitignore the
resources dir

tangrammer notifications@github.com schrieb am Mo., 19. Jan. 2015 22:28:

@dl1ely https://github.com/dl1ely But in this case, how do you keep
tracked your new .md files that probably you are working on but yet they
aren't ready to be published?


Reply to this email directly or view it on GitHub
#36 (comment)
.

Contributor

dl1ely commented Jan 20, 2015

@tangrammer I version the cryogen directory separately and .gitignore the
resources dir

tangrammer notifications@github.com schrieb am Mo., 19. Jan. 2015 22:28:

@dl1ely https://github.com/dl1ely But in this case, how do you keep
tracked your new .md files that probably you are working on but yet they
aren't ready to be published?


Reply to this email directly or view it on GitHub
#36 (comment)
.

@tangrammer

This comment has been minimized.

Show comment
Hide comment
@tangrammer

tangrammer Jan 20, 2015

Stefan, could you specify this last part and full github flow for future
users?
Then, we could compare with my trick, I think it will help a lot!
Thanks

2015-01-20 6:06 GMT+00:00 Stefan Pfeiffer notifications@github.com:

@tangrammer I version the cryogen directory separately and .gitignore the
resources dir

tangrammer notifications@github.com schrieb am Mo., 19. Jan. 2015
22:28:

@dl1ely https://github.com/dl1ely But in this case, how do you keep
tracked your new .md files that probably you are working on but yet they
aren't ready to be published?


Reply to this email directly or view it on GitHub
<
https://github.com/cryogen-project/cryogen/issues/36#issuecomment-70564061>

.


Reply to this email directly or view it on GitHub
#36 (comment)
.

Stefan, could you specify this last part and full github flow for future
users?
Then, we could compare with my trick, I think it will help a lot!
Thanks

2015-01-20 6:06 GMT+00:00 Stefan Pfeiffer notifications@github.com:

@tangrammer I version the cryogen directory separately and .gitignore the
resources dir

tangrammer notifications@github.com schrieb am Mo., 19. Jan. 2015
22:28:

@dl1ely https://github.com/dl1ely But in this case, how do you keep
tracked your new .md files that probably you are working on but yet they
aren't ready to be published?


Reply to this email directly or view it on GitHub
<
https://github.com/cryogen-project/cryogen/issues/36#issuecomment-70564061>

.


Reply to this email directly or view it on GitHub
#36 (comment)
.

@dl1ely

This comment has been minimized.

Show comment
Hide comment
@dl1ely

dl1ely Jan 20, 2015

Contributor

I will try as soon as my time allows…

tangrammer notifications@github.com schrieb am Di., 20. Jan. 2015 09:01:

Stefan, could you specify this last part and full github flow for future
users?
Then, we could compare with my trick, I think it will help a lot!
Thanks

2015-01-20 6:06 GMT+00:00 Stefan Pfeiffer notifications@github.com:

@tangrammer I version the cryogen directory separately and .gitignore
the
resources dir

tangrammer notifications@github.com schrieb am Mo., 19. Jan. 2015
22:28:

@dl1ely https://github.com/dl1ely But in this case, how do you keep
tracked your new .md files that probably you are working on but yet
they
aren't ready to be published?


Reply to this email directly or view it on GitHub
<

https://github.com/cryogen-project/cryogen/issues/36#issuecomment-70564061>

.


Reply to this email directly or view it on GitHub
<
https://github.com/cryogen-project/cryogen/issues/36#issuecomment-70608879>

.


Reply to this email directly or view it on GitHub
#36 (comment)
.

Contributor

dl1ely commented Jan 20, 2015

I will try as soon as my time allows…

tangrammer notifications@github.com schrieb am Di., 20. Jan. 2015 09:01:

Stefan, could you specify this last part and full github flow for future
users?
Then, we could compare with my trick, I think it will help a lot!
Thanks

2015-01-20 6:06 GMT+00:00 Stefan Pfeiffer notifications@github.com:

@tangrammer I version the cryogen directory separately and .gitignore
the
resources dir

tangrammer notifications@github.com schrieb am Mo., 19. Jan. 2015
22:28:

@dl1ely https://github.com/dl1ely But in this case, how do you keep
tracked your new .md files that probably you are working on but yet
they
aren't ready to be published?


Reply to this email directly or view it on GitHub
<

https://github.com/cryogen-project/cryogen/issues/36#issuecomment-70564061>

.


Reply to this email directly or view it on GitHub
<
https://github.com/cryogen-project/cryogen/issues/36#issuecomment-70608879>

.


Reply to this email directly or view it on GitHub
#36 (comment)
.

@dl1ely

This comment has been minimized.

Show comment
Hide comment
@dl1ely

dl1ely Mar 4, 2015

Contributor

I am very late on this one, but i wanted to deliver:
http://dl1ely.github.io/posts/2015-03-04-how-to-use-cryogen-with-github-pages.html

Sorry.

Contributor

dl1ely commented Mar 4, 2015

I am very late on this one, but i wanted to deliver:
http://dl1ely.github.io/posts/2015-03-04-how-to-use-cryogen-with-github-pages.html

Sorry.

@yatesco

This comment has been minimized.

Show comment
Hide comment
@yatesco

yatesco Sep 25, 2016

hi @dl1ely - just a note to say the URL points to a 404 on GitHub Pages. Irony abounds :-).

yatesco commented Sep 25, 2016

hi @dl1ely - just a note to say the URL points to a 404 on GitHub Pages. Irony abounds :-).

@dl1ely

This comment has been minimized.

Show comment
Hide comment
@dl1ely

dl1ely Sep 26, 2016

Contributor

@yatesco You are right. The internet is a volatile medium. A abandoned cryogen some time ago for hubpress, moved over some posts by hand (but not all, especially not the cryogen ones), and the URLs are different. Sorry for that.

Contributor

dl1ely commented Sep 26, 2016

@yatesco You are right. The internet is a volatile medium. A abandoned cryogen some time ago for hubpress, moved over some posts by hand (but not all, especially not the cryogen ones), and the URLs are different. Sorry for that.

@derHowie

This comment has been minimized.

Show comment
Hide comment
@derHowie

derHowie Jan 4, 2017

@dl1ely But in this case, how do you keep tracked your new .md files that probably you are working on but yet they aren't ready to be published?

I ran into this issue while trying to publish my blog to github using cryogen. dl1ely's explanation is no longer available, but I figured out a pretty simple solution to the question posed above and thought I would share it in case anyone else stumbles upon this as I did.

In config.edn you can specific :ignored-files. If you just come up with a naming convention for markdown files that aren't ready to be published, you can ignore your work-in-progress files using a regex.

By adding #"[\-\w\d]+(wip\.md)" to the :ignored-files, for example, I can name a post 2017-01-03-wip.md and it will not be added to cryogen's generated files if I need to make an update to an existing file and commit it to github. (any file in this case ending with wip.md will not be added to generated files)

derHowie commented Jan 4, 2017

@dl1ely But in this case, how do you keep tracked your new .md files that probably you are working on but yet they aren't ready to be published?

I ran into this issue while trying to publish my blog to github using cryogen. dl1ely's explanation is no longer available, but I figured out a pretty simple solution to the question posed above and thought I would share it in case anyone else stumbles upon this as I did.

In config.edn you can specific :ignored-files. If you just come up with a naming convention for markdown files that aren't ready to be published, you can ignore your work-in-progress files using a regex.

By adding #"[\-\w\d]+(wip\.md)" to the :ignored-files, for example, I can name a post 2017-01-03-wip.md and it will not be added to cryogen's generated files if I need to make an update to an existing file and commit it to github. (any file in this case ending with wip.md will not be added to generated files)

@lacarmen

This comment has been minimized.

Show comment
Hide comment
@lacarmen

lacarmen Jan 4, 2017

Member

You can add a :draft? key to your post metadata and set it to true to flag a post as a draft. It won't be included in the compilation process. (Docs here)

Alternatively, a PR was recently submitted and it enables you to set a :hide-future-posts? key to true in the config.edn to have only current and past posts be included in the compilation process. (Docs here)

Member

lacarmen commented Jan 4, 2017

You can add a :draft? key to your post metadata and set it to true to flag a post as a draft. It won't be included in the compilation process. (Docs here)

Alternatively, a PR was recently submitted and it enables you to set a :hide-future-posts? key to true in the config.edn to have only current and past posts be included in the compilation process. (Docs here)

@derHowie

This comment has been minimized.

Show comment
Hide comment
@derHowie

derHowie Jan 4, 2017

@lacarmen that's much more straight-forward. Thanks for the reply. I should read the docs more carefully before interjecting!

derHowie commented Jan 4, 2017

@lacarmen that's much more straight-forward. Thanks for the reply. I should read the docs more carefully before interjecting!

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