不要怂,就是干,撸起袖子干!

Commit d85c7ddc by Mick Hansen

Merge pull request #3143 from sequelize/feature/docs

Improve documentation
2 parents dabefbe8 1c1086d2
...@@ -10,3 +10,4 @@ test/tmp/* ...@@ -10,3 +10,4 @@ test/tmp/*
test/dialects/sqlite/test.sqlite test/dialects/sqlite/test.sqlite
test/sqlite/test.sqlite test/sqlite/test.sqlite
coverage-* coverage-*
site
@import url(http://fonts.googleapis.com/css?family=Titillium+Web);
table { table {
width:100%; width:100%;
} }
...@@ -21,4 +23,27 @@ th { ...@@ -21,4 +23,27 @@ th {
} }
tr:nth-child(2n) { tr:nth-child(2n) {
background-color: #f8f8f8; background-color: #f8f8f8;
} }
\ No newline at end of file
#teaser-home {
height: 250px;
position: relative;
margin-bottom: 24px;
}
#teaser-home img {
position: absolute;
top: 0;
}
#teaser-home span {
color: #2F406A;
position: absolute;
top: 0;
left: 250px;
font-size: 100px;
display: inline-block;
height: 250px;
line-height: 250px;
font-family: 'Titillium Web', sans-serif;
}
Sequelize is a promise-based Node.js ORM for Postgres, MySQL, SQLite, MariaDB and MSSQL. It features solid transaction support, relations, read replication and more. <div id="teaser-home">
<image src="images/logo-small.png" alt="Sequelize | The Node.js ORM">
<span>Sequelize</span>
</div>
[Installation](http://sequelize.readthedocs.org/en/latest/docs/getting-started/) Sequelize is a promise-based ORM for Node.js and io.js. It supports the dialects PostgreSQL, MySQL,
MariaDB, SQLite and MSSQL and features solid transaction support, relations, read replication and
more.
[Installation](docs/getting-started/)
## Example usage ## Example usage
```js ```js
var Sequelize = require('sequelize') var Sequelize = require('sequelize');
, sequelize = new Sequelize('database', 'username', 'password'); var sequelize = new Sequelize('database', 'username', 'password');
var User = sequelize.define('User', { var User = sequelize.define('User', {
username: Sequelize.STRING, username: Sequelize.STRING,
...@@ -14,10 +21,10 @@ var User = sequelize.define('User', { ...@@ -14,10 +21,10 @@ var User = sequelize.define('User', {
return sequelize.sync().then(function() { return sequelize.sync().then(function() {
return User.create({ return User.create({
username: 'sdepold', username: 'janedoe',
birthday: new Date(1986, 06, 28) birthday: new Date(1980, 06, 20)
}).then(function(sdepold) {
console.log(sdepold.values)
}); });
}).then(function(jane) {
console.log(jane.values)
}); });
``` ```
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
{% block htmltitle %} {% block htmltitle %}
<title>{{ page_title }}</title> <title>{{ page_title }}</title>
{% if page_description %}<meta name="description" content="{{ page_description }}">{% endif %}
{% endblock %} {% endblock %}
{# CSS #} {# CSS #}
...@@ -38,7 +39,7 @@ ...@@ -38,7 +39,7 @@
{# SIDE NAV, TOGGLES ON MOBILE #} {# SIDE NAV, TOGGLES ON MOBILE #}
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-nav-search"> <div class="wy-side-nav-search">
<a href="{{ homepage_url }}" class="icon icon-home"> {{ site_name }}</a> <a href="{{ homepage_url }}" class="icon icon-home"> Sequelize | The Node.js ORM</a>
{% include "searchbox.html" %} {% include "searchbox.html" %}
</div> </div>
...@@ -65,7 +66,7 @@ ...@@ -65,7 +66,7 @@
{{ content }} {{ content }}
</div> </div>
</div> </div>
{%- block footer %} {%- block footer %}
{% include "footer.html" %} {% include "footer.html" %}
{% endblock %} {% endblock %}
</div> </div>
......
site_name: Sequelize - node.js ORM for Postgres, MySQl, MariaDB and SQLite site_name: Sequelize | The Node.js / io.js ORM for PostgreSQL, MySQL, SQLite and MSSQL
site_description: Sequelize is an ORM for Node.js and io.js. It supports the dialects PostgreSQL, MySQL, MariaDB, SQLite and MSSQL.
theme: ""
theme_dir: docs/readthedocs_theme theme_dir: docs/readthedocs_theme
repo_url: https://github.com/sequelize/sequelize repo_url: https://github.com/sequelize/sequelize
site_favicon: favicon.ico site_favicon: favicon.ico
...@@ -7,6 +9,7 @@ extra_css: ...@@ -7,6 +9,7 @@ extra_css:
- css/custom.css - css/custom.css
extra_javascript: extra_javascript:
- //cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js - //cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js
- http://io.depold.com/code/3D2S0C0L362R/ga.js
pages: pages:
- ['index.md', 'Home'] - ['index.md', 'Home']
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!