Open MaryamZi opened 1 year ago
This should be because of the duplication of the same title in the release note.
Hey @keizer619 @sm1990 I would like to work on this issue
@s-vamshi thank you. I'll assign it to you. Let me know if you have any questions. Happy coding!
hey @sm1990, i am not able to replicate the issue links in subsection of release notes are working can you please let me now if i am missing something?
Hi @s-vamshi ,
If you copy and paste https://ballerina.io/downloads/swan-lake-release-notes/swan-lake-2201.2.0#http-package-1
, it should go to the page and then scroll to the relevant section in the page. But it doesn't. It's probably because there are 2 headings as http package
under 2 sections. We appended -1, -2, .. for such duplicated sections. It seems to be not working.
Let me know if you have any questions.
Hey @sm1990 thanks for clarifying, i guess we need to update the ID's of headings with the count
Hey @sm1990, just wanted to let you know that I’m currently writing a blog on Ballerina and working on creating a connector for it, so I’m finding it hard to manage my time for this issue. If someone is interested, please assign this issue to them!
Thank you for letting us know @s-vamshi . I'll unassign this task from you for now, so that others can see it as an available task. Once you have finished your other task, if no one has claimed this, you can have it :smile:
Sure 😃
@sm1990 I am interested to work, pls assign to me.
Hi @harshalkh , Thank you for selecting this issue. I'll assign it to you. Happy coding!!!!
@harshalkh Any update on this issue? Let me know if you have any questions.
@sm1990 I tried few blogs, this looks correct but still it's not working when direct link accessed. If you could help will be good.
@harshalkh can you check these two files (https://github.com/ballerina-platform/ballerina-dev-website/blob/master/pages/downloads/swan-lake-release-notes/%5B...slug%5D.js and https://github.com/ballerina-platform/ballerina-dev-website/blob/master/components/common/pg-toc/Toc.js) they are the ones involved in setting the IDs of the headings.
@harshalkh Looks like we're not using the https://github.com/ballerina-platform/ballerina-dev-website/blob/master/components/common/main-content/MainContent.js in release note slugs. See, whether it works, if we refactor the code using that.
@sm1990 sorry I am not able to track this. If someone else want to take this you can reassign..
@sm1990 Can I try this out ??
Sure. I'll assign it to you @AnsarMahir
@sm1990 Just checked this. Everything works fine. The only issue here is the permalink used by @MaryamZi to create the issue. The permalink has a "-1" suffix which should not be there. It should be without "-1" as there is only one section with the name "http-package" . As per the logic in the below code snippet,
`const headingCount = getArrayCount(uniqueHeadingList, sectionId); uniqueHeadingList.push(sectionId);
if (headingCount !== 0) { unique = false; sectionId = sectionId + "-" + headingCount; }`
The logic used state that only add a suffix when the section is repeated. Eg: There are 4 sections with "New-features" on the provided permalink , so when going to the second section, then it will have the suffix "-1" as "#new-features-1". So it seems like the permalink that is used to create the issue is wrong and it should be https://ballerina.io/downloads/swan-lake-release-notes/swan-lake-2201.2.0#http-package
@AnsarMahir there are 2 headings called http package
.
One under Standard library updates
-> New features
-> http package
.
the other under Standard library updates
-> Improvements
-> http package
.
So we need to have that -1
at the end. Please check this explanation above as well.
Let me know if you have any questions.
Description
For example https://ballerina.io/downloads/swan-lake-release-notes/swan-lake-2201.2.0#http-package-1 for Standard library updates > Improvements > http package