I have a blog/index.html file with a list of blog posts and excerpts. once i click on a blog post, it opens up in a new page in its entirety.
I would like to place a "back" button at the end of each post that should go back at the last page you visited.
is there a liquid tag to achieve this?
Unfortunately there is no liquid tag that you can use. However, you have a choice of placing a link with static destination link like this:
Back
Or you can use javascript to take user to the previously visited page
<a onclick="window.history.back()">Back</a>
If you want to go back to the site root (edit, thanks coatless). This works.
With markdown:
[Back]({{ site.url }}/)
With HTML:
<a href='{{site.url}}/'>Back</a>
Also check out: https://jekyllrb.com/docs/pagination/
Related
I've been using hashtag(#) with navigation menu button links, to avoid error. When you are using # you can just click on the link button and it does nothin'. Now I want to get real urls of my site. I can copy like facebook site's url, github site's url and make it as a link button on my site, but I want to have my own website's link. for EX: when you click "About me" button and new page appears on the screen and it's all about me (not blankpage) :D do I need to create another html document?. please help! SOS! THANK YOU!
I am working with mining some links from a Chinese academic article database.
It appears that when I refresh the page to an article I'm looking at, or simply copy and paste a url, the url redirects to the database's home page rather than the article.
For example, the following link goes to my search results:
http://search.cnki.net/search.aspx?q=%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD
The first article's individual url is:
http://www.cnki.net/kcms/detail/detail.aspx?dbcode=CJFQ&dbName=CJFQ2016&FileName=KJDB201615009&v=&uid=
However, if you try to directly click on the article link or refresh the article page, it redirects to the database home page. Why is this happening? Is there any way to get a "stable" url to these articles?
One detail that may matter, although I'm not sure, is that the url in the HTML code to the individual articles is also different.
<a href="http://epub.cnki.net/grid2008/brief/detailj.aspx?filename=KJDB201615009&dbname=CJFDLAST2016" target="_blank">
It's not really up to you.
The website you are referring checks if the link you are opening is a direct link or was opened from another page on the same website.
This is probably to prevent embedding links of this website in other websites.
In short, it does not allow direct links to its articles.
You can see it by examining the header returned from the request.
Instead of 200 OK you get 302.
Which tells the browser to redirect to another location.
You can try and fool the website by adding a "Referer" header to your request.
If you look at the header
that works you'll see that there is one.
I did not try but I'm pretty sure it will work.
I have built a simple java-web application.
The website has three pages ("index.jsp", "info.jsp" and "contact.jsp").
When you are on the index page you can go to the nav-bar and click on "info" or on contact and then you go to the respective page.
Here's, e.g., the link leading to the contact page:
Contact
The crazy thing is this:
When you click on the link to the index-page, it doesn't work - so you don't come back to the main-page.
Here's the code for the link:
Welcome
What is supposed to be wrong with this code???
I'm trying to do something that I thought would be really simple but I can't make it work.
My bookmark anchors work fine if I'm on the home page but the same links in the header of my page don't work if the # part refers to the home page:
Some Link Text
It works if I have some sort of page name, but doesn't work for the home page. (i.e. this works: Some Link Text)
Of course if the href is just / it works fine.
So how the heck does one link to a bookmark in the home page from another page?
Thanks!
I'm putting a simple href link inside my html page:
http://search.mastertour.co.il/?mode=page&page=12077&lang=rus
the link can be found at the bottom of the page near the cleopatra head image.
Now, while the page is in a subdomain, the link referes to a TLD but the page cannot redirect to the link. It shows a "half-baked" page while trying to access the link directly (not through the html link) shows the page fine.
Any idea???
Get rid of the window.open(), this is all you need:
здесь
I'm guessing it has something to do with the onclick attribute you have attached. Do you really need it? Also, i'm guessing you're using it to force that link to open in a new tab/window - you really shouldn't, as the user should have that kind of control.