fongandrew / hydeout

A refreshed version of Hyde for Jekyll 3.x and 4.x
https://fongandrew.github.io/hydeout/
Other
591 stars 744 forks source link

Added support for 'back' links automatically added on pages above and… #104

Closed mkosmul closed 3 years ago

mkosmul commented 3 years ago

… below the main content when a *.md file is referenced in back_page page property

bbatsov commented 2 years ago

@mkosmul How is this supposed to be used exactly? I noticed back arrows in my pages (at the top and the bottom), but they just point to the current page by default which makes them useful.

bbatsov commented 2 years ago

It seems that this check is not working properly:

{% if back_page != null %}

As I haven't set a back page, yet still this template this getting rendered.

mkosmul commented 2 years ago

@bbatsov This is strange. maybe page.back_page was set in the template, or there was a name clash for some other reason? The way it's supposed to work is that the arrow does not appear if you don't set page.back_page. The value of this variable should be another page's name (the page object is found with site.pages | find: "name", page.back_page)

bbatsov commented 2 years ago

I grepped in the code of my site https://github.com/bbatsov/think.batsov.com, but I don't see any references to back_page. I tried setting this manually via the page metadata, but this doesn't work either (see https://github.com/bbatsov/think.batsov.com/commit/d3a02961aabcbab9981b51bcb1f13ed77bf9736f). Now I'm extra puzzled.