acrylamid icon indicating copy to clipboard operation
acrylamid copied to clipboard

acrylamid does NOT respect OUTPUT_DIR = './' with WWW_ROOT with subdirectory

Open ghost opened this issue 11 years ago • 9 comments

I have

WWW_ROOT = 'http://xavimat.github.io/piblog/'

and

 OUTPUT_DIR = './'

(see https://github.com/xavimat/piblog/blob/gh-pages/conf.py) but acrylamid make a subdirectory /piblog/ in which I have all the contents, so it does not respect the OUTPUT_DIR variable.

ghost avatar May 30 '13 15:05 ghost

No, that's the intended behavior. This way you can preview on "localhost:8000/" and browse "piblog/" and see that the generated content works properly. If you set OUTPUT_DIR = "foo/" and WWW_ROOT = 'example.tld/bar', you have to rsync foo/bar myserver:~/bar/.

posativ avatar May 30 '13 15:05 posativ

rsync? That's my situation: I have a directory with contents '/home/xan/foo'. I want to generate contents in 'foo' and upload contents to github to http://xavimat.github.io/piblog/. How can I do?

ghost avatar May 30 '13 15:05 ghost

I think with OUTPUT_DIR = "piblog/"

~> pwd
/home/foo/work
~> acrylamid init .
...
~> git init .
~> git add piblog/

you are able to publish your blog to a subdirectory on github.

posativ avatar May 30 '13 15:05 posativ

I just need that

 env.netloc = 'http://xavimat.github.io/piblog/'

and

   OUTPUT_DIR = './'

Can I set that and not touch WWW_ROOT (equals to 'localhost:8000' for seeing it locally)?

All I put in '/home/foo/work' will be in http://xavimat.github.io/piblog/ not in http://xavimat.github.io/

ghost avatar May 30 '13 17:05 ghost

Jekyll has the same problem: https://github.com/mojombo/jekyll/issues/332

ghost avatar May 30 '13 18:05 ghost

This could be circumvent using this receipt:

  1. ~> git submodule add -f -b gh-pages https://github.com/xavimat/piblog.git sortida/piblog/
  2. In conf.py put: OUTPUT_DIR = './sortida/' and WWW_ROOT = 'http://xavimat.github.io/piblog/'
  3. acrylamid co
  4. ~> git add -A
  5. ~> git commit -m "..."
  6. ~> git push -u origin master
  7. ~> cd sortida/piblog
  8. ~> git add -A
  9. ~> git commit -m ".."
  10. ~> git push -u origin gh-pages

ghost avatar May 31 '13 14:05 ghost

Jekyll has the same problem: mojombo/jekyll#332

Now I understand the real issue with GH pages. The main issue is that you can not publish the site without knowing the actual path (and domain). I'll try to document your workaround/or write a quick howto on GH pages (without CNAME).

posativ avatar May 31 '13 16:05 posativ

Thank a lot, posativ, good documentation implies good use, even better than good code ;-) I don't know if you could close this issue. At your opinion, could you improve acrolamyd for fix this issue or it's a "documentation bug"?

ghost avatar May 31 '13 18:05 ghost

I'll leave this issue open, maybe there's a reasonable workaround.

posativ avatar Jun 01 '13 18:06 posativ