Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
szweibel committed Sep 11, 2024
2 parents 0f7816e + 660d47e commit f362e01
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 20 deletions.
2 changes: 1 addition & 1 deletion components/Hooks/UseWorkshopsCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default function UseWorkshopCard({ workshop, gitUser, gitRepo, instUser,
}
}, [coverimage])

const workshopLink = '../dynamic/?user=' + gitUser + '&repo=' + gitRepo + '&file=' + workshop.name.split('.')[0] + '&instUser=' + instUser + '&instRepo=' + instRepo;
const workshopLink = '../dynamic?user=' + gitUser + '&repo=' + gitRepo + '&file=' + workshop.name.split('.')[0] + '&instUser=' + instUser + '&instRepo=' + instRepo;

if(parsedWorkshop?.data?.published === false){
console.log('not published', parsedWorkshop.data.title)
Expand Down
25 changes: 7 additions & 18 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,19 @@
const withYAML = require('next-yaml')
const withPlugins = require('next-compose-plugins')

const { default: next } = require('next');
const withMDX = require('@next/mdx')({
extension: /\.(md|mdx)$/,
})

const isGitHub = process.env.GITHUB_ACTIONS === "true";
console.log(`Running in ${isGitHub ? "GitHub Actions" : "local"} mode`);
var repoName;
if (isGitHub) {
repoName = process.env.GITHUB_REPOSITORY.split('/')[1];
}else{
repoName = 'dhrift';
}
const build = process.env.NODE_ENV === "production";
console.log(`Running in ${process.env.NODE_ENV} mode`);
process.env.NEXT_PUBLIC_REPO_NAME = repoName

process.env.NEXT_PUBLIC_GITHUB_ACTIONS = process.env.GITHUB_ACTIONS || false;
process.env.NEXT_PUBLIC_GITHUBSECRET = process.env.GITHUBSECRET || false;

const nextConfig = {
output: "export",
trailingSlash: true,
// basePath: isGitHub ? '/' + repoName : '',
// assetPrefix: isGitHub ? '/' + repoName : '',
// trailingSlash: true,
// basePath: process.env.PAGES_PATH || '',
images: {
unoptimized: true,
},
Expand All @@ -33,7 +24,5 @@ const nextConfig = {

console.log(nextConfig);

module.exports = withPlugins([
[withYAML],
// [withMDX],
], nextConfig);

module.exports = nextConfig;
3 changes: 2 additions & 1 deletion pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { useEffect } from 'react'
export default function Home() {

useEffect(() => {
window.location = '/inst?instUser=dhri-curriculum&instRepo=dhrift-site-template'
const urlBase = window.location.href.split('?')[0]
window.location = urlBase + '/inst?instUser=dhri-curriculum&instRepo=dhrift-site-template'
})

return (
Expand Down

0 comments on commit f362e01

Please sign in to comment.