V
V
vita0day2017-03-23 12:48:44
GitHub
vita0day, 2017-03-23 12:48:44

How to make links on GitHub?

As part of my open source project, I'm trying to make an accumulator of ideas. The idea is that the Author publishes a simple text on GitHub as a separate repository, and already this text (texts of different authors, a list of texts) is attracted as a dependency on another resource (anyone's site (as a submodule of the git)).
For some time now, GitHub has been making the main text from README.md and showing it as a description of the repository by pre-marking the text itself - it makes all the headers like links - an anchor link appears at the beginning of the header, and this part of the description can be referenced.
According to my idea, when the author publishes the text immediately on GitHub in plain text in MarkDown markup, there may be nothing at all besides the description - only one README.md file with the author's text and that's it. To publish this text, I wrote a Symfony project - a simple bundle that does almost the same thing as the GitHub parser does

  • At the beginning of each H1 heading, an anchor is dynamically placed with a link of the form #i-link-to-this-header
  • The author can make references to these sections/headings in the text with a simple relative link [text](#i-link)

This works after uploading the text to the site, but does not work already on GitHub . But as planned, the Author has the right to use GitHub as the only place to publish the text of the Idea, and links should work from there. The ability to publish the text of this idea on any site by simply adding a dependency - yes, that was my main idea, but I would like the links to work on GitHub as well.
---
For example.
Among other things, I have an idea about creating distributed communities - here I already act as the Author of a specific Idea and publish the text as an independent repository on GitHub https://github.com/revolter-idealist/distributed-c...- one file, a sheet of text. Therefore, for convenience, I break the entire text into "sections" with headings and make links to these headings in the text - the links do not work on GitHub. .
Further, I wrote "my" platform (it is not actually mine, since the code is 100% open and anyone has the right to copy and deploy it for themselves) for publishing these texts by independent Authors. It is in the same parent repository https://github.com/revolter-idealist/revolter (I still cannot solve the problem with links, so they are broken in many places)
Then I deployed all this on a test server, and the same "for example" the text and links in it work as I intended predlozhi.com/distributed-community/info
How to make relative anchor links work both on GitHub and on a regular site?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question