github1s README

The project's README from github.com/conwnet/github1s. As one markdown file: README.md.

GitHub1s

github1s

One second to read GitHub code with VS Code.

Usage

Just add 1s after github and press Enter in the browser address bar for any repository you want to read.

For example, try it on the VS Code repo:

https://github1s.com/microsoft/vscode

VS Code - GitHub1s

You can also use https://gitlab1s.com or https://npmjs1s.com in the same way.

For browser extensions, see Third-party Related Projects.

Or save the following code snippet as a bookmarklet, you can use it to quickly switch between github.com and github1s.com (GitHub markdown doesn't allow js links, so just copy it into a bookmark).

javascript: window.location.href = window.location.href.replace(/github(1s)?.com/, function(match, p1) { return p1 ? 'github.com' : 'github1s.com' })

Develop in the cloud

To edit files, run Docker containers, create pull requests and more, click the "Develop your project on Gitpod" button in the status bar. You can also open the Command Palette (default shortcut Ctrl+Shift+P) and choose GitHub1s: Edit files in Gitpod.

Gitpod Status Bar

Documentation

Enabling Private Repositories

If you want to view non-public repositories, you need to add an OAuth token. The token is stored only in your browser, and only send to GitHub when fetching your repository's files. Click on the icon near the bottom of the left-hand row of icons, and the dialog box will prompt you for it, and even take you to your GitHub settings page to generate one, if needed.

Screenshots

VS Code - GitHub1s

VS Code - GitHub1s

Development

Cloud-based development

You can start an online development environment with Gitpod by clicking the following button:

Gitpod ready-to-code

Local development

git clone [email protected]:conwnet/github1s.git
cd github1s
npm install
npm run watch
# The cli will automatically open http://localhost:8080 once the build is completed.
# You can visit http://localhost:8080/conwnet/github1s if it doesn't.

Local development with full VS Code build

You need these prerequisites (the same ones as for VS Code) for development with full VS Code build. Please make sure you could build VS Code locally before the watch mode.

To verify the build:

cd github1s
npm run build:vscode

After the initial successful build, you could use the watch mode:

cd github1s
npm install
npm run watch-with-vscode
# The cli will automatically open http://localhost:8080 once the build is completed.
# You can visit http://localhost:8080/conwnet/github1s if it doesn't.

... or ... VS Code + Docker Development

You can use the VS Code plugin Remote-Containers Dev Container to use a Docker container as a development environment.

  1. Install the Remote-Containers plugin in VS Code & Docker

  2. Open the Command Palette (default shortcut Ctrl+Shift+P) and choose Remote-Containers: Clone Repository in Container Volume...

  3. Enter the repo, in this case https://github.com/conwnet/github1s.git or your forked repo

  4. Pick either, Create a unique volume or Create a new volume

    • Now VS Code will create the docker container and connect to the new container so you can use this as a fully setup environment!
  5. Open a new VS Code Terminal, then you can run the npm install commands listed above.

npm install
npm run watch
# The cli will automatically open http://localhost:8080 once the build is completed.
# You can visit http://localhost:8080/conwnet/github1s if it doesn't.

Format all codes

npm run format

It uses prettier to format all possible codes.

Build

npm install
npm run build

Feedback

Sponsors

The continued development and maintenance of GitHub1s is made possible by these generous sponsors:

Partners

We are partnered with OSS Insight to get the Trending Repositories & some more Interesting Analytics. OSS Insight provides deep insights into GitHub repos, developers, and curated repo lists from billions of GitHub events. It’s built with TiDB Cloud.

Maintainers! :blush:


netcon

💻 🖋

xcv58

💻 🖋

Siddhant Khare

💻 🖋

Stargazers over time

Stargazers over time

Third-party Related Projects

Chrome Extensions

Firefox Extensions

Microsoft Edge Extensions

Safari Extension

Tampermonkey scripts

github1s (conwnet/github1s)

Searching Database…

23.3K ·GitHub
这是干什么的?github1s 是一个免费的网页应用,可以直接在浏览器里用完整的 VS Code 风格编辑器打开任何 GitHub 仓库。这样你就能带着文件树和编辑器来读代码,而不用在 github.com 上一页一页地点来点去。
它是一个我直接访问的网站,还是需要安装的东西?它就是一个网站——github1s.com——什么都不用安装。另外还有一些可选的浏览器扩展和一个书签脚本,在 README 里列为第三方项目,如果你想从 github.com 一键跳转过去,可以用它们。
我怎么用它打开一个仓库?在浏览器地址栏里,把仓库地址中的 github 后面加上 1s——github.com/user/repo 就变成 github1s.com/user/repo——然后按回车。只要是你能打开的仓库地址,都可以这样操作。
私有仓库也能用吗?可以,但你需要通过左侧图标栏最下方的图标添加一个 GitHub OAuth 令牌——弹出的对话框甚至会带你去 GitHub 的令牌设置页面生成一个。除了从 GitHub 拉取你的文件之外,这个令牌不会离开你的浏览器。
它为什么叫 github1s?这个名字就来自那个网址小技巧:在域名里插入 1s,github.com 就变成 github1s.com——仓库大约一秒钟内就能以 VS Code 界面打开。
使用它要花钱吗?不用。网站完全免费,而且整个项目基于 MIT 许可证开源。
哪些浏览器有现成的扩展?社区为 Chrome、Firefox、Microsoft Edge 和 Safari 都做了扩展,还有 Tampermonkey 脚本——全部列在 README 的 Third-party Related Projects 一节里。
Creator
conwnet
Size
19.3 MB
Stars
23.3K
Age
7y
Commits · 90 Days