Skip to content

Commit 75dff66

Browse files
jimporterwaylan
authored andcommitted
Add Github Actions config; resolves #1
Most of this is copied from the main MkDocs CI code. The linting is a bit more lenient though, since this is an older set of themes and it's probably not worth spending *too* much time cleaning them up.
1 parent 7e3a5e6 commit 75dff66

File tree

24 files changed

+251
-80
lines changed

24 files changed

+251
-80
lines changed

.csslintrc

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
--exclude-list = mkdocs_bootswatch_classic/amelia/css/bootstrap-custom.min.css,
2+
mkdocs_bootswatch_classic/bootstrap/css/bootstrap-3.3.7.min.css,
3+
mkdocs_bootswatch_classic/cerulean/css/bootstrap-custom.min.css,
4+
mkdocs_bootswatch_classic/cosmo/css/bootstrap-custom.min.css,
5+
mkdocs_bootswatch_classic/cyborg/css/bootstrap-custom.min.css,
6+
mkdocs_bootswatch_classic/flatly/css/bootstrap-custom.min.css,
7+
mkdocs_bootswatch_classic/journal/css/bootstrap-custom.min.css,
8+
mkdocs_bootswatch_classic/mkdocs/css/bootstrap-custom.min.css,
9+
mkdocs_bootswatch_classic/mkdocs/css/font-awesome.min.css,
10+
mkdocs_bootswatch_classic/readable/css/bootstrap-custom.min.css,
11+
mkdocs_bootswatch_classic/simplex/css/bootstrap-custom.min.css,
12+
mkdocs_bootswatch_classic/slate/css/bootstrap-custom.min.css,
13+
mkdocs_bootswatch_classic/spacelab/css/bootstrap-custom.min.css,
14+
mkdocs_bootswatch_classic/united/css/bootstrap-custom.min.css,
15+
mkdocs_bootswatch_classic/yeti/css/bootstrap-custom.min.css
16+
--errors = box-sizing,
17+
outline-none,
18+
bulletproof-font-face,
19+
compatible-vendor-prefixes,
20+
errors,
21+
duplicate-background-images,
22+
duplicate-properties,
23+
empty-rules,
24+
selector-max-approaching,
25+
gradients,
26+
floats,
27+
font-faces,
28+
font-sizes,
29+
shorthand,
30+
import,
31+
import-ie-limit,
32+
text-indent,
33+
rules-count,
34+
regex-selectors,
35+
selector-max,
36+
selector-newline,
37+
star-property-hack,
38+
underscore-property-hack,
39+
unqualified-attributes,
40+
vendor-prefix,
41+
zero-units,
42+
unique-headings,
43+
qualified-headings,
44+
ids,
45+
display-property-grouping,
46+
fallback-colors,
47+
box-model
48+
--ignore = order-alphabetical,
49+
known-properties,
50+
universal-selector,
51+
overqualified-elements,
52+
important,
53+
adjoining-classes
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: deploy-release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
10+
pypi:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Setup Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: 3.7
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip setuptools wheel
21+
- name: Build
22+
run: |
23+
python setup.py bdist_wheel sdist --formats gztar
24+
- name: Publish
25+
if: success()
26+
uses: pypa/gh-action-pypi-publish@v1.4.1
27+
with:
28+
user: __token__
29+
password: ${{ secrets.PYPI_PASSWORD }}

.github/workflows/tox.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
strategy:
8+
fail-fast: false
9+
max-parallel: 4
10+
matrix:
11+
os: [ubuntu-latest, windows-latest, macos-latest]
12+
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', pypy3]
13+
include:
14+
- python-version: 3.6
15+
tox-env: py36
16+
- python-version: 3.7
17+
tox-env: py37
18+
- python-version: 3.8
19+
tox-env: py38
20+
- python-version: 3.9
21+
tox-env: py39
22+
- python-version: '3.10'
23+
tox-env: py310
24+
- python-version: pypy3
25+
tox-env: pypy3
26+
env:
27+
TOXENV: ${{ matrix.tox-env }}
28+
runs-on: ${{ matrix.os }}
29+
steps:
30+
- uses: actions/checkout@v2
31+
- name: Setup Python ${{ matrix.python-version }}
32+
uses: actions/setup-python@v2
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
- name: Install dependencies
36+
run: |
37+
python -m pip install --upgrade pip tox coverage codecov
38+
- name: Run tox
39+
run: |
40+
python -m tox --discover $(which python)
41+
shell: bash
42+
43+
lint:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v2
47+
- name: Setup Python
48+
uses: actions/setup-python@v2
49+
with:
50+
python-version: 3.9
51+
- name: Install Python dependencies
52+
run: |
53+
python -m pip install --upgrade pip tox
54+
- name: Setup Node
55+
uses: actions/setup-node@v1
56+
with:
57+
node-version: 14
58+
- name: Install Node dependencies
59+
run: |
60+
npm install -g markdownlint-cli jshint csslint
61+
- name: Check with markdown-lint
62+
if: always()
63+
run: python -m tox -e markdown-lint
64+
- name: Check with jshint
65+
if: always()
66+
run: python -m tox -e jshint
67+
- name: Check with csslint
68+
if: always()
69+
run: python -m tox -e csslint

.jshintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mkdocs_bootswatch_classic/**/js/bootstrap-*.min.js
2+
mkdocs_bootswatch_classic/**/js/jquery-*.min.js

