GithubHelp home page GithubHelp logo

gregoirehebert / website Goto Github PK

View Code? Open in Web Editor NEW

This project forked from api-platform/website

0.0 1.0 0.0 4.77 MB

The API Platform website

Home Page: https://api-platform.com

License: MIT License

JavaScript 89.72% CSS 10.28%

website's Introduction

Calavera React Client

This is the client part of Calavera. It allows to create a nice website from a Git repository containing Markdown docs.

Features

  • Renders a repository containing Markdown docs in HTML
  • Exposes docs and metadata (authors, modification dates...) through a JSON-LD API
  • Single Page Application built with React, Redux and React Router
  • Universal Rendering (Server-Side Rendering)
  • Bootstrap theme
  • Edit on GitHub link
  • Google Analytics integration
  • Docker setup
  • Easy to customize

Install

Be sure to have Docker installed on your machine the:

  1. Install the client:

git clone https://github.com/dunglas/calavera-react-client

  1. Clone the Git repository containing Markdown files in the data directory:

git clone https://github.com/api-platform/docs data-src

  1. Generate .jsonld files using Calavera:

docker run -v $PWD/data-src:/in -v $PWD/src/static/data:/out dunglas/calavera /in /out

  1. Copy assets and images:

cd data-src && find . -not -name '*.md' -exec rsync -R {} ../src/static/data \; && cd -

  1. Install JS dependencies:

docker-compose run web npm install

  1. Start the container:

docker-compose up

Configuration

Features can be enabled or disabled using environment variables. If you use Docker, you can set them directly in the docker-compose.yml file.

You can define two environment variables to enable the “Edit on GitHub” link:

  • CALAVERA_GITHUB_DOCUMENTATION_REPOSITORY: the path of the github repo (eg. api-platform/docs), with no trailing slash. If present, the “edit on github” link will be displayed.
  • CALAVERA_GITHUB_DOCUMENTATION_BRANCH: the branch of the repo to link to (default to master)

Enable the Google Analytics integration

Create a CALAVERA_GOOGLE_ANALYTICS_ID environment variable containing your Google Analytics ID (UA-XXXXXXXX-1) and the Google Analytics integration will be enabled.

Credits

Main authors: Kévin Dunglas and Rodrigue Villetard. Sponsored by Les-Tilleuls.coop.

Built using React Redux Universal Hot Example.

website's People

Contributors

dunglas avatar gregcop1 avatar gregoirehebert avatar jockos avatar toofff avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.