Welcome to the repository for my personal academic website. This template is designed to help you create a professional and customizable academic website with ease.
- Responsive Design: Works on all devices, from mobile phones to desktops.
- Easy Customization: Modify the content and style to suit your needs.
- Markdown Support: Write your content in Markdown.
- Static Site Generation: Built using Quarto, ensuring fast load times and a simple deployment process.
- SEO Friendly: Optimized for search engines to improve discoverability.
- Social Media Integration: Easily link your social media profiles.
- Blog Support: Includes a blog section for sharing your thoughts and research.
To get started with this template, follow these steps:
-
Fork this repository
Click the "Fork" button at the top right corner of this page to create a copy of this repository under your GitHub account.
-
Clone the repository
git clone https://github.com/<your-username>/rispace.github.io.git cd <your-username>.github.io
-
Create a new branch
git checkout -b gh-pages
Then from the settings of your repository, set the GitHub Pages source to the
gh-pagesbranch. -
Install Quarto
Follow the instructions here to install Quarto on your machine.
-
Update Configuration
Edit the
_quarto.ymlfile to update your site’s title, description, and other configurations. -
Add Your Content
- Homepage: Edit the
index.qmdfile with your personal information. - Blog Posts: Add new blog posts in the
blogdirectory. Use the.qmdformat for your posts. - Assets: Place your images and other assets in the
assetsdirectory.
- Homepage: Edit the
-
Customize Styles
If you want to customize the look and feel of your site, modify the CSS files in the
stylesdirectory.
-
Build the site locally
To preview your site locally, run the following command:
quarto preview
This will generate the static files in the
docsdirectory. -
Render the site using GitHub Actions
This template uses GitHub Actions for rendering. The rendering process is set up in the
.github/workflows/publish.ymlfile. You can modify this file to change the rendering settings if needed. For my case, it has both renv and python environments, so it will render both R and Python code chunks. But if you only use R or Python, you can remove the unnecessary parts. These environments are only required if you use R or Python code chunks in your website. If you only use markdown, you can remove therenvandpythonparts.on:
workflow_dispatch: push: branches: main
name: Quarto Publish
jobs: build-deploy: runs-on: ubuntu-latest permissions: contents: write steps: - name: Check out repository uses: actions/checkout@v4
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Install TinyTeX
run: |
quarto install tinytex
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Python and Dependencies
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- run: pip install jupyter
- run: pip install -r requirements.txt
- name: Configure Kaggle API
env:
KAGGLE_USERNAME: ${{ secrets.KAGGLE_USERNAME }}
KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }}
run: |
mkdir -p ~/.kaggle
echo "{\"username\":\"$KAGGLE_USERNAME\",\"key\":\"$KAGGLE_KEY\"}" > ~/.kaggle/kaggle.json
chmod 600 ~/.kaggle/kaggle.json
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3. **Deploy to GitHub Pages**
Push your changes to the `main` branch:
```bash
git add .
git commit -m "Initial commit"
git push origin main
Your site will be automatically rendered and published to GitHub Pages. Ensure that the repository name is <your-username>.github.io to take advantage of GitHub Pages hosting.
If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.