Skip to content

Commit

Permalink
links pages fix (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
lospoy authored May 2, 2024
1 parent 48a306c commit 41ecb8e
Show file tree
Hide file tree
Showing 25 changed files with 14 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@ jobs:
uses: actions/checkout@v4
- name: Install, build, and upload your site
uses: withastro/action@v2
env:
ASTRO_CONFIG_SITE: ${{ secrets.ASTRO_CONFIG_SITE }}
ASTRO_CONFIG_BASE: ${{ secrets.ASTRO_CONFIG_BASE }}
with:
path: .
node-version: 20
package-manager: npm@latest

deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
environment:
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion src/data/feed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const render = (markdown: string) => {
return parser.render(markdown)
}

const initializeLink = (site: URL) => (path: string) => {
export const initializeLink = (site: URL) => (path: string) => {
const pathname = nodePath.join(import.meta.env.BASE_URL, path)
return new URL(pathname, site).toString()
}
Expand Down
10 changes: 9 additions & 1 deletion src/pages/links/index.astro
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
import {initializeLink} from '../../data/feed'
const link = initializeLink(Astro.site)
// this comment can be deleted
---

<!doctype html>
<html>
<head>
Expand Down Expand Up @@ -101,7 +109,7 @@
<body>
<div class="content-wrapper">
<header>
<img class="logo" src="/design/export/example-astoria-tech-logo.png" alt="Astoria Tech Logo" />
<img class="logo" src={link('/design/example-astoria-tech-logo.png')} alt="Astoria Tech Logo" />
</header>
<div class="links-container">
<a class="link-wrapper" href="https://www.meetup.com/astoria-tech-meetup/">
Expand Down

0 comments on commit 41ecb8e

Please sign in to comment.