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

Google SEO #257

Open
mmann1123 opened this issue Mar 30, 2023 · 8 comments
Open

Google SEO #257

mmann1123 opened this issue Mar 30, 2023 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@mmann1123
Copy link
Collaborator

We should strongly consider including the google analytics SEO and sitemap. These should make the site much easier to find through search engines. Plus you can obsessively check how many people are looking at the site at any given moment.

I am not sure how much of this has been done, but I will walk you through it just in case:

  1. Register site with google search console https://search.google.com/search-console/about
  • This requires you to generate a sitemap.xml and host it along side the website in the root directory.
    - This can be generated with https://pypi.org/project/sphinx-sitemap/ although since you are publishing through CI (i think), I am not entirely sure how CI would push the sitemap.xml to your hosting service
    - Search console will confirm things once it finds sitemap.xml, just make sure it has all your pages listed.
    - Whenever you add a new page to your docs you need to create a new sitemap.xml to get it crawled.
  • You might also register with bing (https://www.bing.com/webmasters/help/add-and-verify-site-12184f8b) should be easy enough, and the bing chat these days, it might be worth it.
  1. If you want more detailed analytics you also might look into adding a google analytics ID

I am happy to help just let me know.

@mmann1123 mmann1123 added the enhancement New feature or request label Mar 30, 2023
@jgrss
Copy link
Owner

jgrss commented Mar 31, 2023

@mmann1123 do you want to get this in now, or do you want to review #252?

@mmann1123
Copy link
Collaborator Author

mmann1123 commented Apr 1, 2023

@jgrss Happy to review 252 without this. Although it looks like CI tests are failing.

@mmann1123
Copy link
Collaborator Author

I am going to assume that you want ownership of this. Unless I am told otherwise- since its associated with a particular google account.

In particular if you can get the site registered:

  1. Register site with google search console https://search.google.com/search-console/about

I can help with the google analytics side of thing.

@jgrss
Copy link
Owner

jgrss commented Apr 14, 2023

Where is the Google HTML verification file supposed to live?

@mmann1123
Copy link
Collaborator Author

mmann1123 commented Apr 14, 2023

  1. go to google search console https://search.google.com/search-console/

  2. add new "property" with "URL prefix" as suggested

  3. Download the googlea<id>.html file and place it in docs/source (e.g. module/docs/source). Use html_extra_path inside of conf.py as follows (i.e. add the following line somewhere in conf.py):

html_extra_path = ["googlea<id>.html"]

  1. for sphinx
make clean
make html

and check to make sure docs/build/html/googlea<id>.html exists.

  1. Commit, push, and wait for your website to update (this could take a few minutes)
  2. If you have the webpage from step 1 still open, click VERIFY, otherwise navigate back to Google Search Console, and re-enter your URL (e.g. https://geowombat.readthedocs.io/en/latest). If it worked, it should tell you so, and you can then "Go to property".

Then you need to sort out the sitemap.xml

A. To do this properly it requires you to generate a sitemap.xml and host it along side the website in the root directory.

  • This can be generated with https://pypi.org/project/sphinx-sitemap/ although since you are publishing through CI (i think), I am not entirely sure how CI would push the sitemap.xml to your hosting service. But it likely does it automatically.

B. Once the sitemap is published to the web, open https://geowombat.readthedocs.io/sitemap.xml in your browser, it should have a list of ALL the pages making up your webpage. CHECK that they are valid URLS ie https://geowombat.readthedocs.io/en/latest/tutorial.html not https://geowombat.readthedocs.ioen/latest/tutorial.html .

  • If your URLS are missing / after https://geowombat.readthedocs.io check that in your sphinx config.py that you have a / at the end of your html_baseurl for instance https://geowombat.readthedocs.io/ not https://geowombat.readthedocs.io

C. Go to google search console again. Hit the sitemaps tab, and paste the full URL to your sitemap ie. https://geowombat.readthedocs.io/sitemap.xml

@jgrss
Copy link
Owner

jgrss commented Apr 14, 2023

Steps 1-3 are done in #262.

@mmann1123
Copy link
Collaborator Author

@jgrss can we close this?

@mmann1123
Copy link
Collaborator Author

oops accidentally closed

@mmann1123 mmann1123 reopened this Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants