ENH: Solution for issue #39859 | Added documentation source link to each page
State: closed

- [ ] closes #39859 
- [ ] Manual tests were done on a local machine to make sure that the URL splicing was correct and the source docs link was tested in a docker container.
- [ ] whatsnew entry


Labels:
name: Docs
name: Stale

Comments:
> Could you please show an example (as screenshot for example)

Hello, I apologize for the late response. Finals week and everything at the end of the semester was kind of crazy.

Attached below are some screenshots of what I am looking for:

For the 1st screenshot:

![ENH Code](https://user-images.githubusercontent.com/63566358/146068303-5fdfda42-7365-438e-a6d0-d2aa2b1dfc54.png)
 
This is a code snippet (same as the PR except for line 39) that demonstrates what I am trying to do.

For the 2nd screenshot:

![Screen Shot 2021-12-14 at 2 39 10 PM](https://user-images.githubusercontent.com/63566358/146068358-24ceb13c-d57a-4dcd-99d6-8a928bedfc7e.png)

A UI showing the result would be on each documentation page.

I have tested this locally and the URL splicing works well - I would love to continue working on this feature until hopefully, it gets accepted. Thank you and I look forward to your response.
> > Could you please show an example (as screenshot for example)
> 
> Hello, I apologize for the late response. Finals week and everything at the end of the semester was kind of crazy.
> 
> Attached below are some screenshots of what I am looking for:
> 
> For the 1st screenshot:
> 
> ![ENH Code](https://user-images.githubusercontent.com/63566358/146068303-5fdfda42-7365-438e-a6d0-d2aa2b1dfc54.png)
> 
> This is a code snippet (same as the PR except for line 39) that demonstrates what I am trying to do.
> 
> For the 2nd screenshot:
> 
> ![Screen Shot 2021-12-14 at 2 39 10 PM](https://user-images.githubusercontent.com/63566358/146068358-24ceb13c-d57a-4dcd-99d6-8a928bedfc7e.png)
> 
> A UI showing the result would be on each documentation page.
> 
> I have tested this locally and the URL splicing works well - I would love to continue working on this feature until hopefully, it gets accepted. Thank you and I look forward to your response.

Also, I wanted to briefly explain my thought process:

I have decided to place the source link, named "Source Documentation" on the sidebar of each documentation page in the sidebar template file.

To make sure that the proper URL is accessed, I broke down the URL into three parts:

1. Base URL (line 39 in code screenshot above) (Ex: https://github.com/pandas-dev/pandas/blob/master/doc/source/)
2. Path of file: (line 22 in code screenshot above) (Ex: getting_started/tutorials)
3. replacing ".html" with ".rst": (line 23 in code screenshot above) (Ex: .rst)

Full URL: https://github.com/pandas-dev/pandas/blob/master/doc/source/getting_started/tutorials.rst

This way, we can ensure that we always access the proper .rst file each time the link is clicked on a given documentation page.
> > > Could you please show an example (as screenshot for example)
> > 
> > 
> > Hello, I apologize for the late response. Finals week and everything at the end of the semester was kind of crazy.
> > Attached below are some screenshots of what I am looking for:
> > For the 1st screenshot:
> > ![ENH Code](https://user-images.githubusercontent.com/63566358/146068303-5fdfda42-7365-438e-a6d0-d2aa2b1dfc54.png)
> > This is a code snippet (same as the PR except for line 39) that demonstrates what I am trying to do.
> > For the 2nd screenshot:
> > ![Screen Shot 2021-12-14 at 2 39 10 PM](https://user-images.githubusercontent.com/63566358/146068358-24ceb13c-d57a-4dcd-99d6-8a928bedfc7e.png)
> > A UI showing the result would be on each documentation page.
> > I have tested this locally and the URL splicing works well - I would love to continue working on this feature until hopefully, it gets accepted. Thank you and I look forward to your response.
> 
> Also, I wanted to briefly explain my thought process:
> 
> I have decided to place the source link, named "Source Documentation" on the sidebar of each documentation page in the sidebar template file.
> 
> To make sure that the proper URL is accessed, I broke down the URL into three parts:
> 
> 1. Base URL (line 39 in code screenshot above) (Ex: https://github.com/pandas-dev/pandas/blob/master/doc/source/)
> 2. Path of file: (line 22 in code screenshot above) (Ex: getting_started/tutorials)
> 3. replacing ".html" with ".rst": (line 23 in code screenshot above) (Ex: .rst)
> 
> Full URL: https://github.com/pandas-dev/pandas/blob/master/doc/source/getting_started/tutorials.rst
> 
> This way, we can ensure that we always access the proper .rst file each time the link is clicked on a given documentation page.

Hi @phofl I was wondering if you had seen my recent comments? Thank you for your time and help.
> > > > Could you please show an example (as screenshot for example)
> > > 
> > > 
> > > Hello, I apologize for the late response. Finals week and everything at the end of the semester was kind of crazy.
> > > Attached below are some screenshots of what I am looking for:
> > > For the 1st screenshot:
> > > ![ENH Code](https://user-images.githubusercontent.com/63566358/146068303-5fdfda42-7365-438e-a6d0-d2aa2b1dfc54.png)
> > > This is a code snippet (same as the PR except for line 39) that demonstrates what I am trying to do.
> > > For the 2nd screenshot:
> > > ![Screen Shot 2021-12-14 at 2 39 10 PM](https://user-images.githubusercontent.com/63566358/146068358-24ceb13c-d57a-4dcd-99d6-8a928bedfc7e.png)
> > > A UI showing the result would be on each documentation page.
> > > I have tested this locally and the URL splicing works well - I would love to continue working on this feature until hopefully, it gets accepted. Thank you and I look forward to your response.
> > 
> > 
> > Also, I wanted to briefly explain my thought process:
> > I have decided to place the source link, named "Source Documentation" on the sidebar of each documentation page in the sidebar template file.
> > To make sure that the proper URL is accessed, I broke down the URL into three parts:
> > 
> > 1. Base URL (line 39 in code screenshot above) (Ex: https://github.com/pandas-dev/pandas/blob/master/doc/source/)
> > 2. Path of file: (line 22 in code screenshot above) (Ex: getting_started/tutorials)
> > 3. replacing ".html" with ".rst": (line 23 in code screenshot above) (Ex: .rst)
> > 
> > Full URL: https://github.com/pandas-dev/pandas/blob/master/doc/source/getting_started/tutorials.rst
> > This way, we can ensure that we always access the proper .rst file each time the link is clicked on a given documentation page.
> 
> Hi @phofl I was wondering if you had seen my recent comments? Thank you for your time and help.

Hello @phofl , I was wondering if you had seen my recent comments? Thank you.
> > > > > Could you please show an example (as screenshot for example)
> > > > 
> > > > 
> > > > Hello, I apologize for the late response. Finals week and everything at the end of the semester was kind of crazy.
> > > > Attached below are some screenshots of what I am looking for:
> > > > For the 1st screenshot:
> > > > ![ENH Code](https://user-images.githubusercontent.com/63566358/146068303-5fdfda42-7365-438e-a6d0-d2aa2b1dfc54.png)
> > > > This is a code snippet (same as the PR except for line 39) that demonstrates what I am trying to do.
> > > > For the 2nd screenshot:
> > > > ![Screen Shot 2021-12-14 at 2 39 10 PM](https://user-images.githubusercontent.com/63566358/146068358-24ceb13c-d57a-4dcd-99d6-8a928bedfc7e.png)
> > > > A UI showing the result would be on each documentation page.
> > > > I have tested this locally and the URL splicing works well - I would love to continue working on this feature until hopefully, it gets accepted. Thank you and I look forward to your response.
> > > 
> > > 
> > > Also, I wanted to briefly explain my thought process:
> > > I have decided to place the source link, named "Source Documentation" on the sidebar of each documentation page in the sidebar template file.
> > > To make sure that the proper URL is accessed, I broke down the URL into three parts:
> > > 
> > > 1. Base URL (line 39 in code screenshot above) (Ex: https://github.com/pandas-dev/pandas/blob/master/doc/source/)
> > > 2. Path of file: (line 22 in code screenshot above) (Ex: getting_started/tutorials)
> > > 3. replacing ".html" with ".rst": (line 23 in code screenshot above) (Ex: .rst)
> > > 
> > > Full URL: https://github.com/pandas-dev/pandas/blob/master/doc/source/getting_started/tutorials.rst
> > > This way, we can ensure that we always access the proper .rst file each time the link is clicked on a given documentation page.
> > 
> > 
> > Hi @phofl I was wondering if you had seen my recent comments? Thank you for your time and help.
> 
> Hello @phofl , I was wondering if you had seen my recent comments? Thank you.

Hello @jreback, I was wondering if you could take a look at this chain of comments? I have been waiting for an update on my PR and I would appreciate it if it was reviewed. Thank you.
> Could you please show an example (as screenshot for example)

Hello, I was wondering if you saw my previous chain of replies? I wasn't sure if they were being sent properly, but I have sent quite a few comments on this thread regarding your question. Thank you; I want to help resolve this issue.
Hi @ADing4818 - does the link always link to https://github.com/pandas-dev/pandas/tree/master/doc/source/ ? Reading the issue, I think the suggestion was that for each page, the link would go to where in the docs _that_ page was is generated
This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.
Closing for now, let us know if you're still interested in it