Closed jtmoulia closed 8 years ago
Using an absolute directory prevents the relative path returned by op/generate-uri from resolving relative to the current buffer. This is an issue since the string-to-file is called while visiting each to be published site file.
op/generate-uri
string-to-file
For example, let's take:
(setq op/category-config-alist '(("blog" ...) ("index" ...))) (op/do-publication t nil "_build" nil)
Results in a _build folder being created under the root directory and the blog directory:
_build
blog
~/repos/jtmoulia.github.io-org-page $ tree -L 2 . |-- LICENSE |-- README |-- _build | |-- about | |-- assets | |-- blog | |-- index.html | |-- media | `-- tags |-- _buildrss.xml |-- about.org |-- assets | `-- img |-- blog | |-- _build | |-- about-ob-elixir.org | |-- distrib-seq-diagram.org | |-- elixir_call_with_parens.org | |-- elixir_distel_basics.org | |-- intro_to_spell.org | |-- neotomex-intro.org | |-- norse_ipviking_map.org | `-- switchboard.org |-- index.org `-- jtmoulia-config.el
Good point re the path not working -- I updated the fix to use expand-file-name so it'll correctly expand paths, e.g. ~/.op_tmp or ./_build.
expand-file-name
~/.op_tmp
./_build
Thanks for your fix, merged!
Using an absolute directory prevents the relative path returned by
op/generate-uri
from resolving relative to the current buffer. This is an issue since thestring-to-file
is called while visiting each to be published site file.For example, let's take:
Results in a
_build
folder being created under the root directory and theblog
directory: