This repository has been archived by the owner on Mar 25, 2023. It is now read-only.
globally unique id #450
amitu
started this conversation in
Ideas & RFC
Replies: 2 comments 1 reply
-
We have to relax checks on a globally unique id for some cases. This includes:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
@amitu @Arpita-Jaiswal
-- ft.code:
lang: ftd
\-- string name: Foo
\-- ftd.text: $name
$on-global-key[ctrl-,]$: $name = Arpita
$on-global-key[ctrl-3]$: $name = Ayushi
$on-global-key-seq[shift-shift]$: $name = Rajshri
$on-global-key-seq[space-dash]$: $name = Jatinderjit Here this -- ft.code:
lang: ftd
\-- string name: Foo
\-- ftd.text: $name
$on-global-key\[ctrl-,]$: $name = Arpita
$on-global-key\[ctrl-3]$: $name = Ayushi
$on-global-key-seq\[shift-shift]$: $name = Rajshri
$on-global-key-seq\[space-dash]$: $name = Jatinderjit |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Feature: terms
Status: Done
Owner: @Heulitig Started On: 10th Aug 202222nd September
21st September
20th September
19th September
[<linked-text>](/doc-id/[#slug-id]?)
(relative links)[<linked-text>](https://...)
[<linked-text>](www....)
16th September
15th September
{<id-here>}
to[<id-here>]
since it is conflicting with the markup syntax.\
functionality on both linking syntax to consider link as normal raw text.14th September
13th September
PR - Adjustments in Check-ID state fastn#420
12th September
PR - Reference Linking docs ftd.dev#35
v
as argument for video-id instead ofid
PR - ft.youtube component adjustment FifthTry/doc-site#35
dotcom - https://github.com/FifthTry/dotcom/pull/93
ftd.dev - fixed youtube components ftd.dev#36
fpm.dev - fixed youtube components fastn.com#81
8th September
Improvements on ID map construction
Cases adjusted:
having its unique video id multiple times within the package.
1st September
Adjusted these changes in the previous FPM PR here
29 August 2022
28 August 2022
25 August 2022
Doc PR
universal-attributes.ftd
We are considering introducing an attribute called
term
, which will have allow one to addterm
to any ftd component, and then allow people to link to any terms with a compact syntax.This is a little problematic as now we have both
id
andterm
. And the only reason to ever useid
is to allow linking.id
is just bad at it, to link with id you will need to know both the id and the document-url, and if one moves the content with id from one document to another, all links have to be updated.So why keep both id and term? Why not fix the problems with id and not introduce term at all.
ids will need to be globally unique
This is a deviation from our current design on id, currently ids must be unique in the document (not sure if this is enforced anywhere, I think we currently just pass the ID to HTML, and if more than one node exists with same id in HTML, when linking to
#<the-id>
browsers will scroll to the first node with the given id).Now we will make ids unique across entire fpm package. How can we ensure that? FTD has no idea about "package". We will add
check-id
state on compiler, like we havestuck-on-import
etc. (Tangent-1: We can maybe also tell ftd that we are interested in unique ids, and only in that casecheck-id
state would be reached, else compiler will accept any id, so that projects that want to use ftd but do not care about this feature, they do not have to implement anything).If
id
are specified they would have to be unique.What About Auto IDs?
If
id
is not specified, we currently auto generate an id for headings etc, and it is passed to HTML. This is quite handy, I often find the auto generated ID by doing inspect, and use that id. In future we will make the auto generatedid
(and the#<id>
) todoc-site
etc, so they can show link on hover:So we will need to keep auto ids. Auto IDs are not to be unique, because we do not encourage linking to them, we encourage linking using
[something][id: foo]
or[foo]
syntax (ifid
isfoo
), as it is cleaner, and does not break if the section moves from one document to another. Despite this, auto ids need to be supported for lazy authors, most people will not give ID to most things.Auto generated IDs will not be unique across all documents in package, and ftd will do the auto generation itself. It will use the slug (plus number if the heading is repeated within the document).
If the heading is "Hello World", the slug is
hello-world
. If the slug of heading is unique we will just use the slug, but if two headings in same page have same slug, we will append-1
,-2
etc in the order they were found in the page to generate unique slugs.Beta Was this translation helpful? Give feedback.
All reactions