Giter Site home page Giter Site logo

api-platform / website Goto Github PK

View Code? Open in Web Editor NEW
47.0 15.0 68.0 138.68 MB

The API Platform website

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

License: MIT License

JavaScript 3.36% Shell 0.58% TypeScript 79.48% PHP 0.88% Dockerfile 1.11% Twig 0.09% Smarty 0.34% CSS 2.25% MDX 11.90%
api-platform gatsby

website's Introduction

api-platform.com

This repository contains the source code and documentation powering api-platform.com.

Single Page Application built with React and powered by Next.js.

Build Status

Project structure

The project has been created from the API Platform distribution folder. All next.js application code is located in the "pwa" folder. The project is made with the Next.js new app router.

🤝 Contributors features

You need to use a valid github token to retrieve the list of contributors.

  1. Go to your github developer settings

  2. Select scopes public_repo, read:org and read:user, generate the token and copy it.

  3. If you use "pnpm dev" on the folder pwa to launch the project, add a new .env.local file on the root of pwa folder, and set your token as an environment variable named GITHUB_KEY.

If you use docker, create a file "secret_github_key" at the root of the project with your token inside :

# Create the secret_github_key file
echo "YOUR_GITHUB_TOKEN" > secret_github_key

❗Core team badges restriction: You need to be a member of API Platform organization to retrieve API Platform teams. You can still locally launch the project, but the badges of the core team members will not appear.

Installation and usage

with docker

# Checkout project
git clone https://github.com/api-platform/website.git

# Change directory
cd website

# Create the github_key file
echo YOUR_GITHUB_TOKEN > secret_github_key

# Install and run the project locally
docker compose up -d
> Go to http://localhost

without docker

# Checkout project
git clone https://github.com/api-platform/website.git

# Change directory
cd website/pwa

phive install --trust-gpg-keys 62D05354C61458CB8378FD323F82299C64F51AD2 --copy https://github.com/php-documentation-generator/php-documentation-generator/releases/download/v0.0.0-beta.1/pdg.phar
bash tools/get-docs.sh
bash tools/get-core-docs.sh
bash tools/build-playground.sh
curl https://soyuka.me/contributors.json  -o ./data/contributors.json (commented in the playground)

# Install dependencies
pnpm install

# Launch prebuild script (necessary to create some images variants like wallpapers or logos, and to generate the contributors ranking)
pnpm prebuild

# Run project locally (for development)
pnpm dev
> Go to http://localhost:3000/

Build the project locally

with docker

# TO COMPLETE

without docker

# Build the project (for production) from the pwa folder
pnpm build

# Test the built project locally
pnpm start
> Go to http://localhost:3000

Publishing Docs For New Versions

  1. Create a branch for the new version in the api-platform/docs repository.
  2. Update consts.ts
  3. Update Algolia crawler configuration

website's People

Contributors

alanpoulain avatar cecileamrl avatar claire2327 avatar dependabot-preview[bot] avatar dependabot[bot] avatar dunglas avatar fabious avatar ginifizz avatar gregcop1 avatar gregoirehebert avatar jfcoz avatar jockos avatar lex111 avatar mathieudewet avatar mauchede avatar maximelafarie avatar natacha-h avatar pgrimaud avatar raoulclais avatar renrhaf avatar romaixn avatar simperfit avatar soyuka avatar sroze avatar sumitkharche avatar thomassamson avatar toofff avatar valentincrochemore avatar vasilvestre avatar xelysion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

website's Issues

Links on page 404 don't work

Uncaught TypeError: Cannot read property 'push' of undefined
    at o (/app-7c443d8df45d2aa09e45.js:2)
    at /app-7c443d8df45d2aa09e45.js:2
    at Array.map (<anonymous>)
    at Object.emit (/app-7c443d8df45d2aa09e45.js:2)
    at a (/app-7c443d8df45d2aa09e45.js:1)
    at /app-7c443d8df45d2aa09e45.js:1
    at /app-7c443d8df45d2aa09e45.js:1
    at /app-7c443d8df45d2aa09e45.js:1
    at /app-7c443d8df45d2aa09e45.js:1
    at i (/app-7c443d8df45d2aa09e45.js:2)
o @ /app-7c443d8df45d2aa09e45.js:2
(anonymous) @ /app-7c443d8df45d2aa09e45.js:2
emit @ /app-7c443d8df45d2aa09e45.js:2
a @ /app-7c443d8df45d2aa09e45.js:1
(anonymous) @ /app-7c443d8df45d2aa09e45.js:1
(anonymous) @ /app-7c443d8df45d2aa09e45.js:1
(anonymous) @ /app-7c443d8df45d2aa09e45.js:1
(anonymous) @ /app-7c443d8df45d2aa09e45.js:1
i @ /app-7c443d8df45d2aa09e45.js:2
(anonymous) @ /app-7c443d8df45d2aa09e45.js:2
window.webpackJsonp @ /commons-7ce65b0cc81cb8c12a19.js:1
(anonymous) @ path---index-a0e39f21c11f6a62c5ab.js:1

"PREVIOUS CHAPTER" and "NEXT CHAPTER" links on the bottom of each documentation pages are broken.

Website version(s) affected: current

