Hi again, 

and thanks for your help, but I found it easier to just write a
before-end publish hook, which rewrites html links in the second
directory. Problem solved.

(muse-derive-style "html-one" "html"
                   :maintainer "[email protected]")

(muse-derive-style "html-two" "html"
                   :maintainer "[email protected]"
                   :before-end 
'my-muse-rewrite-html-links-to-point-to-same-directory
)

(defun my-muse-rewrite-html-links-to-point-to-same-directory ()
  "rewrite links in current buffer: <a href=\"../one/PageOne.html\"> -> <a 
href=\"PageOne.html\">"
  (goto-char (point-min))
  (while
      (re-search-forward "<a href=\"../one/" nil t)
    (replace-match "")
    (muse-insert-markup "<a href=\"")
))



On Mon, 2010-02-08 at 08:27 +0100, Alex Ott wrote:
> Hello
> 
> Baranyi Péter  at "Sun, 07 Feb 2010 23:37:18 +0100" wrote:
>  BP> Thank you for your comments but unfortunately this does not work for me.
>  BP> I changed the index page to:
> 
>  BP>  - [[PageOne]]
>  BP>  - [[PageTwo]]
>  BP>  - [[./PageOne]]
>  BP>  - [[./PageTwo]]
> 
>  BP> and all links still point to the one directory:
> 
>  BP> <a href="../one/PageOne.html">./PageOne</a>
> 
>  BP> But interestingly, if i use a [[./PageOne]] to a muse source file that
>  BP> is in another directory, then the result is:
> 
>  BP> <a href="./PageOne">./PageOne</a>
> 
>  BP> So it works in this case but the file extension is missing. Any help
>  BP> please?
> 
> The main idea, that you should use relative file names, instead of just
> page names.  For example, to point to file in other directory, you need to
> put name like [[../other-dir/File]], etc.  You can look to sources of my
> site - http://alexott.net, if you'll replace .html with .muse, then you'll
> see source code of it
> 
-- 
Baranyi Péter <[email protected]>


_______________________________________________
Muse-el-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/muse-el-discuss

Reply via email to