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

feat: Programatic SEO #108

Merged
merged 24 commits into from
Aug 21, 2023
Merged

feat: Programatic SEO #108

merged 24 commits into from
Aug 21, 2023

Conversation

rishi-raj-jain
Copy link
Contributor

fix #107
/claim #107

@algora-pbc algora-pbc bot mentioned this pull request Aug 18, 2023
@netlify
Copy link

netlify bot commented Aug 18, 2023

Deploy Preview for capgo ready!

Name Link
🔨 Latest commit 65d5db5
🔍 Latest deploy log https://app.netlify.com/sites/capgo/deploys/64e3d6b5c749360008a725ea
😎 Deploy Preview https://deploy-preview-108--capgo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rishi-raj-jain rishi-raj-jain marked this pull request as draft August 18, 2023 09:11
@rishi-raj-jain
Copy link
Contributor Author

rishi-raj-jain commented Aug 18, 2023

@riderx

Can you take a look at https://deploy-preview-108--capgo.netlify.app/plugins/ and let me know if any changes with icons/design are required?

I'll then take on the each page for each plugin.

@riderx
Copy link
Contributor

riderx commented Aug 18, 2023

Very nice! Maybe there some to exclude but that cool 👍
Can you prepare exclude list ?

@rishi-raj-jain
Copy link
Contributor Author

What do you mean by exclude? Where can I gather what to exclude?

@rishi-raj-jain
Copy link
Contributor Author

@riderx

I'm updating the code with a bearer token env (GITHUB_BEARER_TOKEN) that's required to fetch stars & readme from GitHub. Let me know if there's another way to get around this.

@rishi-raj-jain rishi-raj-jain marked this pull request as ready for review August 18, 2023 17:29
@rishi-raj-jain
Copy link
Contributor Author

@riderx This is ready for review. You'd still need to add your env of BEARER_TOKEN to the git repo (or wherever pnpm build gets executed)

@riderx
Copy link
Contributor

riderx commented Aug 18, 2023

@rishi-raj-jain thanks a lot, can you share what rights i should but in the token ?

@riderx
Copy link
Contributor

riderx commented Aug 18, 2023

For the plugin page we need more content we look for SEO here, so we need to use the REAME file to create automatic content. like plugin presentation and tutorial made with gpt for example

@rishi-raj-jain
Copy link
Contributor Author

rishi-raj-jain commented Aug 19, 2023

Hey @riderx,

You can create a classic GitHub token, and no need to select any checkbox there, we just need the API key to be able to fetch public repository worldwide.

@rishi-raj-jain
Copy link
Contributor Author

Hey @riderx,

  1. What do you mean by plugin presentation? The OG image card?

  2. What do you mean by tutorial? A usage of the package in which environment?

@riderx
Copy link
Contributor

riderx commented Aug 19, 2023

i just added the token in github and netlify

@rishi-raj-jain
Copy link
Contributor Author

I think we should create all of that statically instead of doing real time as this'd require both open ai key and GitHub api key, that can rate limit given the number of PRs and build process that kicks in for each commit.

@rishi-raj-jain
Copy link
Contributor Author

i just added the token in github and netlify

Named BEARER_TOKEN, right?

@riderx
Copy link
Contributor

riderx commented Aug 19, 2023

i thnk it's ok for now like that,
let forgot about gpt, just make sure we do the maz in SEO, like even jsonLD etc

@riderx
Copy link
Contributor

riderx commented Aug 19, 2023

and then i accept it :)

@riderx
Copy link
Contributor

riderx commented Aug 19, 2023

Ok if you want to try gpt I think you can create a script to make it and we can run it separately or in the CI.
For now I believe the CI will not be too much

@riderx
Copy link
Contributor

riderx commented Aug 19, 2023

It's doable in CI context or need more ?

@rishi-raj-jain
Copy link
Contributor Author

rishi-raj-jain commented Aug 19, 2023

@riderx

How I imagine is this:

  • We have a script named generateTutorial.js that does the work for us. Creates a directory in the src/content with all the plugins tutorials. This'll be done with the help of the uploaded trained model via OpenAI.

  • Before the build process, the script is called that does the magic. Here we'll require the OpenAI key.

  • During the build process, the code just loads them from the markdown and then renders it with the website.

This'll allow you to not call the API whenever PRs are deployed via Netlify in Pull Requests, and can choose to run that only on the main branch.

@rishi-raj-jain
Copy link
Contributor Author

@riderx

I think the tutorials look awesome now on the plugins pages.

Note: I've updated the CI/CD to generate the tutorials, and dynamically get deployed with each build. In case of any errors in generation with any of them is found, the ones that you see right now will be used.

I believe this is ready for review. Make sure you've OPENAI_API_KEY & BEARER_TOKEN set in the your CI.

@riderx
Copy link
Contributor

riderx commented Aug 21, 2023

I have add OPENAI_API_KEY and restarted the deploy, let's see :)

@riderx
Copy link
Contributor

riderx commented Aug 21, 2023

The generation is very good, just the design has issue on the deployed version i see the readme and then the tutorial, maybe let's do tabs to switch between readme and tuto

@rishi-raj-jain
Copy link
Contributor Author

I'm super glad that you love it! On the way to tabs.

@rishi-raj-jain
Copy link
Contributor Author

rishi-raj-jain commented Aug 21, 2023

Screenshot 2023-08-21 at 9 54 22 PM

here's how the screen now looks

@riderx
Copy link
Contributor

riderx commented Aug 21, 2023

Can the tuto be default ?
and keep the layout for both ? with the info on the left ?
CleanShot 2023-08-21 at 23 15 13@2x

@riderx
Copy link
Contributor

riderx commented Aug 21, 2023

it seems the text is not finished here: https://deploy-preview-108--capgo.netlify.app/plugins/capgo-cli/

@rishi-raj-jain
Copy link
Contributor Author

The build fails because the fetch breaks:

Screenshot 2023-08-22 at 2 55 31 AM

Added the code to handle that.

@sonarcloud
Copy link

sonarcloud bot commented Aug 21, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@rishi-raj-jain
Copy link
Contributor Author

The cool thing about the plugin page is everything is server side rendered! Both the tuto and the readme. This'd help in SEO as you expected/wanted to have.

@riderx riderx merged commit 1299c8b into Cap-go:main Aug 21, 2023
7 of 8 checks passed
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.

Programatic SEO
2 participants