All Projects â†’ adonisjs â†’ Adonisjs.com

adonisjs / Adonisjs.com

🕸 Source Code of the website adonisjs.com

Projects that are alternatives of or similar to Adonisjs.com

Android
DuckDuckGo Android App
Stars: ✭ 2,290 (+1377.42%)
Mutual labels:  hacktoberfest
Gatsby Remark Oembed
A GatsbyJS Plugin that transforms oembed links into its corresponding embed code.
Stars: ✭ 154 (-0.65%)
Mutual labels:  hacktoberfest
Demeter
Demeter is a tool for scraping the calibre web ui
Stars: ✭ 155 (+0%)
Mutual labels:  hacktoberfest
Rot.js
ROguelike Toolkit in JavaScript. Cool dungeon-related stuff, interactive manual, documentation, tests!
Stars: ✭ 2,002 (+1191.61%)
Mutual labels:  hacktoberfest
Timber Acf Wp Blocks
Create Gutenberg blocks from Twig templates and ACF fields.
Stars: ✭ 154 (-0.65%)
Mutual labels:  hacktoberfest
Pagermon
Multimon-ng pager message parser and viewer
Stars: ✭ 154 (-0.65%)
Mutual labels:  hacktoberfest
Pully
A simple CLI and library for downloading high quality YouTube videos!
Stars: ✭ 153 (-1.29%)
Mutual labels:  hacktoberfest
Isee
R/shiny interface for interactive visualization of data in SummarizedExperiment objects
Stars: ✭ 155 (+0%)
Mutual labels:  hacktoberfest
Validate Docbr
Pacote Python para validação de documentos brasileiros
Stars: ✭ 152 (-1.94%)
Mutual labels:  hacktoberfest
Vulcan Next
The Next starter for GraphQL developers
Stars: ✭ 155 (+0%)
Mutual labels:  hacktoberfest
Plasma
Cyan Worlds's Plasma game engine
Stars: ✭ 153 (-1.29%)
Mutual labels:  hacktoberfest
Flutterresources
A list of Flutter resources that will help people get started with Flutter
Stars: ✭ 154 (-0.65%)
Mutual labels:  hacktoberfest
Mifos Mobile
Repository for the Mifos Mobile Banking App for clients
Stars: ✭ 154 (-0.65%)
Mutual labels:  hacktoberfest
Electricitymap Contrib
A real-time visualisation of the CO2 emissions of electricity consumption
Stars: ✭ 2,138 (+1279.35%)
Mutual labels:  hacktoberfest
Httpmocker
HttpMocker is a simple HTTP mocking library written in Kotlin to quickly and easily handle offline modes in your apps
Stars: ✭ 155 (+0%)
Mutual labels:  hacktoberfest
Meteor Partitioner
Transparently divide a single meteor app into several different instances shared between different groups of users.
Stars: ✭ 153 (-1.29%)
Mutual labels:  hacktoberfest
Gatsby Plugin Algolia
A plugin to push to Algolia based on graphQl queries
Stars: ✭ 154 (-0.65%)
Mutual labels:  hacktoberfest
Layercache
Caching made simple for Android and Java.
Stars: ✭ 155 (+0%)
Mutual labels:  hacktoberfest
Symfony Docs
The Symfony documentation
Stars: ✭ 1,924 (+1141.29%)
Mutual labels:  hacktoberfest
Helm Charts
Jenkins community Helm charts
Stars: ✭ 154 (-0.65%)
Mutual labels:  hacktoberfest

AdonisJs.com

Source code for the official website

This repo contains two sub-projects frontend and docs and as the name suggests, they hold the source code for the respective areas.

  • The frontend is the Gridsome website
  • The docs are the Markdown files compiled using dimer.

Quick Start

Before we get into the philosophy of how everything works together, let's get you up and running. Assuming you have cloned the repo, run the following instructions.

  • cd <clone-path>
  • Run chmod +x setup.sh and then execute ./setup.sh file to setup the project.
  • Run ./develop.sh to start the development server.

Why Gridsome?

If you are familiar with Gridsome or even Gatsby, then you would know that many people choose either of them for their GraphQL API. However, we didn't choose it for GraphQL at all.

The main reason for using Gridsome is that it can take the Vue.js source code and convert them into static HTML pages. While doing so, it let us create dynamic pages programmatically. For example:

  1. We have 10 markdown files converted to JSON (in a seperate application)
  2. We want to use those JSON files with a vue template and render them on the browser.
  3. During development we want the vue templates to re-compile a doc is changed.
  4. For production, we want vue templates to be converted to standard HTML pages. So that we don't need the markdown API service anymore.

And guess what, Gridsome does all this in the most simplest possible way.

Build process

In order to understand the build process, you will have to start from the markdown compilation flow.

Markdown Compilation Flow

We make use of dimer to convert Markdown to an API server. So, if you run this application with command ./develop.sh and then visit http://localhost:5000, you will see a playground to explore the API.

Converting markdown to JSON instead of HTML has lots of benefits.

  1. The HTML structure is not proprietary and you have complete freedom to structure the HTML the way you want. Today we are using Gridsome, tomorrow we can easily switch to something else and the markdown build process doesn't have to change for that.
  2. We get native search support. In standard static websites, people first convert Markdown to HTML and then scrape the HTML to create JSON documents for adding search.

Gridsome Consuming the Dimer API

At this point we are clear that, dimer handles all the markdown files, converts them to JSON and any client can consume it via the HTTP server.

Now, the Job of Gridsome is to make use of the HTTP API and create pages from it. Luckily Gridsome has first class support for that.

Inside frontend/gridsome.server.js file, we make use of axios to make an API call to the dimer server and then use the Gridsome API to create the static pages from it.

Rebuilds during Development

Since, we are relying on a different process to gives us the content for creating the pages. There is no way for the Gridsome to know when the content has been changed. Luckily, Dimer allows creating Websocket connections in the development mode and we can subscribe to Websocket events inside frontend/gridsome.server.js file and trigger a re-build. This is how it works.

  1. Make a websocket connection with the Dimer server inside frontend/gridsome.server.js.
  2. Everytime an event is received, make use of the Gridsome removePageByPath and createPage API to re-build that specific page.

And voila! We have instant feedback during development.

Gridsome Structure

The Gridsome codebase is a standard Vuejs or Gridsome website stored inside the frontend directory.

  • We keep all the resuable components inside the src/components directory.
  • All static pages (not built programmatically) inside the src/pages directory.
  • Templates for dynamic pages inside the src/templates directory.
  • A standard Layout for the complete website is in src/layouts directory.

Dimer Structure

The docs directory holds the Markdown files along with the dimer.json file. The dimer.json is the config file for dimer to define structure for the docs.

Dimer has concept of zones and versions.

  • A zone means a boundary between different types of documentation. For example: A zone for guides and a zone for api docs and so on.
  • Within each zone, you can have one or more versions for the documentation. Do not confuse versions with version control, it means a new set of markdown files for a specific version of the framework.
  • The versions for each zone can evolve independently.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].