Incorrect footer navigation on my Vuepress website

I'm in the process of developing a vuepress single page application for showcasing and providing downloads of my personal game projects.

When it comes to website navigation, I am aiming to utilize the native sidebar exclusively. This sidebar will have main categories like 'News' or 'Games', each linked to its own .md file. Within the 'Games' section, I would like the ability to collapse and display individual games as separate .md files rather than just headings. Here is a rough outline of what I have so far:

https://i.sstatic.net/vjR0X.png

In order to achieve this layout, I have included the following snippet in my config.js:

    sidebar: [
        {
            title: 'News',
            path: '/',
        },
        {
            title: 'Games',
            path: '/games.html',
            children: [
                {
                    title: 'Game1',
                    path: '/games/game1.md',
                }
            ]
        },           
    ]

As shown above, I created 'games.md' for the 'Games' section and established a directory where I store 'game1.md' for 'Game1' as a sub-category.

However, my current issue is that when I click on 'Game1' at the bottom, it redirects me back to 'News' instead of 'Games':

https://i.sstatic.net/jmD02.png

What I actually want is for clicking on 'Game1' to redirect me to 'Games' instead of 'News' when viewed from within that specific game.

How can I resolve this problem? Is Vuepress suitable for the requirements of my project?

Answer №1

The hyperlinks located at the bottom of each webpage are known as prev-next-links within VuePress. You have the ability to manually override these links on a per-page basis using Frontmatter.

---
prev: ./different-page
next: false
---

In VuePress 1.3.0, you can even customize them to point to external sites.

---
prev: true
next: https://vuepress.vuejs.org/
---

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the method to utilize the process.env object from within an imported npm package in the importing class?

In my React app, I used dotenv to set process.env variables for each component. When all components were in the same source code repo and imported via '../component/component_name', accessing these variables was easy using process.env.variable_na ...

Click on the button to sort Angular data

Greetings! I am a newcomer trying to grasp the concepts of angularjs/typescript. I have compiled an array of fruits, displayed in an unordered list. My goal is to arrange them in descending order and implement a reverse search function to display the item ...

AngularJS modal directives trigger a reset of $scope variables

I am developing a custom AngularJS application that needs to handle and store all the checkbox selections made by the user in a simple array of IDs. The functionality includes displaying a modal when the open button is clicked, allowing the user to perform ...

Tips on handling jsonp responses in CakePHP without using the .json extension

When working with CakePHP, the framework determines the data type to return by either checking for the presence of the .json extension in the URL or examining the Accepts HTTP header. It becomes a bit trickier when dealing with JSONP, as it doesn't a ...

Developing a custom CSS for React using clamp and focus attributes

I'm currently working on creating an object to be used in inline style, but I'm having trouble figuring out how to correctly write `clamp` and `after`. const PhoneInputStyle = { fontSize: clamp("13px", "1.111vw", "16px"), /*this particular ...

Executing an http.get request in Angular2 without using RxJS

Is there a method to retrieve data in Angular 2 without using Observable and Response dependencies within the service? I believe it's unnecessary for just one straightforward request. ...

What is the best way to specifically target and style a component with CSS in a React application?

I'm facing a small issue with the React modals from Bootstrap in my application. In index.html, I include the following: <link rel="stylesheet" href="/assets/css/bootstrap.min.css"> <link rel="stylesheet" href=& ...

Production server experiencing Vue CLI white screen issue

After setting up Vue with webpack and router, I proceeded to install npm and run my application in dev mode on my local server. vue init webpack vue-project npm install npm run dev Everything worked perfectly during testing, but when I deployed my projec ...

Am I going too deep with nesting in JavaScript's Async/Await?

In the process of building my React App (although the specific technology is not crucial to this discussion), I have encountered a situation involving three asynchronous functions, which I will refer to as func1, func2, and func3. Here is a general outline ...

Issue with retrieving URL parameters in Nextjs during server side rendering

Currently, I'm attempting to extract the request query, also known as GET parameters, from the URL in server-side rendering for validation and authentication purposes, such as with a Shopify shop. However, I am facing issues with verifying or parsing ...

Turn off automatic zooming for mobile device input

One common issue observed in mobile browsers is that they tend to zoom in on an input field or select drop-down when focused. After exploring various solutions, the most elegant one I came across involves setting the font-size of the input field to 16px. W ...

Is there a way to specifically target CSS media queries if the device resolution is similar, but the device screen size (measured in inches) varies

I possess two distinct gadgets. 1. T2 light - LCD : 15,6“ Resolution : 1920 × 1080 Device pixel ratio : 1.4375 CSS media query target : width = 1336px 2. T2 mini - LCD : 11,6“ Resolution : 1920 × 1080 Device pixel ratio : 1.4375 CSS media query t ...

Mastering the Art of jQuery: Easily Choosing and Concealing a Div Element

I'm currently facing challenges in removing a div upon successful AJAX completion. The issue I'm encountering is that the word "Added" appears twice after success, indicating that I am not properly selecting the two divs containing it. Any sugges ...

Using React Hooks and useRef to Retrieve the clientHeight of Dynamically Rendered Images

I'm currently in the process of creating a dynamic image grid and need to determine the exact height of each image in pixels so I can adjust the layout accordingly. However, I've encountered an issue with accessing ref.current.clientHeight as it ...

Tips for improving the readability of nested axios calls - a practical guide

I'm struggling with asynchronous Axios calls. While my nested Axios calls are functional, the code is becoming difficult to read and I often get lost in it. Currently, my structure looks like this: axios.get().then((response) => { this.pbmI ...

What is the best way to retrieve the value of the nearest text input using JavaScript?

I am currently working on designing an HTML table that includes a time picker in one column for the start time and another time picker in a separate column for the end time within the same row. My goal is to retrieve both values (start time and end time), ...

Integrate my API with HTML using J.Query/Ajax technology

Finally, after much effort, I have successfully created a JSON java API. My API design is simple and based on Interstellar movie details: { "title": "Interstellar", "release": "2014-11-05", "vote": 8, "overview": "Interstellar chronicl ...

Searching for a MongoDB document using its unique identifier

Currently, I am working with Node.js and MongoDB where my database is hosted on MongoHQ (now compose.io). I have come to understand that document IDs are converted to hex strings, but I am struggling to retrieve a document using its ID. In my dataset, the ...

React component fails to display content following execution of Jquery Ajax request

Utilizing a basic jQuery ajax function to retrieve inline HTML code from an API $.ajax({ url: url, headers: { 'Accept': 'application/javascript' }, dataType: 'html', beforeSend: function(){ $('.load-mor ...

Can a mock API be set up in Cypress to avoid making real API calls?

We are currently working on a Vue.js application that includes a component. Within this component, there is an API call made to update database records. As part of our testing process, we are conducting unit tests for this component. We are exploring the ...