exploratoria / exploratoria.github.io

An online hommage to the Exploratorium
http://exploratoria.github.io
MIT License
5 stars 0 forks source link

Outreach to SageMath re: website indexing #10

Closed paulmasson closed 7 years ago

paulmasson commented 8 years ago

The sagemath.org website is currently manually redirecting links in sagemath.org/documentation to doc.sagemath.org, and this is leading to some confusion for new users Googling for documentation.

I am going to suggest to them that they stop the manual redirecting and submit a full sitemap to Google to reindex sagemath.org/documentation, which is where all the documents really exist right now. To do that, I propose a small project to use the Github API to produce a listing of every .html and .pdf file in sagemath.org/documentation, along with a prefix of http://sagemath.github.io/documentation/.

theo-armour commented 8 years ago

@paulmasson

this is leading to some confusion for new users Googling for documentation

I am not very familiar with SageMath, so I may be a good guinea pig. ;-)

In order to see for myself I tried googling for 'sagemath diophantine approximation'

Google came back with the following results:

image

Yes, the results are definitely confusing.

I propose a small project to use the Github API to produce a listing of every .html and .pdf file in sagemath.org/documentation,

In direct response to your message, I created this script:

SageMath Documentation GitHub API Files in Repo R1

But this got me to thinking.

Would it not help if the documentation home page had direct links instead of relative links?

So it was edited and used to created this file:

SageMath Documentation Absolute Links R1

The interesting this about this file is that it has the file names of all the PDF files as well as their actual titles. So the idea arose to use this file to create a sitemap. And so this script was created:

Sage Documentation Site Map Maker R1

Site Map

Could any of this be useful?

paulmasson commented 8 years ago

Time to clarify: we aren't trying to produce HTML, but flat-file listings to be submitted through Google's webmaster tools. Even if they don't want to use this, I certainly will for my documentation site.

Let me also specify the task more explicitly. The initial page should accept a base URL and a file extension. The output should write a document to the browser window of absolute URLs to all documents found with the given extension. This list can then be copied into a text file for submission to Google.

The idea behind this is when a directory is specified as HTML documentation, one only wants the .html files therein. Same for a directory of PDF documentation. I misspoke when proposing the project: we don't want all the PDFs everywhere, just the ones that are complete documentation files in the designated location.

If you want to do another demo in Jaanga, then please do so. At some point I'll edit your code to make it conform to what standards are in place here and move it to the lib/github-api in this repository.

As a final comment, your Absolute Links R1 and Map Maker R1 don't produce any output for Firefox on the desktop or Mobile Safari on my iPad.

paulmasson commented 8 years ago

Here's an idea of what I had in mind:

https://github.com/exploratoria/exploratoria.github.io/tree/master/lib/github-api

Already used it to update the sitemap submitted to Google for paulmasson.github.io/sagemath-docs.

Still needs work for subdirectories in repositories and some data validation.

theo-armour commented 8 years ago

looks good

Am I allowed to add wish list items?

On Sat, May 28, 2016 at 8:47 PM Paul Masson notifications@github.com wrote:

Here's an idea of what I had in mind:

https://github.com/exploratoria/exploratoria.github.io/tree/master/lib/github-api

Already used it to update the sitemap submitted to Google for paulmasson.github.io/sagemath-docs.

Still needs work for subdirectories in repositories and some data validation.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/exploratoria/exploratoria.github.io/issues/10#issuecomment-222341235, or mute the thread https://github.com/notifications/unsubscribe/AAhbKkwq3RZKvKQjTnr4Fq7ZFmqBX8Cgks5qGQxpgaJpZM4Ikx9s .

paulmasson commented 8 years ago

Sure! Just keep in mind the application for this bit is flat-file lists.

Feel free to add other Github API tools to lib/github-api if you like.

theo-armour commented 8 years ago

Web site indexing

Wish list items:

When you enter the title of a GitHub organization (or a user name) then a list of their repos appears

When the list of files appears, you can save the output to file

On Sat, May 28, 2016 at 9:09 PM Paul Masson notifications@github.com wrote:

Sure! Just keep in mind the application for this bit is flat-file lists.

Feel free to add other Github API tools to lib/github-api if you like.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/exploratoria/exploratoria.github.io/issues/10#issuecomment-222341735, or mute the thread https://github.com/notifications/unsubscribe/AAhbKhjoZRh9CrrjxWdHoyoW9oFZXTemks5qGRGLgaJpZM4Ikx9s .

paulmasson commented 8 years ago

I've adding file saving, as well as various error checking and some usage notes. I don't think I'll add the drop-down list of repos, since some organizations have many repositories barely used and that would add confusion.

theo-armour commented 8 years ago

@paulmasson

image

branch = organization.value.match( 'github.io' ) ? 'master' : 'gh-pages';

paulmasson commented 8 years ago

Oh, that. Updated.

theo-armour commented 8 years ago

@paulmasson

1. Concept

It might be a good thing to outline in the readme what this code is about and how it can be used to help with SEO.

2. FileSaver.js

Is there any good reason for continuing to bring in FileSaver.js? Have you actually been able to save anything in Safari 9? Wouldn't it be more modern to say 'only modern browsers supported?

paulmasson commented 8 years ago

Since the idea to use FileSaver.js came from you in the not-too-distant past, I'm open to other suggestions. It actually doesn't even work in Safari right now, just opens a new blank browser window.

theo-armour commented 8 years ago

@paulmasson

http://caniuse.com/#feat=download



https://ausdemmaschinenraum.wordpress.com/2012/12/06/how-to-save-a-file-from-a-url-with-javascript/

```
function saveFile() {

    var blob = new Blob( [ txtArea.innerHTML ] );
    var a = document.body.appendChild( document.createElement( 'a' ) );
    a.href = window.URL.createObjectURL( blob );
    a.download = 'hello-world.txt';
    a.click();
    delete a;

}
```

PS adding a user mention appears to be _de rigeur_ these days
paulmasson commented 8 years ago

Updated. Are you not getting the notifications with being mentioned or are you imposing some other protocol?

theo-armour commented 8 years ago

I am receiving email notifications - if nothing else because I am subscribed to notifications to this thread.

PS adding a user mention appears to be de rigeur these days

In other words, it just seems to be the polite thing to do. It's a good habit to get into because it really helps when there are multiple commenters.

The other thing I plan to do is - if I see no need to actually respond to a message - to at least add a reaction so that the sender knows that I have received and read the item.

paulmasson commented 7 years ago

@theo-armour since I’ve already used the sitemap generator to create sitemaps for several versions of SageMath, we can consider this issue resolved. Thank you for your input.