Add anchor links to headings #159

Merged
n merged 2 commits from anchor-links into master 4 months ago
n commented 4 months ago
Collaborator

This PR adds anchor links to any markdown headings. It also replaces any hacky workarounds used previously.

Test deployment at docs.codeberg-docs.org.

Closes #83.

This PR adds anchor links to any markdown headings. It also replaces any hacky workarounds used previously. Test deployment at [docs.codeberg-docs.org](https://docs.codeberg-test.org). Closes #83.
n added the
Status: Ready for Review
label 4 months ago
n added 1 commit 4 months ago
n added
Status: In progress
and removed
Status: Ready for Review
labels 4 months ago
n added 1 commit 4 months ago
n added
Status: Ready for Review
and removed
Status: In progress
labels 4 months ago
fnetX approved these changes 4 months ago
fnetX left a comment

Cool.

### How to create a new article?
To write a new article, create a new Markdown file next to the existing files in the section that you want to put your article in. So, if for example you want to create an article called "Keeping your repo clean with .gitignore" in the "Working with Git Repositories" section, put a new file called for example `gitignore.md` into the `content/git` directory. Please adhere to the [file naming conventions](#file-naming-conventions).
To write a new article, create a new Markdown file next to the existing files in the section that you want to put your article in. So, if for example you want to create an article called "Keeping your repo clean with .gitignore" in the "Working with Git Repositories" section, put a new file called for example `gitignore.md` into the `content/git` directory. Please adhere to the [file naming conventions](#how-should-files-be-named%3F).
fnetX commented 4 months ago
Poster
Collaborator

can special chars be stripped, or does this work cleanly?

can special chars be stripped, or does this work cleanly?
n commented 4 months ago
Poster
Collaborator

Special characters in the links have to be encoded. Removing it would break the link.

Special characters in the links have to be [encoded](https://en.wikipedia.org/wiki/Percent-encoding). Removing it would break the link.
n commented 4 months ago
Poster
Collaborator

Each sub-heading also links to its permalink.

Each sub-heading also links to its permalink.
fnetX commented 4 months ago
Poster
Collaborator

yeah, I was wondering if it was easier to strip them from the title (just as spaces are turned into dashes), so they are completely dropped from the links. But it's fine if it works this way.

yeah, I was wondering if it was easier to strip them from the title (just as spaces are turned into dashes), so they are completely dropped from the links. But it's fine if it works this way.
n merged commit 170914185d into master 4 months ago
n referenced this issue from a commit 4 months ago
n deleted branch anchor-links 4 months ago

Reviewers

fnetX approved these changes 4 months ago
The pull request has been merged as 170914185d.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.