Building My Website - Extras (Part 10)
💬 | How I built my personal website - Part 10 - extras and miscellaneous files |
---|---|
📅 | |
⏱️ | 2 min read |
🏷️ | #development #web |
This article is part of a series about building my personal website:
- The idea and choosing the right tool
- SEO essentials: meta tags and base head element
- Content management with Markdown and Frontmatter
- Semantic HTML for accessibility and external readers
- Minimalist CSS: styling and native-like design
- Adding color themes with JavaScript
- Astro plugins: RSS, Sitemap, Word count
- SVG icons and Favicon
- Building resume with XeLaTeX
- Extras
robots.txt
robots.txt is a file in the project root that gives rules to web crawlers.
Here is mine:
User-agent: *
Disallow: /tags/
Sitemap: https://efimish.github.io/sitemap-index.xml
I excluded tag index pages from crawling because I don’t think they provide much value in search engine results.
humans.txt
humans.txt is a fun, optional file where you can credit yourself, the tools you used, or technologies involved.
For now, mine is short and simple:
Made by Efim Ishenin
QR codes
I got interested in how QR codes work and wanted to create one for my website. I wanted it to be perfect: correct error correction and one pixel per visible pixel.
I used a simple JavaScript tool to generate them:
bun x qrcode -q 1 -s 1 -o qr.png "https://efimish.github.io"
bun x qrcode -q 1 -s 1 -o qr.svg "https://efimish.github.io"
I haven’t used them anywhere yet, so I just put them in the public
folder.
tsconfig.json
I added import aliases to avoid typing long relative paths:
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@assets/*": ["src/assets/*"],
"@components/*": ["src/components/*"],
"@layouts/*": ["src/layouts/*"],
"@scripts/*": ["src/scripts/*"],
"@styles/*": ["src/styles/*"]
}
}
}
GitHub Actions for deployment
To automatically deploy my website to GitHub Pages on every push to the main branch, I created this GitHub Actions workflow:
name: Deploy to GitHub Pages
on:
push:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4
- name: Install, build, and upload your site
uses: withastro/action@v3
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
This workflow installs dependencies, builds the site, and publishes it to GitHub Pages automatically.
Inspiration and References
While building my website, I drew inspiration from several blogs:
Missed something?
If you have any questions left, feel free to check out the source code of my website on GitHub