Atemu  
                
                  
                    October 18, 2024,  5:37am
                   
                  1 
               
             
            
              When you link a Github file with an anchor, the preview which Discourse renders is of the top of the file rather than from the anchor on.
See for instance:
  
  
    
      <a href="https://www.discourse.org/">
  <img src="images/discourse-readme-logo.png" width="300px">
</a>
Discourse is the online home for your community. We offer a 100% open source community platform to those who want complete control over how and where their site is run.
Our platform has been battle-tested for over a decade and continues to evolve to meet users’ needs for a powerful community platform. Discourse allows you to create discussion topics and connect using real-time chat, as well as access an ever-growing number of official and community themes. In addition, we offer a wide variety of plugins for features ranging from chatbots powered by [Discourse AI](https://meta.discourse.org/t/discourse-ai/259214) to functionalities like SQL analysis using the [Data Explorer](https://meta.discourse.org/t/discourse-data-explorer/32566) plugin.
To learn more, visit [**discourse.org**](https://www.discourse.org) and join our support community at [meta.discourse.org](https://meta.discourse.org).
## Screenshots
<a href="https://blog.discourse.org/2023/08/discourse-3-1-is-here/"><img alt="Discourse 3.1" src="https://github-production-user-asset-6210df.s3.amazonaws.com/5862206/261215898-ae95f963-5ab4-4509-b87a-f9f6e9a109bf.png" width="720px"></a>
<a href="https://bbs.boingboing.net"><img alt="Boing Boing" src="https://github-production-user-asset-6210df.s3.amazonaws.com/5862206/261580781-1413ac96-5d08-40b2-bc8e-27c3f2d3bfe6.png" width="720px"></a>
<a href="https://twittercommunity.com/"><img alt="X Community" src="https://github.com/discourse/discourse/assets/2790986/ebb63eee-1927-4060-ada1-cf1bc774084c.png" width="720px"></a>
<img src="https://user-images.githubusercontent.com/1681963/52239118-b304f800-289b-11e9-9904-16450680d9ec.jpg" alt="Mobile" width="414">
show original 
   
  
    
    
  
  
 
This should preview show the development section, not the top of the readme.
(Not sure whether this is actually a bug.)
             
            
              3 Likes 
            
            
           
          
            
              
                nat  
              
                  
                    October 25, 2024,  9:41am
                   
                  2 
               
             
            
              I’ve added a pr-welcome 
             
            
              1 Like 
            
            
           
          
            
            
              I reviewed this PR and noticed that Discourse attempts to serve content directly from the repository using https://raw.githubusercontent.com , which provides a plain, unstyled raw file (e.g., https://raw.githubusercontent.com/discourse/discourse/main/README.md#development ). For line-specific references (like #L-{line-number} ), it jumps directly to the specified line in the file to display the content. To preview a specific section (e.g., #development , #requirements ), you can specify the line number as shown below:
  
  
    
    
      
          <a href="https://blog.discourse.org/2023/08/discourse-3-1-is-here/"><img alt="Discourse 3.1" src="https://github-production-user-asset-6210df.s3.amazonaws.com/5862206/261215898-ae95f963-5ab4-4509-b87a-f9f6e9a109bf.png" width="720px"></a> 
          <a href="https://bbs.boingboing.net"><img alt="Boing Boing" src="https://github-production-user-asset-6210df.s3.amazonaws.com/5862206/261580781-1413ac96-5d08-40b2-bc8e-27c3f2d3bfe6.png" width="720px"></a> 
          <a href="https://twittercommunity.com/"><img alt="X Community" src="https://github.com/discourse/discourse/assets/2790986/ebb63eee-1927-4060-ada1-cf1bc774084c.png" width="720px"></a> 
          <img src="https://user-images.githubusercontent.com/1681963/52239118-b304f800-289b-11e9-9904-16450680d9ec.jpg" alt="Mobile" width="414"> 
          Browse [lots more notable Discourse instances](https://www.discourse.org/customers). 
          ## Development 
          To get your environment set up, follow the community setup guide for your operating system. 
          1. If you're on macOS, try the [macOS development guide](https://meta.discourse.org/t/beginners-guide-to-install-discourse-on-macos-for-development/15772). 
          1. If you're on Ubuntu, try the [Ubuntu development guide](https://meta.discourse.org/t/beginners-guide-to-install-discourse-on-ubuntu-for-development/14727). 
          1. If you're on Windows, try the [Windows 10 development guide](https://meta.discourse.org/t/beginners-guide-to-install-discourse-on-windows-10-for-development/75149). 
          1. If you're looking to use a simpler Docker-based install, try the [Docker development guide](https://meta.discourse.org/t/install-discourse-for-development-using-docker/102009). 
          If you're familiar with how Rails works and are comfortable setting up your own environment, you can also try out the [**Discourse Advanced Developer Guide**](docs/DEVELOPER-ADVANCED.md), which is aimed primarily at Ubuntu and macOS environments. 
           
     
  
    
    
  
  
 
             
            
              1 Like