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

use document titles as human-readable addresses #17

Closed
jancborchardt opened this issue Aug 9, 2012 · 4 comments
Closed

use document titles as human-readable addresses #17

jancborchardt opened this issue Aug 9, 2012 · 4 comments

Comments

@jancborchardt
Copy link
Member

At the moment, the document addresses are numbered, for example litewrite.net/#3

Instead, the document title itself should be used as the address, for example litewrite.net/#todo-list

This is related to #18 limit document list to titles and #19 public sharing.

@jancborchardt
Copy link
Member Author

@jorin-vogel ah sorry, didn’t check out that issue.

Anyway, we should probably use #anchors – especially because those are not sent to the server by default.

jorinvo added a commit that referenced this issue Aug 10, 2012
* use title as base for url
* replace spaces with `-`
* prepend title with id for unique identification
* display nothing when title is empty
* redirect to last document if requested url doesn't exist
* change url when title changes
@jorinvo
Copy link
Member

jorinvo commented Aug 10, 2012

I implemented a first version for the routes but it needs some more testing whether everything works as expected or not.

@jancborchardt
Copy link
Member Author

Nice! Works good so far.

Only point: »prepend title with id for unique identification« – this is done by default at the moment, but actually only needed in the case of an exact match in title. In which case the anchor should be #doctitle-2 (append -2, and -3 upon further duplicates, etc.).

@jorinvo
Copy link
Member

jorinvo commented Aug 11, 2012

I removed the id from the URL but the case of a duplicated title ist not handelt yet. In the moment litewrite will open the most recent of the documents matching the title. f76efd1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants