-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9a12f0e
Showing
63 changed files
with
6,891 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Document global line endings settings | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
* text eol=lf | ||
|
||
|
||
# Denote all files that are truly binary and should not be modified. | ||
*.ai binary | ||
*.jpg binary | ||
*.otf binary | ||
*.png binary | ||
*.eot binary | ||
*.ttf binary | ||
*.whl binary | ||
*.woff binary | ||
*.woff2 binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
*build/ | ||
*.DS_Store | ||
*.sass-cache | ||
*.map | ||
node_modules | ||
npm-debug.log | ||
yarn-error.log | ||
package-lock.json | ||
pytorch_sphinx_theme/static/fonts/Lato/ | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
module.exports = function(grunt) { | ||
|
||
// load all grunt tasks | ||
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | ||
|
||
grunt.initConfig({ | ||
// Read package.json | ||
pkg: grunt.file.readJSON("package.json"), | ||
|
||
open : { | ||
dev: { | ||
path: 'http://localhost:1919' | ||
} | ||
}, | ||
|
||
connect: { | ||
server: { | ||
options: { | ||
port: 1919, | ||
base: 'docs/build', | ||
livereload: true | ||
} | ||
} | ||
}, | ||
copy: { | ||
fonts: { | ||
files: [ | ||
{ | ||
expand: true, | ||
flatten: true, | ||
src: ['fonts/Lato/*'], | ||
dest: 'pytorch_sphinx_theme/static/fonts/Lato', | ||
filter: 'isFile' | ||
} | ||
] | ||
} | ||
}, | ||
|
||
sass: { | ||
dev: { | ||
options: { | ||
style: 'expanded' | ||
}, | ||
files: [{ | ||
expand: true, | ||
cwd: 'scss', | ||
src: ['*.scss'], | ||
dest: 'pytorch_sphinx_theme/static/css', | ||
ext: '.css' | ||
}] | ||
}, | ||
build: { | ||
options: { | ||
style: 'compressed', | ||
sourcemap: 'none' | ||
}, | ||
files: [{ | ||
expand: true, | ||
cwd: 'scss', | ||
src: ['*.scss'], | ||
dest: 'pytorch_sphinx_theme/static/css', | ||
ext: '.css' | ||
}] | ||
} | ||
}, | ||
|
||
browserify: { | ||
dev: { | ||
options: { | ||
external: ['jquery'], | ||
alias: { | ||
'pytorch-sphinx-theme': './js/theme.js' | ||
} | ||
}, | ||
src: ['js/*.js'], | ||
dest: 'pytorch_sphinx_theme/static/js/theme.js' | ||
}, | ||
build: { | ||
options: { | ||
external: ['jquery'], | ||
alias: { | ||
'pytorch-sphinx-theme': './js/theme.js' | ||
} | ||
}, | ||
src: ['js/*.js'], | ||
dest: 'pytorch_sphinx_theme/static/js/theme.js' | ||
} | ||
}, | ||
uglify: { | ||
dist: { | ||
options: { | ||
sourceMap: false, | ||
mangle: { | ||
reserved: ['jQuery'] // Leave 'jQuery' identifier unchanged | ||
}, | ||
ie8: true // compliance with IE 6-8 quirks | ||
}, | ||
files: [{ | ||
expand: true, | ||
src: ['pytorch_sphinx_theme/static/js/*.js', '!pytorch_sphinx_theme/static/js/*.min.js'], | ||
dest: 'pytorch_sphinx_theme/static/js/', | ||
rename: function (dst, src) { | ||
// Use unminified file name for minified file | ||
return src; | ||
} | ||
}] | ||
} | ||
}, | ||
usebanner: { | ||
dist: { | ||
options: { | ||
position: 'top', | ||
banner: '/* <%= pkg.name %> version <%= pkg.version %> | MIT license */\n' + | ||
'/* Built <%= grunt.template.today("yyyymmdd HH:mm") %> */', | ||
linebreak: true | ||
}, | ||
files: { | ||
src: [ 'pytorch_sphinx_theme/static/js/theme.js', 'pytorch_sphinx_theme/static/css/theme.css' ] | ||
} | ||
} | ||
}, | ||
exec: { | ||
build_sphinx: { | ||
cmd: 'sphinx-build docs/ docs/build' | ||
} | ||
}, | ||
clean: { | ||
build: ["docs/build"], | ||
fonts: ["pytorch_sphinx_theme/static/fonts"], | ||
css: ["pytorch_sphinx_theme/static/css"], | ||
js: ["pytorch_sphinx_theme/static/js/*", "!pytorch_sphinx_theme/static/js/modernizr.min.js"] | ||
}, | ||
|
||
watch: { | ||
/* Compile scss changes into theme directory */ | ||
sass: { | ||
files: ['scss/*.scss'], | ||
tasks: ['sass:dev'] | ||
}, | ||
/* Changes in theme dir rebuild sphinx */ | ||
sphinx: { | ||
files: ['pytorch_sphinx_theme/**/*', 'README.rst', 'docs/**/*.rst', 'docs/**/*.py'], | ||
tasks: ['clean:build','exec:build_sphinx'] | ||
}, | ||
/* JavaScript */ | ||
browserify: { | ||
files: ['js/*.js'], | ||
tasks: ['browserify:dev'] | ||
}, | ||
/* live-reload the docs if sphinx re-builds */ | ||
livereload: { | ||
files: ['docs/build/**/*'], | ||
options: { livereload: true } | ||
} | ||
} | ||
|
||
}); | ||
|
||
grunt.loadNpmTasks('grunt-exec'); | ||
grunt.loadNpmTasks('grunt-contrib-connect'); | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-contrib-sass'); | ||
grunt.loadNpmTasks('grunt-contrib-clean'); | ||
grunt.loadNpmTasks('grunt-contrib-copy'); | ||
grunt.loadNpmTasks('grunt-open'); | ||
grunt.loadNpmTasks('grunt-browserify'); | ||
|
||
grunt.registerTask('default', ['clean','copy:fonts','sass:dev','browserify:dev','usebanner','exec:build_sphinx','connect','open','watch']); | ||
grunt.registerTask('build', ['clean','copy:fonts','sass:build','browserify:build','uglify','usebanner','exec:build_sphinx']); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
************************** | ||
PyTorch Sphinx Theme | ||
************************** | ||
|
||
Sphinx theme for PyTorch based on the Read the Docs Sphinx Theme: https://sphinx-rtd-theme.readthedocs.io/en/latest. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS = | ||
SPHINXBUILD = sphinx-build | ||
SPHINXPROJ = PyTorchSphinxTheme | ||
SOURCEDIR = . | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
********* | ||
Changelog | ||
********* | ||
|
||
v0.0.1 |
Oops, something went wrong.