Skip to content
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

Update references #2068

Merged
merged 9 commits into from
Oct 26, 2023
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
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"**/CONTRIBUTING.md": true,
"**/LICENSE": true,
"**/README.md": true,
"globals.js": true
},
"eslint.experimental.useFlatConfig": true
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/30-seconds/30-seconds-of-code"
"url": "https://github.com/Chalarangelo/30-seconds-of-code"
},
"bugs": {
"url": "https://github.com/30-seconds/30-seconds-of-code/issues"
"url": "https://github.com/Chalarangelo/30-seconds-of-code/issues"
},
"browserslist": [
"> 0.5% and last 4 versions and not dead and not ie>0 and not op_mini all and not and_uc>0 and not edge<79"
Expand Down
1 change: 0 additions & 1 deletion public/ads.txt

This file was deleted.

2 changes: 1 addition & 1 deletion src/blocks/models/snippet.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const snippet = {
cache: true,
},
url: snippet =>
`https://github.com/30-seconds/30-seconds-of-code/blob/master/content/snippets${snippet.slug}.md`,
`https://github.com/Chalarangelo/30-seconds-of-code/blob/master/content/snippets${snippet.slug}.md`,
actionType: snippet => (snippet.code ? 'codepen' : undefined),
isScheduled: {
body: snippet => snippet.dateModified > new Date(),
Expand Down
4 changes: 1 addition & 3 deletions src/blocks/writers/sitemapWriter.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ export class SitemapWriter {
.getModel('CollectionsPage')
.records.map(page => `${websiteUrl}${page.slug}`, { flat: true });
const homePage = [`${websiteUrl}/`];
const staticPages = ['/about', '/faq', '/cookies'].map(
page => `${websiteUrl}${page}`
);
const staticPages = ['/about', '/faq'].map(page => `${websiteUrl}${page}`);

const pages = [
homePage,
Expand Down
64 changes: 0 additions & 64 deletions src/components/CookieConsent.js

This file was deleted.

27 changes: 0 additions & 27 deletions src/components/CookieConsentPopup.astro

This file was deleted.

1 change: 0 additions & 1 deletion src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const currentYear = new Date().getFullYear();
<footer class='box-border mt-0 pt-6 mx-2 mb-0 pb-6 g-c4'>
<p class='fs-xs lh-loose mx-2 my-1.5 flex gap-4'>
<a href='/about'>About</a>
<a href='/cookies'>Cookies</a>
<a href='/faq'>FAQ</a>
<a href='/feed'>RSS</a>
<a
Expand Down
36 changes: 0 additions & 36 deletions src/components/Meta.astro
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ const titleString = title
// Load scripts
const scripts = [];

// Adsense
if (process.env.NODE_ENV !== 'development') {
scripts.push({
async: true,
src: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9823478685429367',
crossOrigin: 'anonymous',
});
}

if (structuredData) {
scripts.push({
type: 'application/ld+json',
Expand All @@ -52,32 +43,6 @@ if (breadcrumbsData) {
}),
});
}

scripts.push({
async: true,
src: `https://www.googletagmanager.com/gtag/js?id=${settings.googleAnalytics.id}`,
});
// GTAG
scripts.push({
innerHTML: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag(
'consent',
'default',
${JSON.stringify(settings.googleAnalytics.consent)}
);
gtag(
'config',
'${settings.googleAnalytics.id}',
${JSON.stringify(settings.googleAnalytics.config)}
);
`,
});

// NOTE: The pageview was set to true in settings, no programmatic
// pageviews any more and we'll see how it goes.
---

<title>{titleString}</title>
Expand All @@ -93,7 +58,6 @@ scripts.push({
<script {...rest} set:html={innerHTML} />
))
}
<link rel='preconnect dns-prefetch' href='https://www.google-analytics.com' />
<link rel='sitemap' href='/sitemap.xml' type='application/xml' />
<link
rel='alternate'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Paginator.astro
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const nextButtonClass = `${prevNextButtonBase} ${prefabs.iconReverseButton} icon
{
pages.map(({ label, url, current }) =>
current ? (
<span class='fs-xl box-border f-center m-0' key={label}>
<span class='fs-xl box-border f-center m-0'>
{label}
</span>
) : (
Expand Down
4 changes: 0 additions & 4 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import '../styles/index.scss';

import Meta from '#components/Meta';
import Footer from '#components/Footer';
import CookieConsentPopup from '#components/CookieConsentPopup';
import Omnisearch from '#components/Omnisearch';

import settings from '#settings/global';
Expand All @@ -18,8 +17,6 @@ const {
canonical,
isFaq = false,
} = Astro.props;

const isDevelopment = process.env.NODE_ENV === 'development';
---

<html lang='en'>
Expand Down Expand Up @@ -98,7 +95,6 @@ const isDevelopment = process.env.NODE_ENV === 'development';
<slot />
<Footer />
</div>
{!isDevelopment ? <CookieConsentPopup /> : null}
<Omnisearch />
</div>
</body>
Expand Down
123 changes: 0 additions & 123 deletions src/pages/cookies.astro

This file was deleted.

4 changes: 2 additions & 2 deletions src/pages/faq.astro
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const pageDescription =
There are no specific requirements for contributing to 30 seconds of
code, except for reading and understanding our contribution
guidelines. Some more general guidelines can be found <a
href='https://github.com/30-seconds/30-seconds-of-code/blob/master/design/writing-guidelines.md'
href='https://github.com/Chalarangelo/30-seconds-of-code/blob/master/design/writing-guidelines.md'
target='_blank'
rel='noopener noreferrer'>here</a
>.<br /><br /> Note, however, that contributions to 30 seconds of code
Expand All @@ -81,7 +81,7 @@ const pageDescription =
>
<p itemprop='text'>
You can contribute snippets in the <a
href='https://github.com/30-seconds/30-seconds-of-code'
href='https://github.com/Chalarangelo/30-seconds-of-code'
target='_blank'
rel='noopener noreferrer'>GitHub repository</a
>. After reading the contribution guidelines, you can use the relevant
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ deploy_branch() {
git checkout -b $1
git reset --hard origin/master
git commit -m "[$(date +%Y.%m.%d_%H:%M)] Deployment/${DEPLOY_TRIGGER}" --allow-empty
git push --force --quiet "https://${GH_TOKEN}@github.com/30-seconds/30-seconds-of-code.git" $1 > /dev/null 2>&1
git push --force --quiet "https://${GH_TOKEN}@github.com/Chalarangelo/30-seconds-of-code.git" $1 > /dev/null 2>&1
}

deploy_production() {
Expand Down
Loading