mirror of
https://github.com/kuohuanhuan/x-markdown-css.git
synced 2024-11-25 06:18:19 +00:00
Compare commits
33 Commits
v0.0.0-202
...
v0.0.0-202
Author | SHA1 | Date | |
---|---|---|---|
24056e42d5
|
|||
274fc0fb31
|
|||
e83212e00f
|
|||
40a50968ed
|
|||
1a62e1258e
|
|||
648738b890
|
|||
7dc2238fdf
|
|||
65b4b24002
|
|||
94e8477077
|
|||
4bbc199636
|
|||
fd57e4bc4f
|
|||
ab38a24a75
|
|||
93e2f86137
|
|||
e622185bbf
|
|||
78cf02d7b8
|
|||
eba9d56ae6
|
|||
2da4f4deb2
|
|||
cd9ecdfed3
|
|||
9bf22aa5bd
|
|||
e6718acc37
|
|||
15ef37c0d2
|
|||
6fd50e0707
|
|||
8da53d8cde
|
|||
decfa2c47c
|
|||
58317f99cb
|
|||
a3f9084a2e
|
|||
26d5c7966f
|
|||
296bf3016e
|
|||
a40c973e46
|
|||
29b45f6a7f
|
|||
c2bd2cb722
|
|||
bd2f74a3b2
|
|||
d69a4ea949
|
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
@ -21,13 +21,13 @@ jobs:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
registry-url: https://registry.npmjs.org/
|
||||
node-version: 18
|
||||
registry-url: https://registry.npmjs.com
|
||||
# Step III
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
# Step IV
|
||||
- name: Lint
|
||||
- name: Test Lint
|
||||
run: npm run lint
|
||||
# Test Build
|
||||
build:
|
||||
@ -47,10 +47,19 @@ jobs:
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: https://registry.npmjs.org/
|
||||
registry-url: https://registry.npmjs.com
|
||||
# Step III
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
# Step IV
|
||||
- name: Test Build
|
||||
run: npm run build
|
||||
# Step V
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: built-on__os_${{ matrix.os }}__nodejs_${{ matrix.node-version }}
|
||||
path: dist/
|
||||
retention-days: 3
|
||||
|
||||
# Authored by @kuohuanhuan.
|
||||
|
26
.github/workflows/release.yml
vendored
26
.github/workflows/release.yml
vendored
@ -6,7 +6,7 @@ on:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
# NPM Registry Release
|
||||
# NPM Registry & GitHub Release
|
||||
release:
|
||||
# Use Ubuntu 22.04
|
||||
runs-on: ubuntu-22.04
|
||||
@ -20,8 +20,8 @@ jobs:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
registry-url: https://registry.npmjs.org/
|
||||
node-version: 18
|
||||
registry-url: https://registry.npmjs.com
|
||||
# Step III
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
@ -29,12 +29,30 @@ jobs:
|
||||
- name: Build Project
|
||||
run: npm run build
|
||||
# Step V
|
||||
- name: Create tar.gz File
|
||||
uses: TheDoctor0/zip-release@0.7.1
|
||||
with:
|
||||
type: tar
|
||||
path: dist/
|
||||
filename: build.tar.gz
|
||||
# Step VI
|
||||
- name: Publish to NPM Registry
|
||||
uses: rxfork/npm-publish@v1
|
||||
with:
|
||||
token: ${{ secrets.NPM_TOKEN }}
|
||||
# Step VI
|
||||
# Step VII
|
||||
- name: GitHub Release
|
||||
uses: marvinpinto/action-automatic-releases@latest
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
prerelease: false
|
||||
files: |
|
||||
dist/*
|
||||
build.tar.gz
|
||||
# Step VIII
|
||||
- name: Generate Changelog
|
||||
run: npx changelogithub@0.12
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Authored by @kuohuanhuan.
|
||||
|
@ -1,3 +1,4 @@
|
||||
build.tar.gz
|
||||
node_modules/
|
||||
.github/
|
||||
.vscode/
|
||||
|
@ -4,8 +4,7 @@
|
||||
"stylelint-config-standard-scss",
|
||||
"stylelint-config-hudochenkov/order"
|
||||
],
|
||||
"plugins": ["stylelint-scss"]
|
||||
,
|
||||
"plugins": ["stylelint-scss"],
|
||||
"rules": {
|
||||
"alpha-value-notation": "number",
|
||||
"at-rule-empty-line-before": null,
|
||||
|
@ -29,7 +29,10 @@ module.exports = (grunt) ->
|
||||
exp:
|
||||
options:
|
||||
processors: [
|
||||
require('postcss-preset-env')()
|
||||
require('postcss-preset-env')(
|
||||
features:
|
||||
'custom-properties': false
|
||||
)
|
||||
require('autoprefixer')()
|
||||
]
|
||||
src: 'dist/bundle.css'
|
||||
@ -37,7 +40,10 @@ module.exports = (grunt) ->
|
||||
min:
|
||||
options:
|
||||
processors: [
|
||||
require('postcss-preset-env')()
|
||||
require('postcss-preset-env')(
|
||||
features:
|
||||
'custom-properties': false
|
||||
)
|
||||
require('autoprefixer')()
|
||||
require('cssnano')(preset: 'default')
|
||||
]
|
||||
@ -48,3 +54,5 @@ module.exports = (grunt) ->
|
||||
'sass'
|
||||
'postcss'
|
||||
]
|
||||
|
||||
# Authored by @kuohuanhuan.
|
||||
|
16
README.md
16
README.md
@ -1,14 +1,14 @@
|
||||
<h1 align="center">x-markdown-css</h1>
|
||||
|
||||
<p align="center">
|
||||
<center>
|
||||
|
||||
[](https://www.npmjs.com/package/x-markdown-css)
|
||||
[](https://github.com/kuohuanhuan/x-markdown-css/blob/master/package.json)
|
||||
[](https://github.com/kuohuanhuan/x-markdown-css/blob/master/LICENSE)
|
||||
|
||||
</p>
|
||||
</center>
|
||||
|
||||
> A simple and customizable Markdown CSS for everyone.
|
||||
> A simple and customizable markdown CSS stylesheet for everyone.
|
||||
|
||||
## Requirement
|
||||
|
||||
@ -50,11 +50,11 @@ You can use the minified CSS file with a CDN service:
|
||||
|
||||
## Uses
|
||||
|
||||
- [SCSS](https://sass-lang.com): CSS pre-processor.
|
||||
- [Stylelint](https://stylelint.io): Linting SCSS codes.
|
||||
- [Grunt](https://gruntjs.com): Automating build tasks.
|
||||
- [PostCSS](https://postcss.org): Transforming CSS dist.
|
||||
- [cssnano](https://cssnano.co): Compressing CSS dist.
|
||||
- [SCSS](https://sass-lang.com)
|
||||
- [Stylelint](https://stylelint.io)
|
||||
- [Grunt](https://gruntjs.com)
|
||||
- [PostCSS](https://postcss.org)
|
||||
- [cssnano](https://cssnano.co)
|
||||
|
||||
*...and much more.*
|
||||
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "x-markdown-css",
|
||||
"version": "0.0.0-20230302.3",
|
||||
"version": "0.0.0-20230303.3",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "x-markdown-css",
|
||||
"version": "0.0.0-20230302.3",
|
||||
"description": "A simple and customizable Markdown CSS for everyone.",
|
||||
"version": "0.0.0-20230303.3",
|
||||
"description": "A simple and customizable markdown CSS stylesheet for everyone.",
|
||||
"keywords": [
|
||||
"markdown",
|
||||
"css",
|
||||
@ -16,7 +16,8 @@
|
||||
"article",
|
||||
"documentation"
|
||||
],
|
||||
"main": "index.js",
|
||||
"sass": "src/index.scss",
|
||||
"style": "dist/bundle.min.css",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/kuohuanhuan/x-markdown-css.git"
|
||||
|
@ -1,12 +1,10 @@
|
||||
.markdown-body {
|
||||
color: var(--xm-c-general);
|
||||
font-family: var(--xm-font-display) !important;
|
||||
pre {
|
||||
&:not(.shiki, .highlight) {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
}
|
||||
pre:not(.shiki, .highlight) {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
}
|
||||
.shiki,
|
||||
.highlight {
|
||||
@ -38,7 +36,8 @@
|
||||
}
|
||||
hr {
|
||||
width: 50px;
|
||||
margin: 2rem auto;
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
blockquote,
|
||||
q {
|
||||
@ -81,7 +80,7 @@ html:not(.dark) .shiki-dark,
|
||||
.header-anchor {
|
||||
float: left;
|
||||
margin-top: .125rem;
|
||||
margin-left: -1.2rem;
|
||||
margin-left: -1.25rem;
|
||||
padding-right: .5rem;
|
||||
border: 0 !important;
|
||||
font-size: .875rem;
|
||||
@ -92,16 +91,13 @@ html:not(.dark) .shiki-dark,
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
&:hover,
|
||||
&:focus {
|
||||
.header-anchor {
|
||||
opacity: .5;
|
||||
@for $i from 1 through 6 {
|
||||
h#{$i} {
|
||||
&:hover,
|
||||
&:focus {
|
||||
.header-anchor {
|
||||
opacity: .35 + $i * .025;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ q {
|
||||
margin-top: 1.65rem;
|
||||
margin-bottom: 1.65rem;
|
||||
padding-left: 1rem;
|
||||
border-left: .25rem solid var(--xm-c-blockquote-border);
|
||||
border-left: .25rem solid var(--xm-c-quote-border);
|
||||
color: inherit;
|
||||
font-weight: 500;
|
||||
font-style: italic;
|
@ -1,6 +1,6 @@
|
||||
@use 'partial/container' as *;
|
||||
@use 'partials/container' as *;
|
||||
|
||||
.prose {
|
||||
@include container;
|
||||
@import 'partial/all';
|
||||
@import 'partials/all';
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ $code: #111827;
|
||||
$ol-counter: #6b7280;
|
||||
$ul-counter: #d1d5db;
|
||||
$hr-border: hsla(0deg 0 50% / .3);
|
||||
$blockquote-border: hsla(0deg 0 50% / .3);
|
||||
$quote-border: hsla(0deg 0 50% / .3);
|
||||
$figcaption: #6b7280;
|
||||
$pre: #e5e7eb;
|
||||
$thead: #111827;
|
||||
|
Reference in New Issue
Block a user