Post Titles: Difference between revisions
(Created page with "{{Project |Description=Give posts titles w/ slugified URLs to support longer-form writing and minimization |Part Of=Mastodon/Hacking |Parts= |Contributors=Jonny Saunders |Has Git Repository=https://github.com/NeuromatchAcademy/mastodon |Completion Status=Draft |Active Status=Active |Approval Status=Unapproved }} Stubbing this out: == Desired Functionality == === Base === * Post titles declared by ** additional field in compose window via web interface ** Starting wit...") |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
Stubbing this out: | Stubbing this out: | ||
* Branch: [[Has Git Branch::https://github.com/NeuromatchAcademy/mastodon/tree/feature-post-titles]] | |||
== Desired Functionality == | == Desired Functionality == | ||
Line 38: | Line 40: | ||
== Implementation == | == Implementation == | ||
* Add "title" field to status model | * X - Add "title" field to status model | ||
** Do migration | ** X - Do migration | ||
* Add field in web ux | * X - config for max title length | ||
* Parser/regex to detect post-initial header | * Declare: | ||
* slugify title | ** X - Add field in web ux to add | ||
* check for duplicates and increment | ** Parser/regex to detect post-initial header | ||
* Store | |||
** X - slugify title | |||
** check for duplicates and increment | |||
* Display: | |||
** X - Show title above status on local web interface | |||
** Use title in page metadata and html head? | |||
* Serializing | |||
** X - Just serialize title in post body when federating | |||
* add route for slugified titles/add slug detection in controller | * add route for slugified titles/add slug detection in controller | ||
** Half done... need to figure out how react/redux is getting post ID from the URL pattern |
Latest revision as of 04:52, 18 January 2024
Post Titles | |
---|---|
Description | Give posts titles w/ slugified URLs to support longer-form writing and minimization |
Part Of | Mastodon/Hacking |
Contributors | Jonny Saunders |
Has Git Repository | https://github.com/NeuromatchAcademy/mastodon |
Completion Status | Draft |
Active Status | Active |
Approval Status | Unapproved"Unapproved" is not in the list (Draft, Provisional, Approved, Proposed, Blocked) of allowed values for the "Approval Status" property. |
Stubbing this out:
Desired Functionality
Base
- Post titles declared by
- additional field in compose window via web interface
- Starting with a header like in markdown, eg:
# My Post Title Post content
- Post title displayed like standard html header
- Slugified urls like
https://neuromatch.social/@username/my-post-title
- Duplicate slugs get incrementing integers appended
- eg.
my-post-title-2
etc.
- eg.
- Duplicate slugs get incrementing integers appended
Nice to have
- Titled posts displayed in separate section on account page
- Titled posts minimized by default, showing only title?
Implementation
- X - Add "title" field to status model
- X - Do migration
- X - config for max title length
- Declare:
- X - Add field in web ux to add
- Parser/regex to detect post-initial header
- Store
- X - slugify title
- check for duplicates and increment
- Display:
- X - Show title above status on local web interface
- Use title in page metadata and html head?
- Serializing
- X - Just serialize title in post body when federating
- add route for slugified titles/add slug detection in controller
- Half done... need to figure out how react/redux is getting post ID from the URL pattern