Markdown and links

Ok, quick update. I just read the article in your link and it explained things even further. I fiddled around and made my link a relative one and it works perfectly! I’ll continue creating more pages and more relative links and hope it all works out.

Now, when I start creating my galleries with the other software, it’ll make all the necessary folders and files. In DW, I would simply link my web page text to the index.htlm file created in my gallery, and that would allow the link from my web page to bring up my image gallery in a new window. Would I simply do the same with RW? And I imagine I’d create separate folders to organize all my different galleries in the same folder as where I keep my RW site file?

Markdown by default doesn’t support a link opening up in a new tab/window.
However one of the beauties of MarkDown is you can put HTML inline as is.
So instead of using a markdown styled link with the [ ]( ) syntax you would use the HTML anchor tag <a> itself.

So a link to apple would look like this:
<a href="https://apple. com">A link to Apple</a>
That not marked as code would look like this(remember this forum uses markdown):
A link to Apple

If you want the link to open in another window you could add the target attribute to the anchor tag:
<a href="https://apple.com" target="external">A link to Apple</a>
The target can be any name you want or target="_blank". Here is some more information on new window links here:

1 Like

Hello Doug!
Thank you for the link and info! It’s funny that, coming from DW, I get a simpler site builder and I’m already doing more code than I ever did with DW, lol.

Well, I figured out the Markdown linking to internal pages, so this is the next step.

However since I won’t be needing other web pages to pop open on a new page, I’ll need to set my html to open another file within my site. So does this mean that in place of a web address, I’d need to input my file hierarchy that leads to the index page of my web gallery?

And just as FYI, in DW, when I’d link to a gallery, I’d choose “_new” as the default opening instruction, and it’d act the same way as the _blank that you mentioned.

Meanwhile I’m going to bookmark that html lesson, it’s got tons of info and well done.

Thanks again, you’re really helping. Sorry if I’m asking so much, but coding manually is something I didn’t need to do before.

Technically there’s no such HTML keyword “_new”.

My guess is that it works because the browser would treat it as a named window. If you use the keyword “_blank” the browser should force a new tab or window with each click.
If you click a link with a named link like “external” or any name, the browser should look for a window or tab with the same name, if it finds that window it will use it. If the window or tab with that name doesn’t exist it should create a new one and name it.

If you have one or hundreds of links to different URL’s and they use a target attribute with the same name they all will use the same window to open in.

Most UX (users experience) folks suggest that you limit using the target to open new windows. Let the user decide (right click or long press on touch) what to open in new tabs or window.

I’m not sure if I follow what you’re asking. You mentioned a gallery app that you need to link to, is this a separate domain?

Is it a single URL or are you linking to different pages?

Ok good to know. I used to have galleries open in new as I figured at least users can continue browsing by simply closing the new window and not keep using “back” button.
I’ll rethink that when I make my galleries.

I guess the “_new” in DW was proprietary to that app, as each new gallery I’d click on would open in a new tab; you can try it on my site.

Either way, I may take your advice and have one tab accommodate all galleries that’d get clicked on.

Sorry if I wasn’t clear about my galleries. I use an app called jAlbum that automatically creates my galleries. It creates the thumbnails, larger images, watermarks, all the nav elements… everything. All I’m left to do is link to the index.html page that will lead users to view my images.

I created folders within my site folder to hold all those galleries, organized by category.

So when I’d populate my web pages with links, I’d click to browse my file path that would lead to that index.html file. That’s what I meant. I don’t link to the app in any way, I only use the app to make up the galleries. After that, it’s a question of inputting the path to the index file.

I hope I’m clear enough? Otherwise this evening I can send you a screenshot showing what I mean.

Thank you again!!

I’m not very familiar with jAlbum, but it looks to be a pretty cool app.

So if you’re publishing to subfolders on the same domain then you can use relative links to those pages just like any other page. However, and a big however, is that the relative links won’t work until the pages are published. They don’t exist in RapidWeaver so you can’t test them prior to publishing them.

You can use absolute links if you want to be able to test the links in RapidWeaver preview or simulator.

So if the jAlbum gallery is in a subfolder you could use a full absolute URL to link to the galleries pages.

If you can link to the published page in the gallery you want to link to just bring it up in the browser and copy the address from the address bar.

This may help you out…

2 Likes

Hello Doug,

Sorry for my delayed reply, but I spent the last few days compiling all my data and creating all the web pages I need for all the galleries I’ll be including on my site.

So, further to your question regarding how/what I’m linking to, please see below:

I’ve attached three images - one showing one of my webpages, the second showing my folder setup with my RW8 website project and the other showing the file hierarchy of a typical gallery.

So basically I need to create a link from the highlighted text on my web page to the “index” file that’s created in every gallery I make in the other app I use, jAlbum.

In fact, all the files you see on the left side of the screenshot are what the app creates in making the gallery. At the top is the location of those files on my local drive. The black arrow points to the folder where I saved my RW8 website and all the folders that will hold the galleries I create.

I’ll be creating hundreds of these galleries for all the events I’ve shot since 2004, so once I learn to link these properly I’ll be repeating it many times.

