This is a web-browser only proof-of concept for an editor. The editor runs in the browser and reads/writes to GitHub via API. It shows all changes in a live preview.
Future Goal of this editor: Guide users to make changes to the documentation up to the point where they create a pull request.
The name of this editor is inspired by the writer Anita Brenner.
Go to https://anita-editor.ahus1.de/ and follow the instructions.
This application uses the GitHub API. To be able to log-in during development mode, the CLIENT_ID and CLIENT_SECRET for a GitHub OAuth app need to be set. Each OAuth app has a specific “Authorization callback URL”. As all development will run on localhost, developers need to setup a new OAuth application in their developer settings to start local development.
To do this, register an application at https://github.com/settings/developers and put the client ID and secret in the respective configuration files.
Follow these steps to do this:
-
Click on “New OAuth App”
-
Fill the blanks with the following details:
- Application name
-
AsciiDoc Web Editor Development
- Homepage URL
- Application description
-
(optional, can be blank)
- Authorization callback URL
-
Configure the frontend in file .env, use .env.sample as a example
-
Configure the backend in file lamba/.env, use lambda/.env.sample as a example
-
Start in development mode for the frontend
yarn install yarn serve
-
Start in development mode for the backend
cd lambda yarn install yarn serve
-
Go do http://localhost:8080 for a preview.
For the login at GitHub to work, the application needs to be registered as an OAuth application with the production URL as callback. The client ID and secret should then be provided as environment variables.
Follow these steps to do this:
-
Click on “New OAuth App”
-
Fill the blanks with the following details:
- Application name
-
AsciiDoc Web Editor Development
- Homepage URL
-
(production URL)
- Application description
-
(optional, but should receive a meaningful description)
- Authorization callback URL
-
(production URL)
-
Set environment variables CLIENT_ID and CLIENT_SECRET with their respective values
Optional: to enable the Netlify notifications via Telegram on deploys, add API_TOKEN/CHAT_ID for the relevant bot.