fix links in docs, move frontend readme to site

This commit is contained in:
Dmitry Verkhoturov 2021-10-26 00:19:16 +02:00 committed by Umputun
parent 8fc9141f19
commit b3d28f97ae
8 changed files with 10 additions and 48 deletions

View File

@ -1,4 +1,4 @@
# Remark42 [![Build Status](https://github.com/umputun/remark42/workflows/build/badge.svg)](https://github.com/umputun/remark42/actions) [![Go Report Card](https://goreportcard.com/badge/github.com/umputun/remark42)](https://goreportcard.com/report/github.com/umputun/remark42) [![Coverage Status](https://coveralls.io/repos/github/umputun/remark42/badge.svg?branch=master)](https://coveralls.io/github/umputun/remark42?branch=master) [![codecov](https://codecov.io/gh/umputun/remark42/branch/master/graph/badge.svg)](https://codecov.io/gh/umputun/remark42)
# Remark42 [![Build Status](https://github.com/umputun/remark42/workflows/build/badge.svg)](https://github.com/umputun/remark42/actions) [![Go Report Card](https://goreportcard.com/badge/github.com/umputun/remark42)](https://goreportcard.com/report/github.com/umputun/remark42) [![Coverage Status](https://coveralls.io/repos/github/umputun/remark42/badge.svg?branch=master)](https://coveralls.io/github/umputun/remark42?branch=master) [![codecov](https://codecov.io/gh/umputun/remark42/branch/master/graph/badge.svg)](https://app.codecov.io/gh/umputun/remark42)
Remark42 is a self-hosted, lightweight and simple (yet functional) comment engine, which doesn't spy on users. It can be embedded into blogs, articles, or any other place where readers add comments.
@ -22,7 +22,7 @@ Remark42 is a self-hosted, lightweight and simple (yet functional) comment engin
* Self-contained executable can be deployed directly to Linux, Windows and macOS
* Clean, lightweight and customizable UI with white and dark themes
* Multi-site mode from a single instance
* Integration with automatic SSL (direct and via [nginx-le](https://github.com/umputun/nginx-le))
* Integration with automatic SSL (direct and via [nginx-le](https://github.com/nginx-le/nginx-le))
* [Privacy focused](#privacy)
[Demo site](https://remark42.com/demo/) available with all authentication methods, including email auth and anonymous access.

View File

@ -1,4 +1,4 @@
# example of nginx proxy to use with nginx-le - https://github.com/umputun/nginx-le
# example of nginx proxy to use with nginx-le - https://github.com/nginx-le/nginx-le
server {
listen 443;

View File

@ -1,37 +1 @@
# Frontend guide
### Code Style
* project uses TypeScript to statically analyze code
* project uses `eslint` and `stylelint` to check frontend code. You can manually run via `npm run lint`
* Git Hooks (via husky) installed automatically on `npm install` and check and try to fix code style if possible, otherwise commit will be rejected
* if you want IDE integration, you need `eslint` and `stylelint` plugin to be installed
### CSS Styles
* now we are migrating to CSS Modules and this is a recommended way to stylization. A file with styles should be named like `component.module.css`
* old component styles use BEM notation (at least it should): `block__element_modifier`. Also, there are `mix` classes: `block_modifier`
* new way to naming CSS selectors is camel-case like `blockElemenModifier` and use `classnames` to combine it
* component base style resides in the component's root directory with a name of component converted to kebab-case. For example, `ListComments` style is located in `./app/components/list-comments/list-component.tsx`
* any other files should be named also in kebab-case. For example, `./app/utils/get-param.ts`
### Imports
* imports for TypeScript, JavaScript files should be without extension: `./index`, not `./index.ts`
* if the file resides in the same directory or subdirectory import should be relative: `./types/something`
* otherwise it should be imported by absolute path relative to `src` folder like `common/store` which mapped to `./app/common/store.ts` in webpack, tsconfig and Jest
### Testing
* project uses `jest` as test harness
* Jest checks files that match regex `\.(test|spec)\.ts(x?)$`, i.e. `comment.test.tsx`, `comment.spec.ts`
* tests are running on push attempt
* example tests can be found in `./app/store/user/reducers.test.ts`, `./app/components/auth-panel/auth-panel.test.tsx`
### How to add new locale
Please see [this documentation](/site/src/docs/contributing/translations/index.md).
### Notes
* frontend part being bundled on docker env gets placed on `/src/web` and is available via `http://{host}/web`. For example, `embed.js` entry point will be available at `http://{host}/web/embed.js`
Please refer to [documentation](https://remark42.com/docs/contributing/development/frontend/).

View File

@ -61,7 +61,7 @@ And then add this node in the place where you want to see Remark42 widget:
After that widget will be rendered inside this node.
If you want to set this up on a Single Page App, see [appropriate doc page](site/src/docs/configuration/frontend/index.md).
If you want to set this up on a Single Page App, see [appropriate doc page](https://remark42.com/docs/configuration/frontend/).
##### Themes
@ -75,7 +75,7 @@ window.REMARK42.changeTheme('light');
Right now Remark42 is translated to English (en), Belarusian (be), Brazilian Portuguese (bp), Bulgarian (bg), Chinese (zh), Finnish (fi), French (fr), German (de), Japanese (ja), Korean (ko), Polish (pl), Russian (ru), Spanish (es), Turkish (tr), Ukrainian (ua), Italian (it) and Vietnamese (vi) languages. You can pick one using [configuration object](https://remark42.com/docs/getting-started/installation/#setup-on-your-website).
Do you want to translate Remark42 to other locales? Please see [this documentation](site/src/docs/contributing/translations/index.md) for details.
Do you want to translate Remark42 to other locales? Please see [this documentation](https://remark42.com/docs/contributing/translations/) for details.
#### Last comments

View File

@ -32,7 +32,7 @@ title: Frontend Development Guidelines
### How to add new locale
Please see [this documentation](/site/src/docs/contributing/translations/index.md).
Please see [this documentation](https://remark42.com/docs/contributing/translations/).
### Notes

View File

@ -32,9 +32,7 @@ To run backend - `cd backend; go run app/main.go server --dbg --secret=12345 --u
### Frontend development
#### Developer guide
Brief frontend guide can be found [here](https://github.com/umputun/remark42/tree/master/frontend#readme).
Frontend development guide can be found [here](https://remark42.com/docs/contributing/development/frontend/).
#### Build

View File

@ -35,7 +35,7 @@ below in order to have your translation start being available to all remark42 us
1. Run `npm run translation:extract` in `frontend` folder
1. Run `npm run translation:generate` in `frontend` folder
1. Translate all values in the newly created json file in
[frontend/app/locales/](https://github.com/umputun/remark42/blob/master/frontend/app/locales/)
[frontend/app/locales/](https://github.com/umputun/remark42/tree/master/frontend/app/locales)
1. Commit all changes above in your fork
1. Test your changes in the interface:

View File

@ -67,4 +67,4 @@ Put the next code snippet on a page of your site where you want to have comments
After that widget will be rendered inside this node.
If you want to set this up on a Single Page App, see [appropriate doc page](https://github.com/umputun/remark42/blob/master/site/src/docs/configuration/frontend/index.md).
If you want to set this up on a Single Page App, see [appropriate doc page](https://remark42.com/docs/configuration/frontend/).