Skip to content

Commit

Permalink
feat: migrate to docusaurus
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Sep 14, 2021
1 parent ed91316 commit bf2988b
Show file tree
Hide file tree
Showing 268 changed files with 11,035 additions and 5,916 deletions.
38 changes: 21 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
.htaccess
wp-content/uploads/
wp-content/blogs.dir/
wp-content/upgrade/
wp-content/backup-db/
wp-content/advanced-cache.php
wp-content/wp-cache-config.php
sitemap.xml
*.log
wp-content/cache/
wp-content/backups/
sitemap.xml.gz
wp-config.php
node_modules
*.DS_Store
public/
db.json
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

.idea
.now
32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Website

# socket.io-website
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

Socket.IO website and blog at https://socket.io/.
## Installation

```console
yarn install
```

## Local Development

```console
yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

## Build

```console
yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

## Deployment

```console
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
80 changes: 0 additions & 80 deletions _config.yml

This file was deleted.

3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
21 changes: 11 additions & 10 deletions source/_posts/20140528-1.0.0.md → blog/2014-05-28-1.0.0.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
title: Introducing Socket.IO 1.0
permalink: /blog/introducing-socket-io-1-0/
date: 2014-05-28
author_name: Guillermo Rauch
author_link: https://twitter.com/rauchg
slug: /introducing-socket-io-1-0/
authors: rauchg
---

The first version of Socket.IO was created shortly after Node.JS made its first appearance. I had been looking for a framework that easily enabled me to push data from a server to a client for a long time, and even had tried other approaches to server-side JavaScript.

<!--truncate-->

At the time, the main focus was on an interface equivalent to the upcoming `WebSocket` API that was in the process of standardization. I was lucky to receive a lot of feedback from the community at the time (including Node.JS's creator) that helped shape the project into something significantly more useful.

Socket.IO has thus become the `EventEmitter` of the web. Today I want to talk about the work that has gone into 1.0 to round up this vision.
Expand Down Expand Up @@ -76,9 +77,9 @@ io.on('connection', function(socket){
});
```

To test how useful it would be to support binary in this particular way (and as a virtualization geek), I decided to replicate the <a href="http://en.wikipedia.org/wiki/Twitch_Plays_Pok%C3%A9mon">Twitch Plays Pokemon</a> experiment 100% in JavaScript. Using a <a href="https://github.com/grantgalitz/GameBoy-Online">JavaScript gameboy emulator</a>, <a href="http://github.com/automattic/node-canvas">node-canvas</a>, socket.io we came up with a server-rendered collaborative game that even works on IE8. Check it out on <a href="http://weplay.io/">http://weplay.io</a> (<a href="https://github.com/guille/weplay">source code here</a>).
To test how useful it would be to support binary in this particular way (and as a virtualization geek), I decided to replicate the <a href="http://en.wikipedia.org/wiki/Twitch_Plays_Pok%C3%A9mon">Twitch Plays Pokemon</a> experiment 100% in JavaScript. Using a <a href="https://github.com/grantgalitz/GameBoy-Online">JavaScript gameboy emulator</a>, <a href="http://github.com/automattic/node-canvas">node-canvas</a>, socket.io we came up with a server-rendered collaborative game that even works on IE8. Check it out on https://weplay.io (<a href="https://github.com/guille/weplay">source code here</a>).

<video id="weplay-vid" data-setup="{&quot;autoplay&quot;:true,&quot;loop&quot;:true, &quot;techOrder&quot;: [&quot;html5&quot;, &quot;flash&quot;], &quot;height&quot;: 300}" class="video-js vjs-default-skin" autoplay loop width="100%" poster="https://i.cloudup.com/aNZqxnZzHv.png"><source src="https://i.cloudup.com/transcoded/KL-0r-E2Gj.mp4" type="video/mp4"></video>
<video id="weplay-vid" data-setup="{&quot;autoplay&quot;:true,&quot;loop&quot;:true, &quot;techOrder&quot;: [&quot;html5&quot;, &quot;flash&quot;], &quot;height&quot;: 300}" className="video-js vjs-default-skin" autoPlay loop width="100%" poster="https://i.cloudup.com/aNZqxnZzHv.png"><source src="https://i.cloudup.com/transcoded/KL-0r-E2Gj.mp4" type="video/mp4" /></video>

The relevant code that sends the image data is:

