Closed aaronsteers closed 2 years ago
Pasting from another comment I made:
@rwfeather - Is there a simple means to add these redirects?
netlify.toml
with a redirect rule using a splat in the path /singer/taps/*
, /singer/target/*
) while using the same underlying component to render the page. You can see an example of this method in gridsome.server.js 187:219
// Create default variant pages
api.createPages(async ({ createPage, graphql }) => {
const defaultPlugins = await graphql(`...`)
Object.keys(defaultPlugins.data).forEach((query) => {
// For each default plugin we create an extra page one-level up
defaultPlugins.data[query].edges.forEach(({ node }) => {
createPage({
// Remove the variant part of the path
path: node.path.split("--")[0],
// And send it to the same rendering template
component: `./src/templates/Plugins.vue`,
context: {
id: node.id,
// This is the path given to the `page-query` to do the lookup
path: node.path,
name: node.name,
},
});
});
});
For the second method, If there's any conditional rendering we want to do on the plugin page, it'll be possible to add something like an isSinger
to the context object.
First method will be a lot lower-code and easier.
As noted in https://github.com/meltano/hub/issues/793#issuecomment-1254240358:
@rwfeather - We are approved to remove these:
- The JSON API endpoints for taps and targets. (Users will be recommended to use the newer API which covers all meltano plugin types.)
The Singer tap/target index and detail pages. (Redirect to 'extractor'/'loader' equivalents.)
- Related follow-on: feat(gridsome): add "standalone usage" section to main plugins pages #821
Resolved in #824
We previously hosted Singer-specific detail pages for extractors and loaders.
We can redirect all of these endpoints to the generic plugin endpoints.
E.g.
https://hub.meltano.com/taps/postgres
->https://hub.meltano.com/extractors/postgres
https://hub.meltano.com/extractors/tap-postgres
https://hub.meltano.com/taps/postgres--singer-io
->https://hub.meltano.com/extractors/tap-postgres--singer-io