Skip to content

Commit

Permalink
🎉 Basic docs
Browse files Browse the repository at this point in the history
  • Loading branch information
trickypr committed Jun 8, 2021
1 parent 3741ad9 commit 3637d5f
Show file tree
Hide file tree
Showing 32 changed files with 9,724 additions and 101 deletions.
116 changes: 17 additions & 99 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,104 +1,22 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo
# Dependencies
/node_modules

# Optional npm cache directory
.npm
# Production
/build

# Optional eslint cache
.eslintcache
# Generated files
.docusaurus
.cache-loader

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# TernJS port file
.tern-port
testing/
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"semi": false,
"singleQuote": true
}
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,33 @@
# docs
All of the documentation for Fushra products
# Website

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

## Installation

```console
yarn install
```

## Local Development

```console
yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

## Build

```console
yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

## Deployment

```console
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
11 changes: 11 additions & 0 deletions blog/2019-05-28-hola.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
slug: hola
title: Hola
author: Gao Wei
author_title: Docusaurus Core Team
author_url: https://github.com/wgao19
author_image_url: https://avatars1.githubusercontent.com/u/2055384?v=4
tags: [hola, docusaurus]
---

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
17 changes: 17 additions & 0 deletions blog/2019-05-29-hello-world.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
slug: hello-world
title: Hello
author: Endilie Yacop Sucipto
author_title: Maintainer of Docusaurus
author_url: https://github.com/endiliey
author_image_url: https://avatars1.githubusercontent.com/u/17883920?s=460&v=4
tags: [hello, docusaurus]
---

Welcome to this blog. This blog is created with [**Docusaurus 2 alpha**](https://docusaurus.io/).

<!--truncate-->

This is a test post.

A whole bunch of other information.
13 changes: 13 additions & 0 deletions blog/2019-05-30-welcome.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
slug: welcome
title: Welcome
author: Yangshun Tay
author_title: Front End Engineer @ Facebook
author_url: https://github.com/yangshun
author_image_url: https://avatars0.githubusercontent.com/u/1315101?s=400&v=4
tags: [facebook, hello, docusaurus]
---

Blog features are powered by the blog plugin. Simply add files to the `blog` directory. It supports tags as well!

Delete the whole directory if you don't want the blog features. As simple as that!
35 changes: 35 additions & 0 deletions docs/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
sidebar_position: 1
---

# Tutorial Intro

Let's discover **Docusaurus in less than 5 minutes**.

## Getting Started

Get started by **creating a new site**.

Or **try Docusaurus immediately** with **[new.docusaurus.io](https://new.docusaurus.io)**.

## Generate a new site

Generate a new Docusaurus site using the **classic template**:

```shell
npx @docusaurus/init@latest init my-website classic
```

## Start your site

Run the development server:

```shell
cd my-website

npx docusaurus start
```

Your site starts at `http://localhost:3000`.

Open `docs/intro.md` and edit some lines: the site **reloads automatically** and display your changes.
4 changes: 4 additions & 0 deletions docs/meml-basics/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "MEML - Basics",
"position": 2
}
5 changes: 5 additions & 0 deletions docs/meml-basics/adding-a-new-page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
sidebar_position: 3
---

# Adding a new page
45 changes: 45 additions & 0 deletions docs/meml-basics/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
sidebar_position: 1
---

# Install MEML

## Requirements

To use MEML, you must install nodejs and npm on your system. For MacOS and Windows users, you can download and install it from their [official website](https://nodejs.dev/download/). Linux users can simply install it from their system's package manager.

## Installing MLD

Most people don't use MEML directly. Instead, they use `mld`, the MEML dev system. If you are familiar to cargo or parcel, it is inspired by by both. First install mld globally:

```sh
npm install -g mld
```

:::tip
If you get a permission error on MacOS or Linux, try running `npm` as root (with `sudo`)
:::

Now run `mld` in a terminal. You should get an output similar to:

```
Usage: mld [options] [command]
An experimental everything environment for meml
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
init [directory] Create a MEML project in the current or specified directory
dev [directory] Start a dev server in the current or specified directory
build [options] [directory] Build an optimized bundle for the current directory
help [command] display help for command
```

## Additional development tools

It is strongly recommended to install the following development tools on your system:

- [VSCode](https://code.visualstudio.com/)
45 changes: 45 additions & 0 deletions docs/meml-basics/writing-your-first-page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
sidebar_position: 2
---

# Writing your first page

Create a folder where you want your project to be. Open a terminal or command prompt in that folder and run:

```
mld init
```

Now, open vscode. In the menu bar click `File > Open Folder` and navigate to the directory you just ran your code in.

In the bottom right you will get a notification With the text "Do you want to install the recommended extensions?". Click install. This will install all of the necessary development dependencies for MEML.

## File structure

MLD creates a simple, easy to understand file structure. The following files are created:

- `.vscode/`: A set of configuration files for vscode. You don't really need to edit or understand this folder
- `.gitignore`: If you set up a git repo in this folder, this will stop you from uploading (committing) files you don't need to commit
- `package.json`: A bunch of stuff setup and maintained by MLD to maintain compatibility with nodejs and npm
- `app.json`: The configuration of your website
- `src/`: Where all of the files for your websites are stored

## See it live

MLD makes it incredibly easy to see your website in action. Press `Ctrl + ~` to open a new terminal in vscode. Run `mld dev` in that terminal. Now you can open [`http://localhost:8080`](http://localhost:8080) in a new tab in your browser.

## Make a change

In vscode, open the `src/index.meml` file. Replace

```meml
(h1 'Hello world!')
```

with

```meml
(h1 'My website')
```

If you go back to your browser, you will see the website has updated.
Loading

0 comments on commit 3637d5f

Please sign in to comment.