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

chore: remove www from internal URLs #185

Merged
merged 1 commit into from
May 18, 2024
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p align="center"><img src="./web/static/images/og/cover-01.jpg" /></p>
<h2 align="center">
<a href="https://www.cran-e.com">CRAN/E</a>
<a href="https://cran-e.com">CRAN/E</a>
</h2>
<p align="center">CRAN/E is a modern PWA (Progressive Web App) that serves as a search engine and information display for packages hosted on CRAN. CRAN/E means 'The Comprehensive R Archive Network, Enhanced' and aims at finding R-packages as fast as possible.</p>

Expand All @@ -16,7 +16,7 @@

# Applications

## [PWA (Progressive Web App)](https://www.cran-e.com)
## [PWA (Progressive Web App)](https://cran-e.com)

You can use CRAN/E directly in any modern browser. If supported, CRAN/E can provide its best performance by using local databases and effective caching. CRAN/E can also be installed locally in Chromium-based browsers. For more information regarding PWAs, please visit [this great guide](https://web.dev/progressive-web-apps/).

Expand Down
2 changes: 1 addition & 1 deletion services/og-img-gen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## About

This service generates an image for the open graph poster to be used for entities' sites hosted on https://www.cran-e.com. It makes a screenshot of the entity's poster site and returns it as a JPEG image.
This service generates an image for the open graph poster to be used for entities' sites hosted on https://cran-e.com. It makes a screenshot of the entity's poster site and returns it as a JPEG image.

## Development

Expand Down
2 changes: 1 addition & 1 deletion services/og-img-gen/fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ processes = []

[env]
PORT = "8080"
FE_BASE_URL = "https://www.cran-e.com"
FE_BASE_URL = "https://cran-e.com"

[experimental]
allowed_public_ports = []
Expand Down
4 changes: 2 additions & 2 deletions web/src/lib/seo/views/BaseMeta.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
export let path: string | undefined = '';
export let image: { url: string; alt: string } | undefined = undefined;

const url = `https://www.cran-e.com${path}`;
const imageUrl = image?.url || 'https://www.cran-e.com/images/og/cover-01.jpg';
const url = `https://cran-e.com${path}`;
const imageUrl = image?.url || 'https://cran-e.com/images/og/cover-01.jpg';
const imageAlt = image?.alt || 'CRAN/E logo in written form, white text on a black background';
</script>

Expand Down
2 changes: 1 addition & 1 deletion web/src/lib/seo/views/BreadcrumbMeta.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'@type': 'ListItem',
position: i + 1,
name: item.name,
item: 'https://www.cran-e.com' + item.href
item: 'https://cran-e.com' + item.href
}))
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion web/src/lib/seo/views/PersonMeta.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'@context': 'https://schema.org',
'@type': 'Person',
name: name,
url: 'https://www.cran-e.com/author/' + encodeURIComponent(name)
url: 'https://cran-e.com/author/' + encodeURIComponent(name)
}}
/>
{/if}
2 changes: 1 addition & 1 deletion web/src/lib/sitemap/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function composeUrlElement(params: {
priority?: string;
}) {
const { path, lastmod, changefreq = 'monthly', priority = 0.8 } = params;
return `<url><loc>https://www.cran-e.com${path}</loc><lastmod>${lastmod}</lastmod><changefreq>${changefreq}</changefreq><priority>${priority}</priority></url>`.trim();
return `<url><loc>https://cran-e.com${path}</loc><lastmod>${lastmod}</lastmod><changefreq>${changefreq}</changefreq><priority>${priority}</priority></url>`.trim();
}

export function composeAuthorUrl(name: string) {
Expand Down
2 changes: 1 addition & 1 deletion web/src/routes/author/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
description="All packages for {id}"
path="/author/{slug}"
image={{
url: `https://www.cran-e.com/api/author/${slug}/poster.jpeg`,
url: `https://cran-e.com/api/author/${slug}/poster.jpeg`,
alt: `Poster for ${id}`
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion web/src/routes/package/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
description="R package for {item.title}"
path="/package/{item.slug}"
image={{
url: `https://www.cran-e.com/api/package/${item.slug}/poster.jpeg`,
url: `https://cran-e.com/api/package/${item.slug}/poster.jpeg`,
alt: `R package ${item.name} poster`
}}
/>
Expand Down
8 changes: 4 additions & 4 deletions web/src/routes/sitemap.xml/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ export const GET: RequestHandler = async () => {
`<?xml version="1.0" encoding="UTF-8" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://www.cran-e.com/sitemap-common.xml</loc>
<loc>https://cran-e.com/sitemap-common.xml</loc>
</sitemap>
<sitemap>
<loc>https://www.cran-e.com/sitemap-statistic.xml</loc>
<loc>https://cran-e.com/sitemap-statistic.xml</loc>
</sitemap>
${Array.from(
{ length: packagesSize },
(_, i) => `
<sitemap>
<loc>https://www.cran-e.com/sitemap-packages-${i}.xml</loc>
<loc>https://cran-e.com/sitemap-packages-${i}.xml</loc>
</sitemap>`
).join('')}
${Array.from(
{ length: authorsSize },
(_, i) => `
<sitemap>
<loc>https://www.cran-e.com/sitemap-authors-${i}.xml</loc>
<loc>https://cran-e.com/sitemap-authors-${i}.xml</loc>
</sitemap>`
).join('')}
</sitemapindex>`.trim(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
description={`Trending R packages by Github stars for the last ${mapRangeToLabel(selectedRange)}`}
path="/statistic/github/repos-by-stars/{selectedRange}"
image={{
url: `https://www.cran-e.com/api/statistic/github/repos-by-stars/${selectedRange}/poster.jpeg`,
url: `https://cran-e.com/api/statistic/github/repos-by-stars/${selectedRange}/poster.jpeg`,
alt: `Poster for range ${selectedRange}`
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
)}`}
path="/statistic/github/users-by-followers/{selectedRange}"
image={{
url: `https://www.cran-e.com/api/statistic/github/users-by-followers/${selectedRange}/poster.jpeg`,
url: `https://cran-e.com/api/statistic/github/users-by-followers/${selectedRange}/poster.jpeg`,
alt: `Poster for range ${selectedRange}`
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion web/static/robots.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Sitemap: https://cran-e.com/sitemap.xml
Sitemap: https://www.cran-e.com/sitemap.xml
Sitemap: https://cran-e.com/sitemap.xml

User-agent: *
Disallow: /api/*
Expand Down
Loading