Skip to content

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

Draft
renoirb wants to merge 1 commit into
2020from
chore-remove-createPageRedirect
Draft

Stashing(createPageRedirectAsyncData): Remove unused redirect from asyncData function#65
renoirb wants to merge 1 commit into
2020from
chore-remove-createPageRedirect

Conversation

@renoirb

@renoirb renoirb commented Oct 20, 2024

Copy link
Copy Markdown
Owner

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

@renoirb renoirb left a comment

Copy link
Copy Markdown
Owner Author

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.

Comment thread middleware/redirects.ts

Copy link
Copy Markdown
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