Skip to content

Commit

Permalink
feat: automatcic detection of indexing from branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ardasevinc committed Oct 27, 2023
1 parent c3b1f41 commit 3aa1fcc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion site.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { execSync } from 'child_process';

function getGitBranch(): string {
return execSync('git rev-parse --abbrev-ref HEAD').toString().trim();
}

export default {
disableIndexing: true,
disableIndexing: getGitBranch() !== 'main',
};

0 comments on commit 3aa1fcc

Please sign in to comment.