-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add dark mode theme to website #139
Conversation
❌ Deploy Preview for pybamm-developer-preview failed.
|
✅ Deploy Preview for pybamm-developer-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Build logs
I think we need to bump the Hugo version. What does the theme website use? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for starting this, @Bashamega. I think I will be able to better review this when the deployment to Netlify passes. I'll start checking locally in the meantime.
The GitPod configuration is pretty useful to have. However, could you please add that (plus instructions on how to set it up and use it) in a separate PR, since it's not related to the theme update?
I just checked and the theme now requires dart-sass to be installed alongside Hugo: https://gohugo.io/hugo-pipes/transpile-sass-to-css/#dart-sass. The change was documented in scientific-python/scientific-python-hugo-theme#401. |
They have some custom build commands here about how to install it: https://github.com/scientific-python/scientific-python-hugo-theme/blob/fa5570b57c22812b511c091f63d29fc125e00747/doc/netlify.toml#L2 and https://gohugo.io/hugo-pipes/transpile-sass-to-css/#netlify |
Sure @agriyakhetarpal, I have read all your comments and I will update the Hugo theme and add the dart package in the Netlify. |
I have updated the packages in the |
I don't see the dart-sass installation in the Netlify configuration file as of now, could you please add it? Here are the latest build logs: Tap to expand
9:04:53 AM: build-image version: 3d3c7e8b4321e2c1a54a2c4584fb46ba742b1630 (focal)
9:04:53 AM: buildbot version: d85d718afb4cfc1d31fb4837470daa2b526f928f
9:04:53 AM: Fetching cached dependencies
9:04:53 AM: Starting to download cache of 655.9MB
9:05:00 AM: Finished downloading cache in 6.973s
9:05:00 AM: Starting to extract cache
9:05:06 AM: Finished extracting cache in 6.552s
9:05:07 AM: Finished fetching cache in 13.608s
9:05:07 AM: Starting to prepare the repo for build
9:05:07 AM: Preparing Git Reference pull/139/head
9:05:08 AM: Custom ignore command detected. Proceeding with the specified command: 'false'
9:05:09 AM: manpath: warning: $PATH not set
9:05:09 AM: Starting to install dependencies
9:05:09 AM: Python version set to 3.8
9:05:10 AM: Attempting Ruby version 2.7.2, read from environment
9:05:10 AM: Using Ruby version 2.7.2
9:05:11 AM: Started restoring cached go cache
9:05:11 AM: Finished restoring cached go cache
9:05:12 AM: go version go1.19.13 linux/amd64
9:05:13 AM: Using PHP version 8.0
9:05:13 AM: Installing Hugo 0.125.4
9:05:17 AM: hugo v0.125.4-cc3574ef4f41fccbe88d9443ed066eb10867ada2+extended linux/amd64 BuildDate=2024-04-25T13:27:26Z VendorInfo=gohugoio
9:05:18 AM: Started restoring cached Node.js version
9:05:21 AM: Finished restoring cached Node.js version
9:05:22 AM: v20.12.2 is already installed.
9:05:22 AM: Now using node v20.12.2 (npm v10.5.0)
9:05:22 AM: Enabling Node.js Corepack
9:05:22 AM: Started restoring cached build plugins
9:05:22 AM: Finished restoring cached build plugins
9:05:22 AM: Successfully installed dependencies
9:05:22 AM: Starting build script
9:05:23 AM: Detected 1 framework(s)
9:05:23 AM: "hugo" at version "unknown"
9:05:23 AM: Section completed: initializing
9:05:25 AM:
9:05:25 AM: Netlify Build
9:05:25 AM: ────────────────────────────────────────────────────────────────
9:05:25 AM:
9:05:25 AM: ❯ Version
9:05:25 AM: @netlify/build 29.41.1
9:05:25 AM:
9:05:25 AM: ❯ Flags
9:05:25 AM: baseRelDir: true
9:05:25 AM: buildId: 6636fe513882e800086c0cab
9:05:25 AM: deployId: 6636fe513882e800086c0cad
9:05:25 AM:
9:05:25 AM: ❯ Current directory
9:05:25 AM: /opt/build/repo
9:05:25 AM:
9:05:25 AM: ❯ Config file
9:05:25 AM: /opt/build/repo/netlify.toml
9:05:25 AM:
9:05:25 AM: ❯ Context
9:05:25 AM: deploy-preview
9:05:25 AM:
9:05:25 AM: ❯ Loading plugins
9:05:25 AM: - [email protected] from netlify.toml
9:05:25 AM: - @netlify/[email protected] from netlify.toml
9:05:25 AM:
9:05:25 AM: ❯ Outdated plugins
9:05:25 AM: - @netlify/[email protected]: latest version is 6.0.0
9:05:25 AM: To upgrade this plugin, please remove it from "netlify.toml" and install it from the Netlify plugins directory instead (https://app.netlify.com/plugins)
9:05:27 AM:
9:05:27 AM: Build command from Netlify app
9:05:27 AM: ────────────────────────────────────────────────────────────────
9:05:27 AM:
9:05:27 AM: $ hugo
9:05:27 AM: Start building sites …
9:05:27 AM: hugo v0.125.4-cc3574ef4f41fccbe88d9443ed066eb10867ada2+extended linux/amd64 BuildDate=2024-04-25T13:27:26Z VendorInfo=gohugoio
9:05:27 AM: ERROR TOCSS-DART: failed to transform "theme-css/sphinx-design/index.scss.css" (text/x-scss). You need dart-sass-embedded in your system $PATH.: this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information
9:05:27 AM: Total in 85 ms
9:05:27 AM: Error: error building site: TOCSS-DART: failed to transform "theme-css/sphinx-design/index.scss.css" (text/x-scss). You need dart-sass-embedded in your system $PATH.: this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information
9:05:28 AM:
9:05:28 AM: "build.command" failed
9:05:28 AM: ────────────────────────────────────────────────────────────────
9:05:28 AM:
9:05:28 AM: Error message
9:05:28 AM: Command failed with exit code 1: hugo (https://ntl.fyi/exit-code-1)
9:05:28 AM:
9:05:28 AM: Error location
9:05:28 AM: In Build command from Netlify app:
9:05:28 AM: hugo
9:05:28 AM:
9:05:28 AM: Resolved config
9:05:28 AM: build:
9:05:28 AM: command: hugo
9:05:28 AM: commandOrigin: ui
9:05:28 AM: environment:
9:05:28 AM: - REVIEW_ID
9:05:28 AM: - PYTHON_VERSION
9:05:28 AM: - HUGO_VERSION
9:05:28 AM: - DART_SASS_VERSION
9:05:28 AM: - DART_SASS_URL
9:05:28 AM: ignore: 'false'
9:05:28 AM: publish: /opt/build/repo/public
9:05:28 AM: publishOrigin: ui
9:05:28 AM: plugins:
9:05:28 AM: - inputs:
9:05:28 AM: checkExternal: false
9:05:28 AM: recursive: true
9:05:28 AM: origin: config
9:05:28 AM: package: netlify-plugin-checklinks
9:05:28 AM: - inputs: {}
9:05:28 AM: origin: config
9:05:28 AM: package: '@netlify/plugin-lighthouse'
9:05:28 AM: redirects:
9:05:28 AM: - from: /benchmarks
9:05:28 AM: status: 301
9:05:28 AM: to: https://pybamm-team.github.io/pybamm-bench/
9:05:28 AM: - from: /slack
9:05:28 AM: status: 301
9:05:28 AM: to: https://join.slack.com/t/pybamm/shared_invite/zt-1xwnvkqrb-6ZKgB8yBU3zuzH91USdv_A
9:05:28 AM: - from: /*
status: 404
to: /404/
redirectsOrigin: config
9:05:28 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:05:28 AM: Failing build: Failed to build site
9:05:29 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
9:05:29 AM: Finished processing build request in 35.916s |
You will need to install |
Where is the build files stored? |
In our case, they are stored in |
It should be fixed now |
I think it will be fixed when the Netlify checks are all green: Newest deployment logs
|
Is there anything else that i can do. If there is nothing that i can do please merge the pr |
@Bashamega, I don't think we will be able to merge the PR with failing checks. I am happy to help you resolve them :) We have a bit of custom configuration that you can adapt to, and the rest of the changes should be easier to handle after that. We need to use 6:13:55 PM: make: *** No targets specified and no makefile found. Stop. |
Thank you very much for the tip. I am going to fix it |
Done. It should be better now |
Build logs7:58:18 PM: build-image version: 3d3c7e8b4321e2c1a54a2c4584fb46ba742b1630 (focal)
7:58:18 PM: buildbot version: d85d718afb4cfc1d31fb4837470daa2b526f928f
7:58:18 PM: Fetching cached dependencies
7:58:18 PM: Starting to download cache of 655.9MB
7:58:22 PM: Finished downloading cache in 4.175s
7:58:22 PM: Starting to extract cache
7:58:29 PM: Finished extracting cache in 6.332s
7:58:29 PM: Finished fetching cache in 10.577s
7:58:29 PM: Starting to prepare the repo for build
7:58:29 PM: Preparing Git Reference pull/139/head
7:58:30 PM: Custom build path detected. Proceeding with the specified path: 'content'
7:58:30 PM: Custom publish path detected. Proceeding with the specified path: 'content/public'
7:58:30 PM: Custom build command detected. Proceeding with the specified command: 'export DART_SASS_TARBALL="dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" && (cd /tmp && curl -LJO ${DART_SASS_URL}/${DART_SASS_VERSION}/${DART_SASS_TARBALL} && tar -xf ${DART_SASS_TARBALL} && rm ${DART_SASS_TARBALL}) && export PATH=/tmp/dart-sass:$PATH && (cd ../.. && ln -s repo scientific-python-hugo-theme) && (cd .. && nox ${BUILD_TARGET})
'
7:58:30 PM: Custom ignore command detected. Proceeding with the specified command: 'false'
7:58:31 PM: manpath: warning: $PATH not set
7:58:31 PM: Starting to install dependencies
7:58:32 PM: Python version set to 3.8
7:58:32 PM: Attempting Ruby version 2.7.2, read from environment
7:58:33 PM: Using Ruby version 2.7.2
7:58:33 PM: Started restoring cached go cache
7:58:33 PM: Finished restoring cached go cache
7:58:35 PM: go version go1.19.13 linux/amd64
7:58:36 PM: Using PHP version 8.0
7:58:36 PM: Installing Hugo 0.125.4
7:58:37 PM: hugo v0.125.4-cc3574ef4f41fccbe88d9443ed066eb10867ada2+extended linux/amd64 BuildDate=2024-04-25T13:27:26Z VendorInfo=gohugoio
7:58:38 PM: Started restoring cached Node.js version
7:58:42 PM: Finished restoring cached Node.js version
7:58:42 PM: v20.12.2 is already installed.
7:58:42 PM: Now using node v20.12.2 (npm v10.5.0)
7:58:42 PM: Enabling Node.js Corepack
7:58:42 PM: Started restoring cached build plugins
7:58:42 PM: Finished restoring cached build plugins
7:58:43 PM: Successfully installed dependencies
7:58:43 PM: Starting build script
7:58:44 PM: Detected 1 framework(s)
7:58:44 PM: "hugo" at version "unknown"
7:58:44 PM: Section completed: initializing
7:58:45 PM:
7:58:45 PM: Netlify Build
7:58:45 PM: ────────────────────────────────────────────────────────────────
7:58:45 PM:
7:58:45 PM: ❯ Version
7:58:45 PM: @netlify/build 29.41.1
7:58:45 PM:
7:58:45 PM: ❯ Flags
7:58:45 PM: baseRelDir: true
7:58:45 PM: buildId: 663797775c8e8100080d8e27
7:58:45 PM: deployId: 663797775c8e8100080d8e29
7:58:45 PM:
7:58:45 PM: ❯ Current directory
7:58:45 PM: /opt/build/repo/content
7:58:45 PM:
7:58:45 PM: ❯ Config file
7:58:45 PM: /opt/build/repo/netlify.toml
7:58:45 PM:
7:58:45 PM: ❯ Context
7:58:45 PM: deploy-preview
7:58:46 PM:
7:58:46 PM: ❯ Loading plugins
7:58:46 PM: - [email protected] from netlify.toml
7:58:46 PM: - @netlify/[email protected] from netlify.toml
7:58:46 PM:
7:58:46 PM: ❯ Outdated plugins
7:58:46 PM: - @netlify/[email protected]: latest version is 6.0.0
7:58:46 PM: To upgrade this plugin, please remove it from "netlify.toml" and install it from the Netlify plugins directory instead (https://app.netlify.com/plugins)
7:58:48 PM:
7:58:48 PM: build.command from netlify.toml
7:58:48 PM: ────────────────────────────────────────────────────────────────
7:58:48 PM:
7:58:48 PM: $ export DART_SASS_TARBALL="dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" && (cd /tmp && curl -LJO ${DART_SASS_URL}/${DART_SASS_VERSION}/${DART_SASS_TARBALL} && tar -xf ${DART_SASS_TARBALL} && rm ${DART_SASS_TARBALL}) && export PATH=/tmp/dart-sass:$PATH && (cd ../.. && ln -s repo scientific-python-hugo-theme) && (cd .. && nox ${BUILD_TARGET})
7:58:48 PM:
7:58:48 PM: % Total % Received % Xferd Average Speed Time Time Time Current
7:58:48 PM: Dload Upload Total Spent Left Speed
7:58:48 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
7:58:48 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
7:58:48 PM: 100 3671k 100 3671k 0 0 12.5M 0 --:--:-- --:--:-- --:--:-- 12.5M
7:58:48 PM: curl: Saved to filename 'dart-sass-1.75.0-linux-x64.tar.gz'
7:58:48 PM: bash: nox: command not found
7:58:49 PM:
7:58:49 PM: "build.command" failed
7:58:49 PM: ────────────────────────────────────────────────────────────────
7:58:49 PM:
7:58:49 PM: Error message
7:58:49 PM: Command failed with exit code 127: export DART_SASS_TARBALL="dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" && (cd /tmp && curl -LJO ${DART_SASS_URL}/${DART_SASS_VERSION}/${DART_SASS_TARBALL} && tar -xf ${DART_SASS_TARBALL} && rm ${DART_SASS_TARBALL}) && export PATH=/tmp/dart-sass:$PATH && (cd ../.. && ln -s repo scientific-python-hugo-theme) && (cd .. && nox ${BUILD_TARGET}) (https://ntl.fyi/exit-code-127)
7:58:49 PM:
7:58:49 PM: Error location
7:58:49 PM: In build.command from netlify.toml:
7:58:49 PM: export DART_SASS_TARBALL="dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" && (cd /tmp && curl -LJO ${DART_SASS_URL}/${DART_SASS_VERSION}/${DART_SASS_TARBALL} && tar -xf ${DART_SASS_TARBALL} && rm ${DART_SASS_TARBALL}) && export PATH=/tmp/dart-sass:$PATH && (cd ../.. && ln -s repo scientific-python-hugo-theme) && (cd .. && nox ${BUILD_TARGET})
7:58:49 PM:
7:58:49 PM: Resolved config
7:58:49 PM: build:
7:58:49 PM: base: /opt/build/repo/content
7:58:49 PM: command: |-
7:58:49 PM: export DART_SASS_TARBALL="dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" && (cd /tmp && curl -LJO ${DART_SASS_URL}/${DART_SASS_VERSION}/${DART_SASS_TARBALL} && tar -xf ${DART_SASS_TARBALL} && rm ${DART_SASS_TARBALL}) && export PATH=/tmp/dart-sass:$PATH && (cd ../.. && ln -s repo scientific-python-hugo-theme) && (cd .. && nox ${BUILD_TARGET})
7:58:49 PM:
7:58:49 PM: commandOrigin: config
7:58:49 PM: environment:
7:58:49 PM: - REVIEW_ID
7:58:49 PM: - PYTHON_VERSION
7:58:49 PM: - HUGO_VERSION
7:58:49 PM: - DART_SASS_VERSION
7:58:49 PM: - DART_SASS_URL
7:58:49 PM: ignore: 'false'
7:58:49 PM: publish: /opt/build/repo/content/public
7:58:49 PM: publishOrigin: config
7:58:49 PM: plugins:
7:58:49 PM: - inputs:
7:58:49 PM: checkExternal: false
7:58:49 PM: recursive: true
7:58:49 PM: origin: config
7:58:49 PM: package: netlify-plugin-checklinks
7:58:49 PM: - inputs: {}
7:58:49 PM: origin: config
7:58:49 PM: package: '@netlify/plugin-lighthouse'
7:58:49 PM: redirects:
7:58:49 PM: - from: /benchmarks
7:58:49 PM: status: 301
7:58:49 PM: to: https://pybamm-team.github.io/pybamm-bench/
7:58:49 PM: - from: /slack
7:58:49 PM: status: 301
7:58:49 PM: to: https://join.slack.com/t/pybamm/shared_invite/zt-1xwnvkqrb-6ZKgB8yBU3zuzH91USdv_A
7:58:50 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
7:58:50 PM: - from: /*
status: 404
to: /404/
redirectsOrigin: config
7:58:50 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
7:58:50 PM: Failing build: Failed to build site
7:58:50 PM: Finished processing build request in 32.153s It looks like you need to do |
Will you merge the pr? |
I pushed a few more changes (table of contents, CSS overrides, some restructuring). Deployment checks are now passing |
Ok |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Bashamega, this is well done.
Looks like we've switched to dark theme instead of addition of dark theme?
It is by your default browser preferences. But they are working on it here: scientific-python/scientific-python-hugo-theme#566 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the prompt response @Bashamega, this looks good to me overall then :)
Your welcome |
I accidently re requested the review sorry :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries
Solves #138
Hello:)
I have added the dark mode theme
Changes Made:
ScreenShot: