One of the things I'm coming up against. Maintaining a non-small
web site with many internal links is a pain.
Consider:
Suppose that at one point I have
site/
Images
Business
Home
...
Later the site gets more complex, and Images has a bunch of sub
directories.
site/
Images
header_rotate
inventory_pix
misc
Business
Home
When this happens I have to change the link for every pic
on every page. If I use an image in 6 places, I have to
change it in 6 places.
HOWEVER
Suppose I cleverly used the footnote form of links.
I.e:
[Image alt text][LABEL]
Suppose that markdown was clever enough to reference an external
file (in .markdownrc of course) for the resolution of LABEL.
NOW when I re-arrange the universe, I only have to change the
reference in this one file, NOT in every file that references it.
> Suppose that markdown was clever enough to reference an external > file (in .markdownrc of course) for the resolution of LABEL. > > NOW when I re-arrange the universe, I only have to change the reference in > this one file, NOT in every file that references it.Good idea to tokenize URL paths and what not, but it isn't Markdown's job to transform them for you ;). You'll want to pre-process those with your own script, then do your Markdown transforms. LQ
On 20 Apr 2008, at 00:28, Sherwood Botsford wrote:> [...] > Suppose that markdown was clever enough to reference an external > file (in .markdownrc of course) for the resolution of LABEL.Here?s a simple shell script to convert all markdown to HTML and using a shared references file: cd ~/MySite/pages for f in *.mdown; do cat "$f" references|Markdown.pl > "../html/${f%.mdown}.html" done I use something like that myself where I also have a command to update my references list, that is, grep through the pages for undefined references and add these to the references file (where I will then need to add the URI).
Pandoc concatenates input from all files specified on the command
line. So you can just do:
pandoc myfile.txt refs.txt > myfile.html
Seems to me that this would be a reasonable default behavior for
Markdown.pl as well, but it doesn't seem to work that way now.
John
+++ Sherwood Botsford [Apr 19 08 16:28 ]:> One of the things I'm coming up against. Maintaining a non-small
> web site with many internal links is a pain.
>
> Consider:
>
> Suppose that at one point I have
>
> site/
> Images
> Business
> Home
> ...
>
> Later the site gets more complex, and Images has a bunch of sub
> directories.
> site/
> Images
> header_rotate
> inventory_pix
> misc
> Business
> Home
>
> When this happens I have to change the link for every pic
> on every page. If I use an image in 6 places, I have to
> change it in 6 places.
>
> HOWEVER
>
> Suppose I cleverly used the footnote form of links.
>
> I.e:
>
> [Image alt text][LABEL]
>
> Suppose that markdown was clever enough to reference an external
> file (in .markdownrc of course) for the resolution of LABEL.
>
> NOW when I re-arrange the universe, I only have to change the reference
> in this one file, NOT in every file that references it.
>
> _______________________________________________
> Markdown-Discuss mailing list
> Markdown-Discuss at six.pairlist.net
> http://six.pairlist.net/mailman/listinfo/markdown-discuss
>