Nothing Special   »   [go: up one dir, main page]

Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

[DEPRECATED] moved to https://github.com/republik/plattform Our CMS frontend, including a rich text editor implemented with Slate.

License

Notifications You must be signed in to change notification settings

orbiting/publikator-frontend

Repository files navigation

[DEPRECATED] Publikator Frontend

⚠️ This repository together with others has been merged into the republik/plattform monorepo. Let's continue the journey there. ⚠️

A CMS prototype: an Editor implemented with Slate and saving content on GitHub via an API.

Development code names: Mauka, Haku

Usage

Quick start

This frontend needs an API, provided by publikator-backend, running on the same TLD (for cookie sharing).

Install and run:

npm install
npm run dev

Environment

You can use a git-excluded .env file in development.

Bootstrap your .env file:

cp .env.example .env

Make sure to adapt GITHUB_ORG to the GITHUB_LOGIN used in the backend env.

Piwik

You can enable tracking by setting a base url and site id:

PIWIK_URL_BASE=https://piwik.example.com
PIWIK_SITE_ID=1

Theming

Your logo, fonts and colors? See orbiting/styleguide

Linking the Styleguide

Want to change code in the styleguide and preview how it looks and behaves here?

Here are the steps:

cd ../styleguide
npm i
npm link

cd ../publikator-frontend
npm i
# deeply link styleguide and some peers
# and add a tmp preinstall script to unlink
npm run sg:link

# do your work

# simply run npm install to unlink
# rm the links and the tmp preinstall script
# reinstall stuff via npm
npm i

Why? glamor, react and react-dom use singletons. And peerDependencies are not flattened when npm linked—two versions with their own singletons end up running. While linked this way those packages are linked to the styleguide node_modules folder.

Templates

You can limit the available templates:

TEMPLATES=newsletter,neutrum

Default is all.

Repo Prefix

You can prefix all repos name on creation:

REPO_PREFIX=newsletter-

Default is none.

Will be combined with template specific prefixes.

License

The source code is «BSD 3-clause» licensed.