Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stashing(createPageRedirectAsyncData): Remove unused redirect from asyncData function #65

Draft
wants to merge 1 commit into
base: 2020
Choose a base branch
from

Conversation

renoirb
Copy link
Owner

@renoirb renoirb commented Oct 20, 2024

Status Cannot merge as-is.

Because it seem to break due to the early use of Vue 3 API and those files seem to be involved in not breaking the build.


Instead of using Nuxt pages asyncData, let's use the static site hosting redirects, and use instead createVueMetaInfo

For example (taken from when it's been made):

<script lang="ts">
  export default Vue.extend({
    // ... rest of page
    head() {
      let redirect = this.content?.redirect ?? ''
      if (redirect !== '') {
        // #TODO-Meta-Equiv-Redirect
        redirect = `/blog/${this.year}/${this.month}/${redirect}`
      }
      const out = createVueMetaInfo({ ...this.content, redirect })
      //                                               ^^^^^^^^
      return out
    },
  })
</script>

@renoirb renoirb self-assigned this Oct 20, 2024
@renoirb renoirb force-pushed the chore-remove-createPageRedirect branch 2 times, most recently from 33c314d to 5746f0d Compare October 22, 2024 19:44
@renoirb renoirb force-pushed the 2020 branch 2 times, most recently from 5f0db3d to b1e4276 Compare October 29, 2024 15:42
@renoirb renoirb force-pushed the chore-remove-createPageRedirect branch from 5746f0d to f911eea Compare October 30, 2024 03:09
@renoirb renoirb marked this pull request as ready for review October 30, 2024 03:13
@renoirb renoirb force-pushed the chore-remove-createPageRedirect branch from c99b11f to 961bae4 Compare October 30, 2024 03:16
@renoirb renoirb marked this pull request as draft October 30, 2024 03:21
@renoirb renoirb force-pushed the chore-remove-createPageRedirect branch from 961bae4 to 37dc1fb Compare October 30, 2024 03:33
Copy link
Owner Author

@renoirb renoirb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parts of this will be useful after all.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not delete this aspect. It'll be useful after all in #82

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant