1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-04-26 13:47:12 +02:00

add docs first draft

This commit is contained in:
Kushagra Gour 2017-12-13 13:16:19 +05:30
parent e29a9afafc
commit 9e9efc9807
8 changed files with 563 additions and 0 deletions

0
docs/.nojekyll Normal file

132
docs/README.md Normal file

@ -0,0 +1,132 @@
# Getting started
## What is Web Maker
**Web-Maker** is a chrome extension that converts your Chrome tab into a blazing fast & offline frontend playground for your web experiments.
![Screenshot](../screenshots/ss1.png)
## Features
* Supports Preprocessors: HTML (Pug & Markdown), CSS (SCSS, LESS & Stylus, Atomic CSS) & JavaScript (ES6, TypeScript & CoffeeScript)
* Works offline
* Inbuilt Console
* Save and load your creations
* Auto-save feature
* Code auto-completion
* Easy addition of popular JS & CSS libraries
* Import & Export all creations anytime, anywhere
* Multiple editor themes & other configurable settings
* Font options + use any system font!
* Very easily accessible. Simply open a new tab in Chrome!
* Multiple layouts to choose from
* Capture preview screenshot
* Save as HTML file
* Edit in CodePen
## Installation
If you haven't already installed Web Maker, you can do so from the [Chrome Web Store](https://chrome.google.com/webstore/detail/web-maker/lkfkkhfhhdkiemehlpkgjeojomhpccnh)
## Starting Web Maker
Once installed, you'll see a Web Maker icon in the right-top of your Chrome browser. Click it and Web Maker will open in a new tab.
By default, Web Maker shows up whatever was last open in it. But this behavior can be changed from [settings].
## Your first code
Okay, so now you might be wondering what do I do with Web Maker open in front of me? Wait no more! Simply put, Web Maker lets you write HTML, CSS & JavaScript code and see instant preview. So lets write some code.
You should be seeing 3 code panes with the headings: **HTML**, **CSS** and *JS*. Each code pane is dedicated place to write code in the respective languages. Go ahead and click inside the **HTML** code pane to focus it and then paste the following HTML code:
```html
<h1>My first HTML</h1>
```
As soon as you paste the code, you should see the preview of your HTML in the white preview area.
![First code](/images/first-code.png)
This is a very simple web page we just made. Going forward, you might need to put CSS and JavaScript too. You can write them in their respective code panes and see instant preview.
## A look at the user interface
Web Maker's user interface is made to feel simple and accessible so that you have all the required things at your tips and still doesn't look cluttered for someone using it for first time.
### Code Panes
Code panes are the actually sections where you write your code. You get 3 panes, one for HTML, CSS & JavaScript each.
### Preview
Alongside the code panes, is a white (by default) area where you see the preview of your code. Its an iframe that is feeded your HTML, CSS & JavaScript as you type to generate realtime preview.
### Title
On the top-left side you can see the title of your creation. Click on it to edit it anytime.
### Create New, Save or Open a creation
On the top-right side, you have the 3 buttons to create a new creation or save an open one. Also you can access all your saved creations from the *Saved Creations Pane* by clicking the *Open* button.
From the *Saved Creations Pane* you can also export or import all your creations at once. Exporting generates a JSON file which you can backup in your Google Drive, Dropbox etc.
### Settings
On the bottom right-most end you can access the app settings. Lots and lots of useful settings in there. To know in details about settings, [jump right here]().
### Changelog
Besides the Settings button, is the Changelog button where you can read all the changes in the app for each release version.
### Layouts
Next you have some layout options to choose from. Select whats suits you best. This setting is saved per creation basis, so each of your creation can show in a different layout that you see best for it.
### Export Item
Web Maker gives you quite some options to export your current creation to share with the world. You can save it as a single HTML file to upload it on a server, or open it in CodePen or take a screenshot of your preview.
### Help and Share
On the bottom-left side are few help options, one of which shows you all th keyboard shortcuts available inside the app. Also there is a tweet button you can use to share Web Maker with everyone :)
## Code panes
Coming soon...
## Pre-processors
Coming soon...
## Adding external libraries
Coming soon...
## Layouts
Coming soon...
## Keyboard shortcuts
Coming soon...
## Settings
Coming soon...
## Frequently Asked Questions
Coming soon...
## From the Developer
Hi! I am [Kushagra Gour](https://twitter.com/chinchang457), a frontend developer from India. I created Web Maker as a side project from myself because I wanted a frontend playground that was fast and didn't have to rely on network latency to generate realtime preview. Also something which I could use whenever and wherever I wanted, even wihtout Internet! I have written articles about why and how I created Web Maker and how you can benefit from it as a developer.
- FreeCodeCamp: https://medium.freecodecamp.org/web-maker-how-i-built-a-fast-offline-front-end-playground-9fe3629bc86f
- Sitepoint: https://www.sitepoint.com/web-maker-an-offline-browser-based-codepen-alternative/
Make sure to read them if you like to get more behind the scenes of my journey with Web Maker.
## Let's Talk
Want to send in some suggestions, comments, feature requests or just have a question? Here are your options:
- Twitter  — [@webmakerApp](https://twitter.com/webmakerapp)
- [Gitter chat](http://gitter.im/web-maker-app/Lobby)
- [Github repository](https://github.com/chinchang/web-maker/issues)

23
docs/_sidebar.md Normal file

@ -0,0 +1,23 @@
- Getting started
- [Quick start](quickstart.md)
- [Writing more pages](more-pages.md)
- [Custom navbar](custom-navbar.md)
- [Cover page](cover.md)
- Customization
- [Configuration](configuration.md)
- [Themes](themes.md)
- [List of Plugins](plugins.md)
- [Write a Plugin](write-a-plugin.md)
- [Markdown configuration](markdown.md)
- [Language highlighting](language-highlight.md)
- Guide
- [Deploy](deploy.md)
- [Helpers](helpers.md)
- [Vue compatibility](vue.md)
- [CDN](cdn.md)
- [Offline Mode(PWA)](pwa.md)
- [Server-client renderer(SSR)](ssr.md)
- [Changelog](changelog.md)

2
docs/docsify.min.js vendored Normal file

File diff suppressed because one or more lines are too long

382
docs/guide.md Normal file

@ -0,0 +1,382 @@
# Configuration
**docsify** supports two different ways of configuration. You can configure the `window.$docsify` or write configuration on the script tag via `data-*` attributes.
```html
<!-- by $docsify -->
<script>
window.$docsify = {
repo: 'QingWei-Li/docsify',
maxLevel: 3,
coverpage: true
}
</script>
<!-- or data-* -->
<script
src="//unpkg.com/docsify"
data-repo="QingWei-Li/docsify"
data-max-level="3"
data-coverpage>
</script>
```
Both ways are compatible. However, the first way is recommended. It is clear and can be configured in a separate file.
!> In `window.$docsfiy`, the options should be written by camelCase.
## el
- Type: `String`
- Default: `#app`
The DOM element to be mounted on initialization. It can be a CSS selector string or an actual HTMLElement.
```js
window.$docsify = {
el: '#app'
}
```
## repo
- Type: `String`
- Default: `null`
Configure the repository url or a string of `username/repo` can add the [GitHub Corner](http://tholman.com/github-corners/) widget in the top right corner of the site.
```js
window.$docsify = {
repo: 'QingWei-Li/docsify',
// or
repo: 'https://github.com/QingWei-Li/docsify/'
}
```
## max-level
- Type: `Number`
- Default: `6`
Maximum Table of content level.
```js
window.$docsify = {
maxLevel: 4
}
```
## load-navbar
- Type: `Boolean|String`
- Default: `false`
Loads navbar from the Markdown file `_navbar.md` if **true**, or else from the path specified.
```js
window.$docsify = {
// load from _navbar.md
loadNavbar: true,
// load from nav.md
loadNavbar: 'nav.md'
}
```
## load-sidebar
- Type: `Boolean|String`
- Default: `false`
Loads sidebar from the Markdown file `_sidebar.md` if **true**, or else from the path specified.
```js
window.$docsify = {
// load from _sidebar.md
loadSidebar: true,
// load from summary.md
loadSidebar: 'summary.md'
}
```
## sub-max-level
- Type: `Number`
- Default: `0`
Add table of contents (TOC) in custom sidebar.
```js
window.$docsify = {
subMaxLevel: 2
}
```
## auto2top
- Type: `Boolean`
- Default: `false`
Scrolls to the top of the screen when the route is changed.
```js
window.$docsify = {
auto2top: true
}
```
## homepage
- Type: `String`
- Default: `README.md`
`README.md` in your docs folder will be treated as homepage for your website, but sometimes you may need to serve another file as your homepage.
```js
window.$docsify = {
// Change to /home.md
homepage: 'home.md',
// Or use the readme in your repo
homepage: 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/README.md'
}
```
## base-path
- Type: `String`
Base path of the website. You can set it to another directory or another domain name.
```js
window.$docsify = {
basePath: '/path/',
// Load the files from another site
basePath: 'https://docsify.js.org/',
// Even can load files from other repo
basePath: 'https://raw.githubusercontent.com/ryanmcdermott/clean-code-javascript/master/'
}
```
## coverpage
- Type: `Boolean|String`
- Default: `false`
Activate the [cover feature](cover.md). If true, it will load from `_coverpage.md`.
```js
window.$docsify = {
coverpage: true,
// Custom file name
coverpage: 'cover.md'
}
```
## name
- Type: `String`
Website name as it appears in the sidebar.
```js
window.$docsify = {
name: 'docsify'
}
```
## name-link
- Type: `String`
- Default: `window.location.pathname`
The name of the link.
```js
window.$docsify = {
nameLink: '/',
// For each route
nameLink: {
'/zh-cn/': '/zh-cn/',
'/': '/'
}
}
```
## markdown
- Type: `Function`
See [Markdown configuration](markdown.md).
```js
window.$docsify = {
// object
markdown: {
smartypants: true,
renderer: {
link: function() {
// ...
}
}
},
// function
markdown: function (marked, renderer) {
// ...
return marked
}
}
```
## theme-color
- Type: `String`
Customize the theme color. Use [CSS3 variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables) feature and polyfill in old browser.
```js
window.$docsify = {
themeColor: '#3F51B5'
}
```
## alias
- Type: `Object`
Set the route alias. You can freely manage routing rules. Supports RegExp.
```js
window.$docsify = {
alias: {
'/foo/(+*)': '/bar/$1', // supports regexp
'/zh-cn/changelog': '/changelog',
'/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
}
}
```
## auto-header
- type: `Boolean`
If `loadSidebar` and `autoHeader` are both enabled, for each link in `_sidebar.md`, prepend a header to the page before converting it to html. Compare [#78](https://github.com/QingWei-Li/docsify/issues/78).
```js
window.$docsify = {
loadSidebar: true,
autoHeader: true
}
```
## execute-script
- type: `Boolean`
Execute the script on the page. Only parse the first script tag([demo](themes)). If Vue is present, it is turned on by default.
```js
window.$docsify = {
executeScript: true
}
```
```markdown
## This is test
<script>
console.log(2333)
</script>
```
Note that if you are running an external script, e.g. an embedded jsfiddle demo, make sure to include the [external-script](plugins.md?id=external-script) plugin.
## no-emoji
- type: `Boolean`
Disabled emoji parse.
```js
window.$docsify = {
noEmoji: true
}
```
## merge-navbar
- type: `Boolean`
Navbar will be merged with the sidebar on smaller screens.
```js
window.$docsify = {
mergeNavbar: true
}
```
## format-updated
- type: `String|Function`
We can display the file update date through **{docsify-updated<span>}</span>** variable. And format it by `formatUpdated`.
See https://github.com/lukeed/tinydate#patterns
```js
window.$docsify = {
formatUpdated: '{MM}/{DD} {HH}:{mm}',
formatUpdated: function (time) {
// ...
return time
}
}
```
## external-link-target
- type: `String`
- default: `_self`
Target to open external links. Default `'_blank'` (new window/tab)
```js
window.$docsify = {
externalLinkTarget: '_self' // default: '_blank'
}
```
## router-mode
- type: `String`
- default: `history`
```js
window.$docsify = {
routerMode: 'history' // default: 'hash'
}
```
## noCompileLinks
- type: `Array`
Sometimes we do not want docsify to handle our links. See [#203](https://github.com/QingWei-Li/docsify/issues/203)
```js
window.$docsify = {
noCompileLinks: [
'/foo',
'/bar/.*'
]
}
```

BIN
docs/images/first-code.png Normal file

Binary file not shown.

After

(image error) Size: 38 KiB

23
docs/index.html Normal file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>web-maker - A blazing fast & offline web playground</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="A blazing fast & offline web playground">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="vue.css">
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
name: 'Web Maker',
nameLink: '/',
repo: 'https://github.com/chinchang/web-maker',
// loadSidebar: true
}
</script>
<script src="docsify.min.js"></script>
</body>
</html>

1
docs/vue.css Normal file

File diff suppressed because one or more lines are too long