Skip to content

Commit 15c93e5

Browse files
committed
Release the latest generator
1 parent b520119 commit 15c93e5

File tree

484 files changed

+4969
-856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

484 files changed

+4969
-856
lines changed

.gitignore

+12-6
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,30 @@ ehthumbs.db
99
Thumbs.db
1010
nohup.out
1111

12-
12+
# Python files #
13+
######################
1314
.python-version
1415
.env
1516
.venv
1617
.ipynb_checkpoints
1718
*.log
18-
uploads/
19-
.idea
2019

20+
# Editor files #
21+
######################
22+
.idea
23+
.vscode
2124

22-
# templates files #
25+
# Node files #
2326
######################
2427
node_modules/
2528
dist/
26-
public/
2729
npm-debug.log*
2830
yarn-debug.log*
2931
yarn-error.log*
3032
package-lock.json
31-
db.json
3233

34+
35+
# Other files #
36+
######################
37+
public/
38+
db.json

CONTRIBUTING.md

-26
This file was deleted.

README.md

+64-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
# Reference
22

3-
Share quick reference cheat sheet for developers.
4-
If you see a cheatsheet here is not fit, you can fix it or provide a better cheatsheet by submitting a PR.
3+
[![love](https://badgen.net/badge/make with/love/pink)](#)
4+
[![License](https://badgen.net/badge/license/MIT/blue)](https://github.com/Fechin/reference/blob/main/LICENSE)
5+
[![License](https://badgen.net/github/stars/Fechin/reference)](#)
6+
[![License](https://badgen.net/github/forks/Fechin/reference)](#)
7+
[![License](https://badgen.net/github/contributors/Fechin/reference)](#)
8+
9+
10+
11+
**Reference** is a collection of **cheatsheets** contributed by open source angels. It shares a quick reference cheat sheet for developers in a beautiful layout.
12+
13+
We're happy to see your best skill cheat sheets in **Reference**, If you see a cheatsheet here is not fit, you can fix it or provide a better cheatsheet by submitting a PR.
514

615

716
## Live Demo
@@ -11,9 +20,61 @@ Read the cheatsheet gracefully https://quickref.me
1120

1221

1322

23+
## Directory structure
24+
```
25+
.
26+
├── source
27+
│ ├── _posts # Source file for cheatsheet
28+
│ │ ├── bash.md
29+
│ │ ├── chmod.md
30+
│ │ ├── ...
31+
│ └── widget # Widget that can be referenced
32+
│ └── chmod.html
33+
├── public # Static files for distribution
34+
├── _config.yml
35+
├── gulpfile.js
36+
├── package.json
37+
├── postcss.config.js
38+
├── tailwind.config.js
39+
└── themes
40+
└── coo # Hexo's theme
41+
```
42+
1443
## Contributing
1544

16-
See [the contribution guide](https://github.com/Fechin/reference/blob/main/CONTRIBUTING.md) for ways to get started.
45+
Thanks for your interest on contributing to reference 👍👍, it's people like you that make [QuickRef.ME](https://quickref.me) such a amazing site 🎉🎉. Feel free to [submit issues](https://github.com/Fechin/reference/issues/new?assignee=Fechin) and enhancement requests.
46+
47+
48+
#### Development setup
49+
50+
1. Clone Github repo `git clone https://github.com/Fechin/reference.git`
51+
2. Install `npm` package manager (Read [installation guide](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm))
52+
3. Run `npm install` in the root folder to install dependencies.
53+
4. Run `npm run dev` to start a dev server. This serves the project and live reloads when any files are changed, then visit http://127.0.0.1:4000 preview.
54+
5. Send us pull request and chill.
55+
56+
A `source/_posts/{filename}.md` file will be processed into a cheat sheet, let's create or edit a markdown file:
57+
58+
#### Front Matter
59+
```markdown
60+
---
61+
title: QuickRef
62+
date: 2020-11-25 18:28:43
63+
icon: icon-style
64+
background: bg-emerald-600
65+
tags:
66+
categories:
67+
- Other
68+
intro: This is a reference of styles that you can use on quickref cheatsheets!
69+
---
70+
```
71+
Just need `title` and `intro`, and ignore other options. I will complete it if it can be released.
72+
73+
#### CSS classes
74+
QuickRefs uses [markdown-it-attrs](https://github.com/arve0/markdown-it-attrs) and supports adding classes via its syntax. Also, there is a reference of styles that you can use on `quickref.me` cheat sheets: https://quickref.me/quickref
75+
76+
77+
At last, It's a good practice to refer to the source code of the existing cheat sheet!
1778

1879
<a href="https://github.com/Fechin/reference/graphs/contributors">
1980
<img src="https://contrib.rocks/image?repo=Fechin/reference" />

_config.yml

+160
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
# Hexo Configuration
2+
## Docs: https://hexo.io/docs/configuration.html
3+
## Source: https://github.com/hexojs/hexo/
4+
5+
# Site
6+
title: QuickRef.ME
7+
subtitle: 'Quick Reference Cheat Sheet'
8+
description: 'Share quick reference and cheat sheet for developers'
9+
keywords: reference,cheatsheet,code table,snippets,linux
10+
author: QuickRef.ME
11+
language: en
12+
timezone: ''
13+
14+
# URL
15+
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
16+
url: https://quickref.me
17+
root: /
18+
permalink: :name.html
19+
permalink_defaults:
20+
pretty_urls:
21+
trailing_index: false # Set to false to remove trailing 'index.html' from permalinks
22+
trailing_html: false # Set to false to remove trailing '.html' from permalinks
23+
24+
# Directory
25+
source_dir: source
26+
public_dir: public
27+
#tag_dir: tag
28+
archive_dir: archives
29+
#category_dir: node
30+
#code_dir: downloads/code
31+
i18n_dir: :lang
32+
skip_render:
33+
- "assets/**/*"
34+
- "_posts/README.md"
35+
- "_posts/CONTRIBUTING.md"
36+
37+
# Writing
38+
new_post_name: :title.md # File name of new posts
39+
default_layout: post
40+
titlecase: false # Transform title into titlecase
41+
external_link:
42+
enable: true # Open external links in new tab
43+
field: site # Apply to the whole site
44+
exclude: ''
45+
filename_case: 1
46+
render_drafts: false
47+
post_asset_folder: false
48+
relative_link: false
49+
future: true
50+
highlight:
51+
enable: false
52+
53+
# Home page setting
54+
# path: Root path for your blogs index page. (default = '')
55+
# per_page: Posts displayed per page. (0 = disable pagination)
56+
# order_by: Posts order. (Order by date descending by default)
57+
index_generator:
58+
path: ''
59+
per_page: 0
60+
order_by: -date
61+
62+
# Category & Tag
63+
default_category: uncategorized
64+
category_map:
65+
tag_map:
66+
67+
# Metadata elements
68+
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
69+
meta_generator: false
70+
71+
# Date / Time format
72+
## Hexo uses Moment.js to parse and display date
73+
## You can customize the date format as defined in
74+
## http://momentjs.com/docs/#/displaying/format/
75+
date_format: YYYY-MM-DD
76+
time_format: HH:mm:ss
77+
## Use post's date for updated date unless set in front-matter
78+
updated_option: 'date'
79+
80+
# Pagination
81+
## Set per_page to 0 to disable pagination
82+
per_page: 10
83+
pagination_dir: page
84+
85+
# Include / Exclude file(s)
86+
## include:/exclude: options only apply to the 'source/' folder
87+
include:
88+
exclude:
89+
- ".github"
90+
ignore:
91+
92+
# Extensions
93+
## Plugins: https://hexo.io/plugins/
94+
## Themes: https://hexo.io/themes/
95+
theme: coo
96+
97+
nofollow:
98+
enable: true
99+
field: site
100+
exclude:
101+
- 'exclude1.com'
102+
103+
excerpt:
104+
depth: 2
105+
excerpt_excludes: []
106+
more_excludes: []
107+
hideWholePostExcerpts: true
108+
109+
110+
# Deployment
111+
## Docs: https://hexo.io/docs/deployment.html
112+
deploy:
113+
# - type: cjh_google_url_submitter
114+
- type: cjh_bing_url_submitter
115+
- type: cjh_baidu_url_submitter
116+
117+
# hexo-server configuration
118+
server:
119+
# Solve the problem that occasional real-time refresh is invalid and long articles are truncated
120+
compress: true
121+
122+
# https://github.com/hexojs/hexo-generator-sitemap#options
123+
sitemap:
124+
path: sitemap.xml
125+
tags: false
126+
categories: false
127+
128+
# hexo-related-popular-posts
129+
# https://github.com/tea3/hexo-related-popular-posts/wiki/More-Settings#popular-posts
130+
popularPosts:
131+
googleAnalyticsAPI:
132+
clientId: 122889019292-92h297ceb29qnv9ulvgabad6q5kgv0an.apps.googleusercontent.com
133+
serviceEmail: [email protected]
134+
key: google-services-private-key.pem
135+
viewId: 242826463
136+
dateRange: 30 # (Optional) The period you want to get by Google Analytics page view. Default = 30
137+
expiresDate: 10 # (optional) Expiration date of cache file. Default = 10
138+
# cache: # (Deprecated) This options is Deprecated > v0.1.3
139+
# path: hexo-related-popular-posts-ga-cached.json # (Deprecated) This options is Deprecated > v0.1.3
140+
# expiresDate: 10 # (Deprecated) This options is Deprecated > v0.1.3
141+
142+
143+
# Markdown-it configuration
144+
## Docs: https://github.com/celsomiranda/hexo-renderer-markdown-it/wiki
145+
markdown:
146+
render:
147+
html: true
148+
xhtmlOut: false
149+
breaks: false
150+
linkify: false
151+
typographer: false
152+
quotes: '“”‘’'
153+
anchors:
154+
level: 2
155+
collisionSuffix: ''
156+
permalink: true
157+
permalinkClass: h-anchor
158+
permalinkSymbol: '#'
159+
case: 1
160+
separator: '-'

gulpfile.js

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
const gulp = require('gulp');
2+
const htmlmin = require('gulp-htmlmin');
3+
const htmlclean = require('gulp-htmlclean');
4+
const version = require('gulp-version-number');
5+
const terser = require('gulp-terser');
6+
7+
// Compress js files
8+
gulp.task('js', function () {
9+
return gulp.src(['./public/js/main.js'])
10+
.pipe(terser({
11+
compress: true
12+
}))
13+
.pipe(gulp.dest('./public/js'));
14+
});
15+
16+
17+
// Build html files
18+
gulp.task('html', function () {
19+
return gulp.src('./public/**/*.html')
20+
.pipe(htmlclean())
21+
.pipe(htmlmin({
22+
removeComments: true,
23+
minifyJS: true,
24+
minifyCSS: true,
25+
minifyURLs: true,
26+
}))
27+
.pipe(version({
28+
'append': {
29+
'key': '_v',
30+
'cover': 1,
31+
'to': ['css', 'js', 'png', 'jpg', 'woff2']
32+
}
33+
}))
34+
.pipe(gulp.dest('./public'));
35+
});
36+
37+
gulp.task('default', gulp.parallel('js', 'html'));

0 commit comments

Comments
 (0)