0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-02-03 22:29:08 -05:00

Changed URLs to match the release (#711)

This commit is contained in:
JuanM04 2021-07-16 07:59:46 -03:00 committed by GitHub
parent 36f75b9d53
commit f64ff85b26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View file

@ -1,6 +1,6 @@
export default { export default {
buildOptions: { buildOptions: {
site: 'https://astro-docs-preview.vercel.app/', site: 'https://docs.astro.build/',
}, },
renderers: ['@astrojs/renderer-preact'], renderers: ['@astrojs/renderer-preact'],
}; };

View file

@ -8,7 +8,7 @@
"lint": "run-p --aggregate-output lint:linkcheck", "lint": "run-p --aggregate-output lint:linkcheck",
"lint:linkcheck": "start-test 'yarn start --silent' 3000 'yarn lint:linkcheck:local'", "lint:linkcheck": "start-test 'yarn start --silent' 3000 'yarn lint:linkcheck:local'",
"lint:linkcheck:local": "blc -ro --user-agent 'broken-link-checker/0.7.8' 'http://localhost:3000'", "lint:linkcheck:local": "blc -ro --user-agent 'broken-link-checker/0.7.8' 'http://localhost:3000'",
"lint:linkcheck:remote": "blc -ro --user-agent 'broken-link-checker/0.7.8' 'https://astro-docs-preview.vercel.app/'" "lint:linkcheck:remote": "blc -ro --user-agent 'broken-link-checker/0.7.8' 'https://docs.astro.build/'"
}, },
"devDependencies": { "devDependencies": {
"@snowpack/plugin-dotenv": "^2.1.0", "@snowpack/plugin-dotenv": "^2.1.0",

View file

@ -1,8 +1,8 @@
--- ---
// fetch all commits for just this page's path // fetch all commits for just this page's path
const { path } = Astro.props; const path = "docs/" + Astro.props.path;
const url = `https://api.github.com/repos/snowpackjs/astro-docs/commits?path=${path}`; const url = `https://api.github.com/repos/snowpackjs/astro/commits?path=${path}`;
const commitsURL = `https://github.com/snowpackjs/astro-docs/commits/main/${path}`; const commitsURL = `https://github.com/snowpackjs/astro/commits/main/${path}`;
async function getCommits(url) { async function getCommits(url) {
try { try {

View file

@ -9,7 +9,7 @@ const { content } = Astro.props;
const headers = content?.astro?.headers; const headers = content?.astro?.headers;
const currentPage = Astro.request.url.pathname; const currentPage = Astro.request.url.pathname;
const currentFile = currentPage === '/' ? 'src/pages/index.md' : `src/pages${currentPage.replace(/\/$/, "")}.md`; const currentFile = currentPage === '/' ? 'src/pages/index.md' : `src/pages${currentPage.replace(/\/$/, "")}.md`;
const githubEditUrl = `https://github.com/snowpackjs/astro-docs/blob/main/${currentFile}`; const githubEditUrl = `https://github.com/snowpackjs/astro/blob/main/docs/${currentFile}`;
--- ---
<html lang="{content.lang ?? 'en-us'}"> <html lang="{content.lang ?? 'en-us'}">