Replace FwLinks with the actual target links
This is a good issue for people who want to learn how to work on open-source projects.
Our content uses a lot of what we call FwLinks links. Current search brings 2,639 results for FwLink links.
The problem with those is that users have no clue to which site we're taking them if they hover the link with their mouse and also they can only be updated by employees. They were useful back in the day where we could only publish once every couple of weeks or sometimes even months.
We should keep links to downloads intact though.
For people interested in helping with this task, we'd break it down into much smaller issues (like 5-10 links per PR).
Sub-issues:
- [x] Core and F# folders - #3423
- [x] C# folder - #3424
- [x] Standard folder - #3425
- [ ] VB folder - #3426
- [ ] Framework folder
- [ ] samples repo
- [ ] api repo
2600 links sounds like way too many to do manually, especially at a rate of 10 links per PR. Wouldn't it make more sense to write a program that finds the links, accesses them to find out where they redirect and replaces them?
@mairaw Working on this currently, When you say you want download links intact, does this mean that you want them to remain FWlinks? Also, are we considering download links anything at the download.microsoft domain or are we considering it anything that isn't a web page, such as http://example.com/testfile.exe? And finally are we considering PDF and .TXT download or not if this is the case?
Also, I have noticed a lot of FWLinks in things such as .config example files, I am assuming we are only updating .MD files is this correct?
I have also noticed an xsd XML schema definition, if we are considering any non-webpage is this a download or should it be converted? Edit: I do currently have a way of doing a mass replace on all instances if a set of basic rules are put in place to avoid replacing downloads
It's fine for folks more experienced or using automated scripts to do at a higher rate. Since we were targetting this one for new GitHub users, that's why I set the limit. Otherwise, it takes longer for us to review too.
Thank you for taking this on @xaviex. My suggestion is that even with a script, we break down the PRs by folder. For example: https://github.com/dotnet/docs/tree/master/docs/core https://github.com/dotnet/docs/tree/master/docs/framework etc.
For downloads, what I meant is for links that go to https://www.microsoft.com/en-us/download/details.aspx to be kept as FwLinks. I think that everything else can be changed to their regular links.
Let's start with the .md and .xml files (which is our API reference) and then we see if we wanna change the rest.
Does that answer all your questions?
@mairaw This does answer a lot of them, and yea breaking down by folder will make things a bit easier on me too, any preference on starting folder? Also, What about any download.microsoft.com/download/ Links? Are we considering those downloads or just /en-us/download/details.aspx?
Here is an example link: "http://download.microsoft.com/download/5/9/9/599CF8A9-5FE2-426A-A536-A83F84D38BF9/WF4%20State%20Machine%20Guidance.doc"
@mariaw Also, As this is my first major push, are there any significant rules I should be following other than what is in the contributor guidelines?
yes, let's keep those download.microsoft.com as FwLinks too.
Start with the sub-folders within https://github.com/dotnet/docs/tree/master/docs. You can go in alphabetical order in there, so core, csharp, framework and so on. Would you like me to open sub-issues for these?
No @xaviex. I think our contributor guidelines should contain all our rules. But I'm here to answer any questions you might have.
If you could create those sub-issues that would be fantastic thank you!
@mairaw Okay, I'm set up to do each folder, Do you want me to use issue numbers in commit summaries?
@mairaw I just realized that /core/ only has one location that actually needs to be changed, do we want that to be its own issue or no?
@xaviex ok, let me create sub-issues. I'll create a combined one for core and fsharp then if it's just one. I'm guessing that both should have low numbers since they are newer content.
You can add the Fixes notation in the PR only. No need to add the issue in the commit itself.
@mairaw Will you add the sub-issues as checks inside this issue? Or should I watch out for them on the main issues page?
I'm doing both @xaviex. So you can create PRs targetting a specific issue and resolve them. And I'll keep track of them here.
I've opened 4 sub-issues so far. Let's see how they go. I might have to break down the framework folder in more parts since that folder will impact more than 1000+ files.
@mairaw How do I go about making a pull request for the next issue before the current one is accepted?
you need to work on different branches. just a sec
My apologies on this.
No worries @xaviex! I see that you reverted the changes already. Do you know how to switch your working branches?
Also, a great way to delete unwanted is to use rebase interactive. Not sure if you have experience with that. I'll run on that PR for you to see.
Never mind. I see that you closed the PR already. Do you want me to reopen that one or do you want to work on a branch different than master for your PR?
Here's my usual workflow:
To set up my local fork:
git clone <fork url>
git remote add upstream https://github.com/dotnet/docs.git
To start new work:
git checkout master
git fetch upstream
git rebase upstream/master
git push
git checkout -b <working-branch-name>
Then follow the usual commit, add, push, etc.
Once I want to switch and work on a different branch, I go back to master and create a new branch from master again:
git checkout master
git checkout -b <working-branch-name2>
That way I can have multiple PRs. There are other ways to accomplish the same result. I'm just sharing mine.
@mairaw csharp folder is cleaned and #3424 is closed, so the corresponding point might be checked in the checklist of this issue.
Meanwhile, #3425 (standard folder) should be reopened: I've found 58 entries with the PowerShell @(Get-ChildItem -recurse | Select-String -pattern "fwlink").Count call in docs/standard folder
Thanks for your help on working through this issue @pkulikov. Done.