If you have a better way to accomplish the same task with more ease, please create an issue or send a PR on this file and add your steps/instructions below.
Recommended to use Cmder or Windows terminal with WSL if you are on Windows.
Tools that helped in the process: Wget
Run on command-line:
wget --mirror --page-requisites --adjust-extension --convert-links -e robots=off https://example.com
or
wget -m -p -E -k -e robot=off https://example.com
Tools that helped in the process: Everything
-
Go to the path where you copied the website earlier using Wget and filter by .png, .jpg, ...
-
Select all, right-click and click on
Copy Full Name to Clipboard- This will copy the absolute path of files.
Tools that helped in the process: Visual Studio Code, paste
- Create a new file with any extension like
.mdand paste the earlier copied content from Everything and name it aspath.mdfor example.
- Replace the path till
..\developer.android.comwithhttps://developer.android.com
-
Replace
\with/ -
Create a new file called
title.md,image.mdin the same directory aspath.md -
Copy contents of
path.mdintitle.md -
Click on regex mode in VSCode and enter
.*/in the field and replace all - This will remove all the content from the string until the last/
- Enter
.pngand replace it with an empty string to get the title.
- Enter regex
^and replace with####to get a nice heading.
- Go to command-line and Merge
title.mdandpath.mdwithpaste -d "^" title.md path.md > tp.md
- Perform regex:
$(?<!\.png)(?<!\.gif)(?<!\.svg)(?<!\.jpg)(?<!\.webp)(\n)ontp.mdand replace with empty string - This will select all lines that do not end with .png, .gif, .svg, .jpg, .webp and remove their line breaks.
-
Copy contents in
path.mdand paste inimage.md -
Replace
https:with- This will make the image render in markdown.
- Go to command-line and Merge
tp.mdandimage.mdwithpaste -d \n tp.md image.md > tpi.md
- In
tpi.mdperform Regex\^to replace ^ with Ctrl+Enter (line break)
- Perform regex
^https:to replacehttps:withSource: https:- This will only replace thehttps:at the beginning of the line.
- Replace
####with<br> {Ctrl+Enter} ####- Press {Ctrl + Enter} to give line break.
- Done. This will produce the same output as in the repository.