Description
"PREVIOUS CHAPTER" and "NEXT CHAPTER" links on the bottom of each documentation page are broken.

How to reproduce
For example, visit https://api-platform.com/docs/distribution/ and click on NEXT CHAPTER: TESTING THE API >

Your browser will return an error : docs’s server IP address could not be found.

Possible Solution
Links are missing root domain name ; They look like this :https://docs/distribution/testing/

When links should look something like this https://api-platform.com/docs/distribution/testing/

Additional Context
I would gladly help, but I have no experience with Gatsby so I have no idea how it can be fixed.

I believe it shouldn't be too difficult though.

Hope that helps, and thank you for awesome tool.

Missing space in homepage (ApiPlatform <3 Symfony)

Hi,
There is a missing space between 'Doctrine ORM' and 'and all included' in the ApiPlatform ❤️ Symfony block.

The default distribution of API Platform is a perfectly valid Symfony full-stack application that follows Symfony's Best Practices. It also includes the famous Doctrine ORMand all included tools can leverage it.

Fix Gatsby warnings

warning Your site's "gatsby-node.js" used a reserved field name in the context object when creating > a page:

  • "path"

Add a "contributors" page

This page new page will display the list of all API Platform contributors.

  • It must display the name of the contributor, it's GitHub avatar, and have a link to his GitHub account
  • Contributors must be ordered by number of contributions
  • The name of repositories the user contributed to must be displayed below his name (ex : core, docs, api-doc-parser).

It should extract the list of contributors using the GitHub API or by cloning the Git repositories directly. The process must be 100% automated.

Possible implementation:

  • Use the GitHub API to list all the repositories under the api-platform org
  • Clone all those repositories
  • Extract the list of contributors and their number of commits using Git
  • Group by email

Patch files should be highlighted

Thepatch format is supported by GitHub in Markdown documents but not on our website.
It looks like Prism (used by Gatsby) doesn't support it. We should add support for patch in Prism.

Update to Gatsby v4 and more recent dependencies

Description
Hello,
One of my side projects website is based on this project. Thanks a lot for it.
I recently spent some time upgrading dependencies to more recent versions, including to Gatsby 4.

I was wondering if you are interested in me opening a MR doing the same for API Platform website. It would a way for me to contribute back to this project.

Example

Here is what I've done on my side: n7consulting/jeyser-site#14

Bottom page navigation is missing

Before on every documentation pages there were buttons at bottom : previous chapter and next chapter.

Seems missing since versions switching update

Rework markup SC player

  • At the moment, the SC image is not displayed, if there is no caption - this is a bug (due to gatsby-remark-images plugin).
Details

image

Page - https://api-platform.com/docs/master/distribution/

  • When you hover over an caption with an SC image, background of the entire clickable area is highlighted, it seems to me that it is wrong and ugly, the hover effect should be applied only to the caption.
Details

image

Page - https://api-platform.com/docs/deployment/

Should be like this:

image

What do you think, @dunglas?

Nav script generation doesn't handle h3

index.md

7.  [The Serialization Process](core/serialization.md)
    1.  [Overall Process](core/serialization.md#overall-process)
    2.  [Available Serializers](core/serialization.md#available-serializers)
    3.  [The Serialization Context, Groups and Relations](core/serialization.md#the-serialization-context-groups-and-relations)
        1.  [Configuration](core/serialization.md#configuration)

Expected in nav.yml :

- id: serialization
      title: The Serialization Process
      anchors:
        - id: overall-process
          title: Overall Process
        - id: available-serializers
          title: Available Serializers
        - id: the-serialization-context-groups-and-relations
          title: 'The Serialization Context, Groups and Relations'
          anchors:
            - id: configuration
              title: Configuration

Community showcase

Do you want to showcase more projects? Could we have our logo added here?

<img src="images/logos.png" alt="The Fork, Smile, PartKeepr, ExaqtWorld, Les-Tilleuls.coop" width="937" class="img-responsive">

Release documentation for 2.7

TODO:

  • redirect data-provider and data-persister to state-provider and state-processor
  • do a quick link from the home page to the upgrade guide when releasing a 2.7
  • change the background ? (ping @ginifizz @dunglas )

Investigate the cache issue

After each deployment, the site is broken during some minutes / hours. Probably because of cache issue related to service workers.

Improve accessibility

According to W3 ARIA, followings issues should be considered:

  • meta tag should not include mutiple attributes.
    ex: put charset attribute in a separated meta tag.

  • type attribute for style element is not needed and should be omitted.

  • value fetch is not allowed for as attribute on link tag

Error while installing the project

What i did :

  • git clone project
  • yarn
  • bin/retrieve-documentation -> error missing file debugging.md in distribution section in config/outline.yaml

Improve accessibility

According to W3 ARIA, followings issues should be considered:

  • Burger button does not have an accessible name.

  • Links to Twitter and Github in menu don't have discernable names.

  • In the burger button div is not allowed as child of button in this context

  • <html> element does not have a [lang] attribute.

  • frameborder attribute for iframe tag is obsolete, use CSS instead.

  • scrolling attribute for iframe tag is obsolete, use CSS instead.

  • Stray start tag script.

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.