redhataccess / ascii_binder

AsciiBinder is an AsciiDoc-based system for authoring and publishing closely related documentation sets from a single source.
https://asciibinder.net
MIT License
76 stars 39 forks source link

RFE: More stable URLs over time (leads to better SEO) #138

Closed asamalik closed 4 years ago

asamalik commented 6 years ago

When a certain page in my documentation becomes very long over time, I want to break it into multiple subpages (this is possible today) while keeping the original URL (this is not possible today) so I don't break people's bookmarks and don't make search engines angry.

Example:

I have the following structure:

After some time, the page "Using my project" becomes too long for a single page and I split it into multiple pages:

Notice that the example.com/using-my-project.html URL disappeared. That means bookmarks people made became broken, and search engines are also confused because they lost the original url and have to find the new ones — this makes it harder to find.

Proposed solution:

To fix this, I'm proposing two technical changes:

Change 1: Allow folders to have pages as well

I want to be able to do this:

Name: Using my project
Dir: using-my-project
File: using-my-project       <- this
Topics:
  - Name: Installation
    File: installation
...

Change 2: Generate pages as directories with index.html

This doesn't need to be the default behavior.

Right now, building the documentation works like this:

using-my-project.adoc               --->   using-my-project.html
using-my-project/installation.adoc  --->   using-my-project/installation.html

Which gives me these two URLs:

I propose to change it to:

using-my-project.adoc               --->   using-my-project/index.html
using-my-project/installation.adoc  --->   using-my-project/installation/index.html

Which would give me these two URLs:

Applying this proposal to the example above

I have the following structure:

After some time, the page "Using my project" becomes too long for a single page and I split it into multiple pages:

Notice that the "Using my project" page still exists and has the same URL. People's bookmarks keep working and search engines are happy.

Positive side effect: breadcrumbs work better

Going to the "Using my project / Running" page in the first example, the breadcrumbs would look as follows:

Home  >  Using my project  >  Running

If I click on "Using my project" in the breadcrumbs, I get to the "Using my project / Intro" page, getting the following breadcrumbs:

Home  >  Using my project  >  Intro

However, in the new example, I would get to:

Home  >  Using my project

... which looks better to me.

Does this proposal sound reasonable?