website: Fixed pagination issue in learning gem5 section

Change-Id: If3149034190eab78df1acdc3f5f4a8a86967dbe5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5-website/+/31234
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: Bobby R. Bruce <bbruce@ucdavis.edu>
diff --git a/_layouts/documentation.html b/_layouts/documentation.html
index ea8809b..8dc6c37 100644
--- a/_layouts/documentation.html
+++ b/_layouts/documentation.html
@@ -72,15 +72,12 @@
       {% endif %}
     {% endif %}
   {% endfor %}
-
-
   <div class="navbuttons">
-    {% if previous != "none" %}
-      <a href="{{ previous | prepend: site.baseurl }}"><button type="button" class="btn btn-outline-primary">PREVIOUS</button></a>
+    {% if page.previous.url %}
+      <a class="prev" href="{{page.previous.url}}"><button type="button" class="btn btn-outline-primary">PREVIOUS</button></a>
     {% endif %}
-
-    {% if next != "none" %}
-      <a href="{{ next | prepend: site.baseurl }}"><button type="button" class="btn btn-outline-primary">NEXT</button></a>
+    {% if page.next.url %}
+     <a class="next" href="{{page.next.url}}"><button type="button" class="btn btn-outline-primary">NEXT</button></a>
     {% endif %}
   </div>
 </div>