Expand All @@ -89,9 +90,9 @@ self.canvas.toBuffer(function(err, buf){
});
```

The next experiment was to run an instance of <a href="http://wiki.qemu.org/Main_Page">QEMU</a> running an image of Windows XP, in honor of <a href="http://indianexpress.com/article/technology/technology-others/windows-xp-end-of-support-today/">its retirement</a>. Every player gets a 15 second turn to control the machine. Check out the demo on <a href="http://socket.computer/">http://socket.computer</a>. Here's a video of your typical inception scenario:
The next experiment was to run an instance of <a href="http://wiki.qemu.org/Main_Page">QEMU</a> running an image of Windows XP, in honor of <a href="http://indianexpress.com/article/technology/technology-others/windows-xp-end-of-support-today/">its retirement</a>. Every player gets a 15 second turn to control the machine. Check out the demo on http://socket.computer. Here's a video of your typical inception scenario:

<video id="computer-vid" data-setup="{&quot;autoplay&quot;:true,&quot;loop&quot;:true, &quot;techOrder&quot;: [&quot;html5&quot;, &quot;flash&quot;], &quot;height&quot;: 300}" class="video-js vjs-default-skin" autoplay loop width="100%"><source src="https://i.cloudup.com/transcoded/Cuqn5OLmcl.mp4" type="video/mp4"></video>
<video id="computer-vid" data-setup="{&quot;autoplay&quot;:true,&quot;loop&quot;:true, &quot;techOrder&quot;: [&quot;html5&quot;, &quot;flash&quot;], &quot;height&quot;: 300}" className="video-js vjs-default-skin" autoPlay loop width="100%"><source src="https://i.cloudup.com/transcoded/Cuqn5OLmcl.mp4" type="video/mp4" /></video>

A key part of putting together this demo was connecting to the QEMU VNC server and implementing the RFB protocol. As it's usually the case with Node.JS, the solution was a `npm search rfb` away.

Expand All @@ -111,7 +112,7 @@ It then became clear to me that our support for binary data would be genuinely u

Just for fun, I also installed and ran one of my favorite first person shooters:

<video id="cs-vid" data-setup="{&quot;autoplay&quot;:true,&quot;loop&quot;:true, &quot;techOrder&quot;: [&quot;html5&quot;, &quot;flash&quot;], &quot;height&quot;: 300}" class="video-js vjs-default-skin" autoplay loop width="100%"><source src="https://i.cloudup.com/transcoded/Ra6PJnoLBq.mp4" type="video/mp4"></video>
<video id="cs-vid" data-setup="{&quot;autoplay&quot;:true,&quot;loop&quot;:true, &quot;techOrder&quot;: [&quot;html5&quot;, &quot;flash&quot;], &quot;height&quot;: 300}" className="video-js vjs-default-skin" autoPlay loop width="100%"><source src="https://i.cloudup.com/transcoded/Ra6PJnoLBq.mp4" type="video/mp4" /></video>

## Automated Testing

Expand Down Expand Up @@ -184,7 +185,7 @@ The basic idea is that each module used by Socket.IO provides different debuggin
You can see it in action for example on our homepage:
<video id="debugging-vid" data-setup="{&quot;autoplay&quot;:true,&quot;loop&quot;:true, &quot;techOrder&quot;: [&quot;html5&quot;, &quot;flash&quot;], &quot;height&quot;: 300}" class="video-js vjs-default-skin" autoplay loop width="100%"><source src="https://i.cloudup.com/transcoded/IL9alTr0eO.mp4" type="video/mp4"></video>
<video id="debugging-vid" data-setup="{&quot;autoplay&quot;:true,&quot;loop&quot;:true, &quot;techOrder&quot;: [&quot;html5&quot;, &quot;flash&quot;], &quot;height&quot;: 300}" className="video-js vjs-default-skin" autoPlay loop width="100%"><source src="https://i.cloudup.com/transcoded/IL9alTr0eO.mp4" type="video/mp4" /></video>
## Streamlined APIs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
---
title: Native Socket.IO and Android
permalink: /blog/native-socket-io-and-android/
date: 2015-01-20
author_name: Naoyuki Kanezawa
author_link: https://twitter.com/nkzawa
slug: /blog/native-socket-io-and-android/
authors:
- name: Naoyuki Kanezawa
title: Maintainer of Socket.IO
url: https://twitter.com/nkzawa
image_url: https://github.com/nkzawa.png
---

<img class="aligncenter size-full wp-image-626" src="/images/androidchat.gif" alt="android chat demo" width="338" height="600"/>

In this tutorial well learn how to create a chat client that communicates with a Socket.IO <a href="https://github.com/socketio/socket.io/blob/master/examples/chat/index.js">Node.JS chat server</a>, with our <a href="https://github.com/socketio/socket.io-client-java">native Android Client</a>! If you want to jump straight to the code, it's on <a href="https://github.com/nkzawa/socket.io-android-chat">GitHub</a>. Otherwise, read on!

<!--truncate-->

## Introduction

To follow along, start by cloning the repository: <a title="socket.io-android-chat" href="https://github.com/nkzawa/socket.io-android-chat" target="_blank">socket.io-android-chat</a>.
Expand Down
7 changes: 3 additions & 4 deletions source/_posts/20150204-1.3.3.md → blog/2015-02-04-1.3.3.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
title: Socket.IO 1.3.3
permalink: /blog/socket-io-1-3-3/
date: 2015-02-04
author_name: Guillermo Rauch
author_link: https://twitter.com/rauchg
slug: /socket-io-1-3-3/
authors: rauchg
---

Socket.IO **1.3.3** is a backwards-compatible **recommended upgrade** for everyone.
Expand Down
7 changes: 3 additions & 4 deletions source/_posts/20150214-1.3.4.md → blog/2015-02-14-1.3.4.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
title: Socket.IO 1.3.4
permalink: /blog/socket-io-1-3-4/
date: 2015-02-14
author_name: Guillermo Rauch
author_link: https://twitter.com/rauchg
slug: /socket-io-1-3-4/
authors: rauchg
---

Socket.IO **1.3.4** corrects the `1.3.3` build that included extra unused code.
Expand Down
7 changes: 3 additions & 4 deletions source/_posts/20150303-1.3.5.md → blog/2015-03-03-1.3.5.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
title: Socket.IO 1.3.5
permalink: /blog/socket-io-1-3-5/
date: 2015-03-03
author_name: Guillermo Rauch
author_link: https://twitter.com/rauchg
slug: /socket-io-1-3-5/
authors: rauchg
---

Socket.IO **1.3.5** addresses a parser issue. Upgrade recommended. Completely backwards-compatible.
Expand Down
15 changes: 11 additions & 4 deletions source/_posts/20150309-ios.md → blog/2015-03-09-ios.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
---
title: Socket.IO on iOS
permalink: /blog/socket-io-on-ios/
date: 2015-03-09
author_name: Erik Little
slug: /socket-io-on-ios/
authors:
- name: Erik Little
title: Maintainer of the iOS client
url: https://twitter.com/nuclearace
image_url: https://github.com/nuclearace.png

author_link: https://twitter.com/nukeace
---

<video class="gfyVidIframe" id="gfyVid" autoplay="" loop="" style="-webkit-backface-visibility: hidden;-webkit-transform: scale(1);" height="574" width="323"><source id="webmsource" src="//fat.gfycat.com/EssentialBlueElectriceel.webm" type="video/webm"><source id="mp4source" src="//giant.gfycat.com/EssentialBlueElectriceel.mp4" type="video/mp4"></video>
<video className="gfyVidIframe" id="gfyVid" autoPlay="" loop="" height="574" width="323"><source id="webmsource" src="//fat.gfycat.com/EssentialBlueElectriceel.webm" type="video/webm" /><source id="mp4source" src="//giant.gfycat.com/EssentialBlueElectriceel.mp4" type="video/mp4" /></video>

We are pleased to announce the immediate availability of the <a href="https://github.com/socketio/socket.io-client-swift">Socket.IO Swift Client</a>! Youll now be able to write code that runs natively on **iOS** and **OSX**, while maintaining the simplicity and expressiveness of the JavaScript client!

<!--truncate-->

```swift
import Foundation
let socket = SocketIOClient(socketURL: "localhost:8880")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
---
title: Socket.IO C++
permalink: /blog/socket-io-cpp/
date: 2015-04-13
author_name: Melo Yao
author_link: https://twitter.com/melode111
slug: /socket-io-cpp/
authors:
- name: Melo Yao
title: Maintainer of the C++ client
url: https://twitter.com/melode111
image_url: https://github.com/melode11.png
---

