0

I've just started using the ABlog plugin for sphinx to create a static-site blog.

Is it easy to change ablog deploy to deploy to a different location, e.g. ../username.github.io/ instead of ./username.github.io/?

I have my ABlog project under source control in a git repository. Creating my username.github.io inside the current ABlog project creates a repo inside a repo and this causes errors (also I don't want to store the built site along with the ABlog repository -- although I could add a .gitignore).

das-g
  • 9,718
  • 4
  • 38
  • 80
isedwards
  • 2,429
  • 21
  • 29
  • Could someone create a `ablog` tag in Stack Overflow (or does it already exist and I'm missing it?) – isedwards Oct 11 '15 at 08:50
  • 1
    Have you already tried the instructions at http://ablog.readthedocs.org/manual/deploy-to-github-pages/ ? – das-g Oct 11 '15 at 09:03
  • Yes (I've also asked the question there) - from the instructions it looks like the location of the deployment folder is always hard-corded to be in the root of the ablog project. – isedwards Oct 11 '15 at 10:41

1 Answers1

1

Is it easy to change ablog deploy to deploy to a different location, e.g. ../username.github.io/ instead of ./username.github.io/?

For ABlog ≥ 0.8.0, yes

For ablog-0.8.0 and above, you can use the -p option to specify a github repo location other than the default (<location of conf.py>/<your username>.github.io):

ablog deploy -p /the/path/for/your/local/github/pages/repo

i.e., in your case

ablog deploy -p ../username.github.io/

How to install the most recent ABlog version

Until version 0.8.0 is available on pypi, you can tell pip to install ablog directly from git:

pip install git+https://github.com/abakan/ablog.git

For Ablog < 0.8.0, no

For versions prior to 0.8.0, the old version of this answer applies:

With the current implementation of ABlog-internal function ablog_deploy, the location of the target repository cannot be changed:

String gitdir (holding the path where the local repository will be created) is set to

<confdir>/<github_pages option>.github.io but the `github_pages` option is also [used to choose the remote

repository](https://github.com/abakan/ablog/blob/0ed765d95a23ad7dce48c755773ac60dd08cf319/ablog/commands.py#L338), so passing something else than the GitHub account name will make the process fail.

Manipulating confdir would be difficult and would result in the configuration file not being found and probably a bunch of other side effects.

However, if you're willing to modify ABlog's source code, it would not be hard to adapt the assignment of gitdir as you see fit (maybe introducing another option) to produce the decided effect. (E.g., make it use confdir if your new option hasn't been set, and have it use your new option instead if that option has been set.)

das-g
  • 9,718
  • 4
  • 38
  • 80
  • The ablog author has just added a [`-p`](https://github.com/abakan/ablog/commit/cb741637cade0d4f58b3efb1e122ea864d10c145) option to specify a path for use with `ablog deploy`. See discussion [here](http://ablog.readthedocs.org/manual/deploy-to-github-pages/#comment-2301946904). This is available in ablog-0.8.0 and above. – isedwards Oct 12 '15 at 08:21