Skip to content

Add webpack for static asset generation #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,5 @@ ENV/

# mypy
.mypy_cache/

node_modules/
30 changes: 30 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "pandas_sphinx_theme",
"version": "0.0.1",
"main": "js/theme.js",
"repository": "https://github.com/pandas-dev/pydata-bootstrap-sphinx-theme",
"scripts": {
"build:dev": "webpack-dev-server --config webpack.dev.js",
"build:production": "webpack --config webpack.prod.js"
},
"devDependencies": {
"copy-webpack-plugin": "^5.1.1",
"css-loader": "^3.4.2",
"extract-loader": "^4.0.3",
"file-loader": "^5.0.2",
"imports-loader": "^0.8.0",
"mini-css-extract-plugin": "^0.9.0",
"node-sass": "^4.13.1",
"sass-loader": "^8.0.2",
"style-loader": "^1.1.3",
"webpack": "^4.41.6",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.10.3",
"webpack-merge": "^4.2.2",
"webpack-shell-plugin": "^0.5.0",
"webpack-watch-files-plugin": "^1.0.3"
},
"dependencies": {
"optimize-css-assets-webpack-plugin": "^5.0.3"
}
}
4 changes: 2 additions & 2 deletions pandas_sphinx_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css" integrity="sha384-KA6wR/X5RY4zFAHpv/CnoG2UW1uogYfdnP67Uv7eULvTveboZJg0qUpmJZb5VqzN" crossorigin="anonymous">

{{- css() }}
<link href="{{ pathto('_static/css/custom.css', 1) }}" rel="stylesheet">
<link href="{{ pathto('_static/css/theme.css', 1) }}" rel="stylesheet">
{%- endblock %}

{%- block extrahead %}
Expand Down Expand Up @@ -67,8 +67,8 @@

</div>
</div>
{%- include "scripts.html" %}

<script src="{{ pathto('_static/js/theme.js', 1) }}"></script>
{% if theme_google_analytics_id %}
<!-- Google Analytics -->
<script>
Expand Down
47 changes: 0 additions & 47 deletions pandas_sphinx_theme/scripts.html

This file was deleted.

Loading