I'm really proud to announce the first release of the <a href="https://github.com/socketio/socket.io-client-cpp">Socket.IO C++ Client</a> on GitHub!

<!--truncate-->

Based on <a href="http://www.boost.org/">Boost</a> and <a href="https://github.com/zaphoyd/websocketpp">WebSocket++</a>, this full-featured Socket.IO 1.0 client has the fundamental advantage of working on **multiple platforms**. Check out the directory of <a href="https://github.com/socketio/socket.io-client-cpp/tree/master/examples">examples</a>. It contains examples of iOS, QT, and CLI chat clients!

To learn how to use this client, I put together a QT chat example that communicates using a <a href="https://github.com/Automattic/socket.io/tree/master/examples/chat">Socket.IO Node.JS chat server</a>. Keep reading for step-by-step instructions.

<p style="text-align: center">
<img src="https://cldup.com/98tHyoJJE7.gif">
<p style={{ 'text-align': 'center' }}>
<img src="https://cldup.com/98tHyoJJE7.gif" />
</p>

## Introduction
Expand Down Expand Up @@ -101,8 +106,8 @@ else:unix: LIBS += -L`our osx boost static lib folder` -lboost

Create a simple UI by dragging and dropping a widget from the widget box on the left-hand side.

<p style="text-align: center">
<img src="https://cldup.com/RI98CYpYL5.png">
<p style={{ 'text-align': 'center' }}>
<img src="https://cldup.com/RI98CYpYL5.png" />
</p>

It contains the following:
Expand Down Expand Up @@ -142,8 +147,8 @@ In the connection editor, edit the main window slots on the right side. Add the

Then we can connect the event signal to the widget with our own slots. The result should look like this:

<p style="text-align: center">
<img src="https://cldup.com/Vsb-UXG3FC.jpg">
<p style={{ 'text-align': 'center' }}>
<img src="https://cldup.com/Vsb-UXG3FC.jpg" />
</p>

## Adding UI Refresh Signals/Slots
Expand Down
Loading

1 comment on commit bf2988b

@vercel
Copy link

@vercel vercel bot commented on bf2988b Sep 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.