spee.ch/customize.md

38 lines
1 KiB
Markdown
Raw Normal View History

2018-08-10 00:39:32 +02:00
# Configure your own spee.ch
2018-10-29 22:23:51 +01:00
_note: this guide assumes you have done the []quickstart](https://github.com/lbryio/spee.ch/blob/readme-update/README.md) or [fullstart](https://github.com/lbryio/spee.ch/blob/readme-update/fullstart.md) guide and have a working spee.ch server_
2018-08-10 00:39:32 +02:00
2018-08-10 01:12:02 +02:00
## Custom Components
2018-10-29 22:23:51 +01:00
The components used by spee.ch are taken from the `client/` folder, but you can override those components by defining your own in the `client_custom/` folder.
2018-08-10 01:12:02 +02:00
### Add a new custom Logo component.
2018-08-10 00:39:32 +02:00
2018-08-10 01:12:02 +02:00
To create your own custom component to override the defaults, create a folder and an `index.jsx` file for the component in the `client_custom/src/components/` folder.
2018-08-10 00:39:32 +02:00
2018-10-29 22:23:51 +01:00
```
2018-08-10 01:12:02 +02:00
$ cd client_custom/src/components/
$ mkdir Logo
$ cd Logo
$ touch index.jsx
$ nano index.jsx
```
2018-08-10 00:39:32 +02:00
2018-08-10 01:12:02 +02:00
Create a simple react component in `index.jsx`.
2018-08-10 00:39:32 +02:00
2018-08-10 01:12:02 +02:00
```
2018-08-10 00:39:32 +02:00
import React from 'react';
2018-08-10 01:12:02 +02:00
2018-08-10 00:39:32 +02:00
function Logo () {
2018-08-10 01:12:02 +02:00
return (
<p>My Logo</p>
);
2018-08-10 00:39:32 +02:00
};
2018-08-10 01:12:02 +02:00
2018-08-10 00:39:32 +02:00
export default Logo;
```
2018-08-10 01:12:02 +02:00
Restart the server, and you should see your site with a new Logo in the top left corner!
```
$ npm run start
```