On all my webpages, I used Markdown for the text I’ll link from (with bullets) and plain text for the column next to it (location). The location column will not be part of the linked text, just the bulleted text will be.

You mentioned that Markdown allows for html to be inserted directly, so I’d like to know if you could advise on what my html link reference would be for the galleries. I understand that the reference will be different for every gallery I make, but basically I’d need to know the full structure of the html so that I can modify it as needed to link different page text to each gallery I create.

Thank you again and I appreciate your patience and time in helping me! :slight_smile:

Paolo

Here is a sample:


As far as I can see this is then only way in markdown to open a new window.

1 Like

Markdown allows you to use any HTML that You want. What most people call a “link” in HTML is really called an anchor or an a tag.
https://www.w3schools.com/tags/tag_a.asp

I’m assuming that you decided to go with the open into a new page option?

Looking at the screenshots you gave it’s difficult to give you a perfect relative address.

It appears that the link is on a sub-page (within a page called gallery)?

Then there’s a directory called ”album” that contains the index.html that you want to link to? Is that directory at the same level as the gallery directory? I don’t see where that directory is in the screenshot.

It would be easier to help you if you could give me different finder view (columns view) in the screenshots, starting at the root directory.

But to give you an example, if you are on a page that’s a sub-page of a page called gallery and you want to link to a page called album that’s at the same level as gallery.

From where you start you need one pair of .. to get you up to the same level as the gallery page. The you would need to go to the album directory from there. ../album/index.html

If the album directory is in a sub-directory called albums then you simply go to that directory ../albums/album/index.html

Of course you can use absolute addresses
https: //example.com/albums/album/index.html

Keep in mind that addresses are the published addresses. The page names on the left have nothing to do with the folder(directory) names.

1 Like

Thank you Joe.

This is what I attempted this evening but it doesn’t seem to work. At this point I know there’s obviously something missing/not coded correctly, and I’m stumped as to what it is.

I’ve never needed to code before (DW did everything) so this is all new.

Therefore, with the images I posted yesterday showing my file hierarchy, plus this one showing what I tried, is someone able to point me in the right direction?

What am I missing/doing wrong?

Thank you!

Do you have the files uploaded to your web server?

Can you post the html code here and not just a screenshot of it? (After pasting it in the editor, highlight it and click the “code” button above in the editor.)

Take a look at this…
http://www.ibize.com/MDtest.rw8.zip
you can test it by previewing page in safari…from the menu.

Or you could just do it in Styled text and use the dropdown…no code needed!

Hi Joe - thank you.

I had another look at it and after comparing to the link you sent me, I realized I had left the single quote that comes up when you click to insert html code in Markdown.

As soon as I deleted the quotes, the link came up as expected! The only thing is I get a 404 page error when I click the link as I test the page in Safari. I guess this may be due to the fact that the site and the gallery folder haven’t been uploaded to the host server?

At the very least I’m really happy that I got the correct link structure down - now I just need to copy and modify it multiple times as I continue creating more galleries to populate all my page links.

I hope I’m on the right path, as I’m really anxious to delete my old site and upload this one and get it slowly rolling :slight_smile:

Thanks again!

No problem

Those aren’t single quotes, they’re often called backticks or back quotes( they lean backwards). They have special meaning in Markdown. The </> button is not for inserting HTML into MarkDown but is used to mark the text as code. This allows you to display things like HTML and JavaScript without executing the code.

When you insert HTML in markdown you just put it in, don’t mark it.

You can mark complete blocks called code blocks.

If you want a really good video course on markdown checkout Wes Bos mastering markdown. It’s about a half-hour long, is broken down into small chapters so it’s a great reference for review and done by a professional instructor. Best of all it’s free…

4 Likes

Thank you Doug!

I’ll try checking out the video this evening.

Sorry if I sound dumb but this is unknown territory for me; I’m surprised by how much I’ve already taken in since getting RW just a couple of weeks ago.

So, so far what I’ve done is correct? When I left those back ticks in, the link didn’t appear, but when I did remove them it seemed to work.

If it’s so far so good, at least I know I can continue with making my new photo galleries and linking accordingly.

I appreciate all your help :grinning:

When I upload my site folder to my host server, I upload it as-is? In other words, the RW file will be recognized when visitors visit my url?
I ask because with DW, I needed to name my welcome page as index.html and have it in the root of the folder to be “seen”. Instead, in RW, there’s just one file that contains all my web pages and it’s there-in that my confusion lies.

Thank you!

You need to publish to a local folder (older RW versions it was export)

Then you upload the contents of that folder. (Not the folder it’s self)

That one file is the RW project file, not the actual site files, those are created on publish.

Why don’t you just publish directly from RW?

Hi Scott,

Nice to hear from you.

I guess I can publish through RW, but either way I’ll have several other folders to upload as I’ll have image galleries that I’ll have created via another app. Attached is an image of what my site folder contents looks like on my drive.

I’ll be producing many galleries that I’ll organize in these various folders and I’ll link each gallery to the appropriate text on my web pages.