.markdownlintrc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
// Enable all markdownlint rules
3+
"default": true,
4+
5+
// Disable line length check
6+
"MD013": false,
7+
8+
// Set Ordered list item prefix to "ordered" (use 1. 2. 3. not 1. 1. 1.)
9+
"MD029": { "style": "ordered" },
10+
11+
// Set list indent level to 4 which Python-Markdown requires
12+
"MD007": { "indent": 4 },
13+
14+
// Exclude code block style
15+
"MD046": false,
16+
17+
// Allow inline HTML
18+
"MD033": false,
19+
20+
// Allow different title and top-level heading
21+
"MD025": false
22+
}

.travis.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
recursive-include mkdocs_bootswatch *.ico *.js *.css *.png *.html *.eot *.svg *.ttf *.woff *.yml
1+
recursive-include mkdocs_bootswatch_classic *.ico *.js *.css *.png *.html *.eot *.svg *.ttf *.woff *.yml
22
recursive-exclude * __pycache__
33
recursive-exclude * *.py[co]
44
include LICENSE

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# MkDocs Classic Bootswatch Themes
22

3-
See the documentation for more details:
4-
5-
https://mkdocs.github.io/mkdocs-bootswatch-classic/
6-
73
[![PyPI Version][pypi-v-image]][pypi-v-link]
8-
[![Build Status][travis-image]][travis-link]
4+
[![Build Status][ci-image]][ci-link]
95

106
[pypi-v-image]: https://img.shields.io/pypi/v/mkdocs-bootswatch-classic.svg
117
[pypi-v-link]: https://pypi.python.org/pypi/mkdocs-bootswatch-classic
12-
[travis-image]: https://img.shields.io/travis/mkdocs/mkdocs-bootswatch-classic/master.svg
13-
[travis-link]: https://travis-ci.org/mkdocs/mkdocs-bootswatch-classic
8+
[ci-image]: https://github.com/mkdocs/mkdocs-bootswatch-classic/actions/workflows/tox.yml/badge.svg
9+
[ci-link]: https://github.com/mkdocs/mkdocs-bootswatch-classic/actions/workflows/tox.yml
10+
11+
See the [documentation][documentation] for more details.
12+
13+
[documentation]: https://mkdocs.github.io/mkdocs-bootswatch-classic/
1414

1515
## Contributing
1616

docs/examples.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
---
12
title: Examples
3+
---
24

35
# Theme Examples
46

docs/index.md

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1+
---
12
title: Home
3+
---
24

35
# MkDocs Bootstrap Theme
46

57
This project provides legacy [MkDocs] themes based on the 1.0.x version of the
68
`mkdocs` theme for the different Bootstrap 2 themes provided by the
79
[Bootswatch] project.
810

9-
1011
## Installation & Usage
1112

1213
Install the collection of themes with pip, which is hopefully how you
1314
installed MkDocs.
1415

1516
pip install mkdocs-bootswatch-classic
1617

17-
1818
After installation is complete, edit your [mkdocs.yml] config file and set the
1919
[theme] to one of the following Bootwatch themes included. The full list is as
2020
follows:
2121

22-
- [mkdocs-classic](#mkdocs)
23-
- [amelia-classic](#amelia)
24-
- [bootstrap-classic](#bootstrap)
25-
- [cerulean-classic](#cerulean)
26-
- [cosmo-classic](#cosmo)
27-
- [cyborg-classic](#cyborg)
28-
- [flatly-classic](#flatly)
29-
- [journal-classic](#journal)
30-
- [readable-classic](#readable)
31-
- [simplex-classic](#simplex)
32-
- [slate-classic](#slate)
33-
- [spacelab-classic](#spacelab)
34-
- [united-classic](#united)
35-
- [yeti-classic](#yeti)
22+
- [mkdocs-classic](#mkdocs)
23+
- [amelia-classic](#amelia)
24+
- [bootstrap-classic](#bootstrap)
25+
- [cerulean-classic](#cerulean)
26+
- [cosmo-classic](#cosmo)
27+
- [cyborg-classic](#cyborg)
28+
- [flatly-classic](#flatly)
29+
- [journal-classic](#journal)
30+
- [readable-classic](#readable)
31+
- [simplex-classic](#simplex)
32+
- [slate-classic](#slate)
33+
- [spacelab-classic](#spacelab)
34+
- [united-classic](#united)
35+
- [yeti-classic](#yeti)
3636

3737
For example:
3838

@@ -53,45 +53,59 @@ This [documentation] is rendered with the Bootswatch [Flatly](#flatly) theme.
5353
Previews of the other themes can be seen below.
5454

5555
### MkDocs
56+
5657
![MkDocs](screenshots/mkdocs.png)
5758

5859
### Amelia
60+
5961
![Amelia](screenshots/amelia.png)
6062

6163
### Bootstrap
64+
6265
![Bootstrap](screenshots/bootstrap.png)
6366

6467
### Cerulean
68+
6569
![Cerulean](screenshots/cerulean.png)
6670

6771
### Cosmo
72+
6873
![Cosmo](screenshots/cosmo.png)
6974

7075
### Cyborg
76+
7177
![Cyborg](screenshots/cyborg.png)
7278

7379
### Flatly
80+
7481
![Flatly](screenshots/flatly.png)
7582

7683
### Journal
84+
7785
![Journal](screenshots/journal.png)
7886

7987
### Readable
88+
8089
![Readable](screenshots/readable.png)
8190

8291
### Simplex
92+
8393
![Simplex](screenshots/simplex.png)
8494

8595
### Slate
96+
8697
![Slate](screenshots/slate.png)
8798

8899
### Spacelab
100+
89101
![Spacelab](screenshots/spacelab.png)
90102

91103
### United
104+
92105
![United](screenshots/united.png)
93106

94107
### Yeti
108+
95109
![Yeti](screenshots/yeti.png)
96110

97111
[Mkdocs]: http://www.mkdocs.org

0 commit comments

Comments
 (0)