Skip to content

Commit

Permalink
Merge pull request #32 from munichmakerlab/astro
Browse files Browse the repository at this point in the history
Move to Astro
  • Loading branch information
Simmarith authored Feb 3, 2025
2 parents 3d027f0 + 84c6537 commit 1e82f80
Show file tree
Hide file tree
Showing 266 changed files with 10,411 additions and 34,158 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
node_modules
dist
2 changes: 0 additions & 2 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
Expand Down
30 changes: 24 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
_site
.sass-cache
.jekyll-cache
.jekyll-metadata
vendor
id_rsa*
# build output
dist/

# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

# jetbrains setting folder
.idea/
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

2 changes: 0 additions & 2 deletions .htaccess

This file was deleted.

4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
25 changes: 0 additions & 25 deletions 404.html

This file was deleted.

20 changes: 11 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM jekyll/jekyll AS build
COPY --chown=jekyll:jekyll . /srv/jekyll/
RUN jekyll build
FROM node:lts AS runtime
WORKDIR /app

FROM php:8.3-apache
COPY docker/mumalab-website.conf /etc/apache2/conf-available/mumalab-website.conf
COPY --from=build /srv/jekyll/_site /var/www/html
RUN a2enconf mumalab-website && \
a2enmod proxy proxy_http ssl && a2enmod rewrite && \
pecl install apcu && docker-php-ext-enable apcu
COPY . .

RUN npm install
RUN npm run build

ENV HOST=0.0.0.0
ENV PORT=80
EXPOSE 80
CMD node ./dist/server/entry.mjs
33 changes: 0 additions & 33 deletions Gemfile

This file was deleted.

File renamed without changes.
21 changes: 0 additions & 21 deletions Makefile

This file was deleted.

59 changes: 39 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,39 @@
# New MuMaLab Website

Based on [Clean Blog](https://startbootstrap.com/theme/clean-blog) by [Start Bootstrap](http://startbootstrap.com/), which was released under [Apache 2.0](https://github.com/IronSummitMedia/startbootstrap-clean-blog/blob/gh-pages/LICENSE) license.

## Additional libraries
* [tumblr-rss.js](https://github.com/calvinbushor/Tumblr-RSS-Client-Side-JS-Plugin)
** heavily modified to work with our template
* [ResponsiveSlides.js](https://github.com/viljamis/ResponsiveSlides.js)
* [jquery.ics](http://bitfish.eu/projects/jquery-ics/)
** fixed for multiline values in .ics files
* [FullCalendar](http://fullcalendar.io/)

## Webserver
Even though this is a static page, we have some weird-ish quirks in here that could be fixed eventually
* We proxy the tumblr json via a PHP script (``/static/blog.php``), which gets redirected via mod_redirect from ``/api/read/json`` (via ``.htaccess``)
* This is used by the frontpage blog, and iirc did this to ensure all content is loaded via HTTPS, which it otherwise would not.
* We proxy our calendar, which comes in via google, via mod_proxy
* Not sure if this is actually still being used.

All this requires this to be served via an Apache webserver at the moment, with PHP and the proxy, proxy_http, ssl and redirect modules enabled. The blog.php script uses the PHP extension APCu.
MunichMakerLab Website

this website has been built with astro and tries to minimize the gotchas and special purpose additions for maintainabilities sake.

## πŸš€ Project Structure

Inside of this project, you'll see the following folders and files:

```text
/
β”œβ”€β”€ public/
β”‚ └── favicon.svg
β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ layouts/
β”‚ β”‚ └── Layout.astro
β”‚ └── pages/
β”‚ └── index.astro
└── package.json
```

To learn more about the folder structure of an Astro project, refer to [our guide on project structure](https://docs.astro.build/en/basics/project-structure/).
Tl;dr: The actual pages of the website are in [src/pages](/src/pages/) and are mostly markdown. Adding another page should be as easy as just creating another file, copy-pasting the head section and customizing it and the page itself.

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |

## πŸ‘€ Want to learn more?

Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
55 changes: 0 additions & 55 deletions _config.yml

This file was deleted.

Loading

0 comments on commit 1e82f80

Please sign in to comment.