GithubHelp home page GithubHelp logo

lostquasar / quiltmc.org Goto Github PK

View Code? Open in Web Editor NEW

This project forked from quiltmc/quiltmc.org

0.0 0.0 0.0 25.45 MB

The source for quiltmc.org

Home Page: https://quiltmc.org

License: Other

JavaScript 7.31% TypeScript 4.17% CSS 0.87% HTML 0.16% Astro 22.59% MDX 64.91%

quiltmc.org's Introduction

Quilt Project Website

Website for the Quilt Project.

Contributing

Thanks for contributing to the site! There's a couple of things worth noting about our infrastructure, which we will cover below.

IDE/Editor Choice

For contributors, we recommend using Visual Studio Code or VSCodium as your IDE, as it features Astro support via the official Astro plugin. Additionally, you would need to install the MDX plugin to have syntax highlighting for the .mdx files, and the vscode-fluent plugin if you need to translate the site or otherwise tinker with Fluent's .ftl files.

In theory, you can use any editor to your liking that supports the Language Server Protocol, hooked up to the Astro Language Server and optionally other LSPs for MDX and Fluent. Unfortunately as of the date of writing (Sept 11, 2022) no pre-built integrations of the Astro Language Server actually exist, which is why we still recommend using VS Code as your IDE.

For VSCode, you should see a popup in the bottom right when you open the project with recommended extensions. You can also type @recommended in the extensions page to see the recommended extensions:

Running the Dev Server

To run the development server, you first need to have npm/pnpm/yarn installed in your system. Only pnpm is regularly used and tested for the site, so you might encounter bugs or incompatibilities using an alternate package manager. Instructions on how to install pnpm can be found on its official installation page.

Once pnpm is installed, clone this repository, navigate into the project folder and run pnpm i to install dependencies:

$ git clone https://github.com/QuiltMC/quiltmc.org
$ cd quiltmc.org
$ pnpm i

Once installation is complete, then run pnpm dev to start the dev server. The server application should have an output like this:

$ pnpm dev

> [email protected] dev
> node csscopy.mjs && astro dev

  ๐Ÿš€  astro  v1.2.1 started in 56ms

  โ”ƒ Local    http://localhost:3000/
  โ”ƒ Network  use --host to expose

At this point, open your browser, and you should be able to see the generated site at localhost:3000.

As Astro utilizes hot module reloading (HMR), any changes you make would be reflected in the browser quickly. However, sometimes components and layouts don't get rebuilt with HMR and you might have to restart the Astro server to see your changes, which is easily done by pressing Ctrl+C and rerunning pnpm run dev.

You're all set! Although, I would recommend reading about the architecture of this site before making any changes, to familiarize yourself with the project structure. Have fun contributing!

Cloudflare Pages Dev server

Some functionalities of the website, such as redirects or functions, use some Cloudflare Pages specific features. To test these features, you can run the following command:

$ npx wrangler pages dev -- pnpm dev --host

Make sure to use the url provided by wrangler, as it will be different from the one provided by Astro. It should appear underneath Worker reloaded!.

Building

To build the site as seen in production, simply run pnpm run build. Astro will then build the site and emit the output in dist/.

$ pnpm run build

To view the built site, you can run astro preview:

$ pnpm preview

> [email protected] preview
> node csscopy.mjs && astro preview

  ๐Ÿš€  astro  v1.2.1 started in 2ms

  โ”ƒ Local    http://localhost:3000/
  โ”ƒ Network  use --host to expose

You can then visit the built site at localhost:3000.

quiltmc.org's People

Contributors

akarys42 avatar arthomnix avatar beetmacol avatar big-cake-jpg avatar cheatercodes avatar ecorous avatar ember-ruby avatar ennuil avatar forkk avatar gdude2002 avatar haven-king avatar imzxhir avatar ix0rai avatar jamalam360 avatar mysterious-dev avatar nocomment1105 avatar obj-obj avatar pluiedev avatar prospector avatar sciwhiz12 avatar silverandro avatar snuggle avatar southpaw1496 avatar sschr15 avatar tailsfanlol avatar theglitch76 avatar thek0tyara avatar tibinonest avatar toffeemax avatar triphora 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.