In VuePress 1.x, the functionality of using the <Content> tag with pageKey is not functioning as expected

Throughout the development process, we implemented a component that would iterate through each index.md file within a folder based on the list this.$site.pages.path. However, after upgrading to version 1.0.0-alpha.39 in order to address some other issues we encountered, the component ceased to function.

Here is the code for the component:

<template>
  <div>
    <Content v-for="page in changelogPages" :key="page.key" :pageKey="page.key"/>
  </div>
</template>

<script>
import _ from "lodash"
export default {
  computed: {
    changelogPages: function () {
      let pages = this.$site.pages
        .filter(pages => pages.path.startsWith("/docs/change-log/2"))

      return _.orderBy(pages, 'path').reverse()
    }
  },
  data: function () {
    return {}
  }
}

</script>

This has resulted in the following errors. https://i.sstatic.net/hJT02.png

Upon inspecting the Vue plugin for chrome, it can be seen that the page.key is present.

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

Within the page, I am simply using <ChangeLogList /> which calls upon the above global-component.

AS AN FYI: The VuePress ecosystem does not require me to register markdown files, so the typical answer of "did you register your component" is not applicable.

Reference Links in repo

Global Component : https://github.com/okta/okta.github.io/blob/VuePress/packages/%40okta/vuepress-theme-default/global-components/ChangeLogList.vue

Component invoking ChangeLogList:https://github.com/okta/okta.github.io/blob/VuePress/packages/%40okta/vuepress-theme-default/components/ChangeLog.vue

Page that is using ChangeLog (View Raw): https://github.com/okta/okta.github.io/blob/VuePress/packages/%40okta/vuepress-site/docs/change-log/index.md

Submitted an issue at Github as well, however, no responses have been received yet.

Answer №1

Kindly make use of

<Content v-for="page in changelogPages" :key="page.key" :page-key="page.key"/>

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

Unlock encrypted files without allowing users to access them

Looking to incorporate model-viewer or three.js into my personal website to showcase 3D models. To display these models online, the client must retrieve files from the server (including the 3D mesh and texture images). However, I want to prevent my visito ...

What is the most effective way to include JavaScript code in a PDF file?

What is the process for integrating JavaScript code into a PDF document? I am familiar with coding in JavaScript and would like to learn how to add it to a file in order to perform tasks such as displaying the current date or using a combobox. ...

Tips on populating a React table using an array of objects

I have encountered a simple problem that I haven't been able to solve yet. The first block of code seems to be working fine, but the second one is only producing empty table cells. Can someone explain why this is happening and provide a way to populat ...

Trying to assign a value to a property that is not defined

I'm attempting to initiate the loading and exhibition of a .stl file through three.js by implementing the following code: var stlLoader = new THREE.STLLoader(); stlLoader.load('assets/Cap.stl', function (object){ object.position.y = - 1 ...

JavaScript can retrieve the default page name that is hidden within the browser's URL

When a URL is entered without a specific file name at the end, such as "www.google.com," the server typically serves a default file like "index.html" or "default.aspx." In this scenario, if the browser displays "www.google.com," I am looking to extract the ...

A problem arose during the process of mapping an array of objects in react - There was a parsing error: An unexpected token was encountered, expecting a comma (13:9) with eslint

I am currently working on mapping an array of objects containing data, but I am encountering an error that I am unable to identify in the code. Please disregard the console.logs as they are for my own reference. https://i.sstatic.net/vbpLX.png import Reac ...

Handsontable's unique text editor feature is encountering a tricky issue with copying and pasting

In my table, there are two columns: name and code. I have developed a simple custom editor for the code column, where the user can double click on a cell to open a custom dialog with a code editor. You can view a simplified example of this functionality he ...

The save() function is not triggering the callback on a mongoose schema instance

I am encountering an issue while trying to save a JSON object in my database. The save() function is not triggering, and the JSON object remains unsaved. I suspect there might be a connection problem with Mongoose. Below is the code snippet showcasing the ...

Executing a PHP script after successful execution of another script

tag, I am encountering the following script: Two minor issues: With the button being disabled after a click, it wont allow to click again if for instance an error is returned as shown above. It should only disable it after the input has been released $fo ...

Tips for including a hashtag in an AJAX request

When using ajax to send messages to the server in my chat application, I encountered an issue where everything after a hashtag is omitted. I attempted to address this by encoding the message, but it resulted in other complications in the PHP code. The enco ...

Dealing with loading issues in ChartJS due to Axios API integration in a Vue.js project

Struggling to display charts for a Vue.JS dashboard with a flask API acting as a dummy backend. Currently following the guide on but facing difficulties in visualizing data. Component code: <template> <Bar v-if="loaded" :dat ...

What methods work best for handling extensive arrays in Javascript language?

I am currently working on a React JS application that interacts with an API to fetch a JSON object containing a large array of over 10,000 objects. This array is then used to populate a table with the help of various filters and options available through c ...

Obtaining HTML elements from JSON using jQuery (i.e., the opposite of serializing with Ajax)

I am looking to extract values from a set of controls (INPUT, SELECT, TEXTAREA) within a DIV and send them as JSON via Ajax to a server. Utilizing jQuery's serializeArray makes this process easy. After sending the JSON data, I expect the server to re ...

JavaScript Removing Event Listener with Callback and Parameter

I am currently attempting to implement the following: el.addEventListener('scroll', callFunc); el.removeEventListener('scroll', callFunc); However, I want to use a callback function with parameters like this: el.addEventListener(&apos ...

Comparing PHP's STRCHR with the equivalent function in JavaScript

Does anyone know if there is a similar function in JavaScript to strchr in PHP? I could use some assistance. Thank you! ...

Dynamic autocomplete feature with AJAX integration for filtering in Flask

Looking for some guidance on creating an HTML form with two input fields. Check out the HTML template code below: <form role="form" action="/cities/" method="get" autocomplete="on"> <label for="#input1"><strong>Country:</strong&g ...

The process of parsing dates with MomentJS functions correctly for two dates, however, it displays 'Invalid Date' for the third date

I've tried over 50 solutions from Stack Overflow posts, but nothing seems to be working for me. I have three dates: Date 1: 2018-10-28T17:21:38Z Date 2: 2020-10-28T22:29:30Z Date 3: 2021-10-28T17:21:38Z Attempting to parse them into readable formats. ...

"Encountered a Chrome RangeError: The call stack size limit was exceeded while utilizing jQuery's $

As part of my job, I am currently evaluating a web application that involves fetching a substantial amount of data from the server. The data is received as a JSON object using the $.ajax function. It contains numerous sub-objects which I convert into array ...

Tips for sending a slack message as a workspace user with the chat.postmessage method

I've developed a slack bot with interactive buttons. Once a user clicks a button, I want to send a direct message to that user, displaying their profile image instead of the bot's profile image. I'm currently using the Slack API method chat. ...

What could be the reason for Vuejs showing Promise {<pending>} in my project?

I am encountering an issue with two methods in Vue.js where they return a promise pending. Here is the code: TotalIncomeData(day, branch_office_id) { return fetch('/api/collection/total/'+day+'/'+branch_office_id+'?api_ ...