Skip to content

Commit

Permalink
Adapt gh-page for my repo
Browse files Browse the repository at this point in the history
  • Loading branch information
mtouzot committed Jul 6, 2024
1 parent b1293f1 commit 24e3a8c
Show file tree
Hide file tree
Showing 21 changed files with 55 additions and 100 deletions.
1 change: 1 addition & 0 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
paths: ["docs/**"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Advent of Code
# Advents of Code

<p align="center">
<img src="./docs/assets/big-advent-code-2015.png">
</p>

[Advent of Code](https://adventofcode.com/) is a web challenge based upon a advent calendar but for developers.

Every day a challenge to solve.
Every day a challenge to solve. No programming language imposed.

My solutions can be found [here](https://mtouzot.github.io/advents-of-code/)

## Credits & Copyright

Pick up your computer and your favourite coding language and go on!
Advent of Code is only **free to use**, the [About page](https://adventofcode.com/about) answers the [copy/redistribute](https://adventofcode.com/about#faq_copying) part.

You can find the daily challenge here:
Favicons can be found on <a href="https://www.flaticon.com/fr/icones-gratuites/biscuit-de-noel" title="biscuit-de-noel icônes">Freepik - Flaticon</a>

- [2015](https://adventofcode.com/2015)
- [2016](https://adventofcode.com/2016)
- [2017](https://adventofcode.com/2017)
- [2018](https://adventofcode.com/2018)
- [2019](https://adventofcode.com/2019)
- [2020](https://adventofcode.com/2020)
- [2021](https://adventofcode.com/2021)
- [2022](https://adventofcode.com/2022)
- [2023](https://adventofcode.com/2023)
The documation page hosted on Github Page is a [personnal fork](https://github.com/mtouzot/jekyll-latex.git) of Ryan McDermott's [jekyll-latex theme](https://github.com/ryanmcdermott/jekyll-latex)
22 changes: 0 additions & 22 deletions docs/LICENSE.md

This file was deleted.

42 changes: 0 additions & 42 deletions docs/README.md

This file was deleted.

5 changes: 3 additions & 2 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ google_analytics: UA-123
author_name: "Martin TOUZOT" # Your name here
author_email: [email protected] # Your email here
author_gravatar: b1fb30e34362f9801f2317acde0f3838 # Your Gravatar md5 hash here for logo
author_github: mtouzot

# Site Settings
url: https://mtouzot.github.io # Change to your site
baseurl: /advents-of-code
permalink: /posts/:title # Post permalink
permalink: /:year/:day/:title # Post permalink
timezone: America/Los_Angeles # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
mathjax: true # enables support for mathjax - set to false to disable

Expand All @@ -32,7 +33,7 @@ plugins:
- jekyll-sitemap
- jekyll-paginate

paginate: 10
paginate: 25
paginate_path: "/blog/page:num/"

defaults:
Expand Down
9 changes: 8 additions & 1 deletion docs/_includes/footer.liquid
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<div class="footer">
<a href="https://github.com/{{ site.author_github }}{{ site.baseurl }}" style="text-decoration:none" target="_blank">
<img class="logo" src="{{ site.baseurl }}/assets/github-mark-white.png?s=80">
</a>
</br>
<span class="block">&copy;
{% assign this_year = site.time | date: '%Y' %}
{% if site.start_year == this_year or site.start_year == "" or site.start_year == nil %}
Expand All @@ -7,5 +11,8 @@
{{site.start_year}} - {{ this_year }}
{{site.start_year.blank}}
{% endif %}
{{ site.author_name }}</span>
<a href="{{ site.url }}" target="_blank">
{{ site.author_name }}
</a>
</span>
</div>
6 changes: 3 additions & 3 deletions docs/_includes/header.liquid
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<aside class="logo">
{% if page.url == '/index.liquid' or page.url == '/' %}
{% assign link = '/about' %}
{% assign prompt = 'About the Author' %}
{% assign prompt = 'About the challenge' %}
{% else %}
{% assign link = '/' %}
{% assign prompt = 'Back to Home' %}
{% assign prompt = 'Back to solutions' %}
{% endif %}

<a href="{{ link | prepend: site.baseurl | prepend: site.url }}">
<img class="gravatar" src="https://www.gravatar.com/avatar/{{ site.author_gravatar }}.png?s=80">
<img class="gravatar" src="{{ site.baseurl }}/assets/home.png?s=80">
</a>
<span class="logo-prompt">{{ prompt }}</span>

Expand Down
6 changes: 4 additions & 2 deletions docs/_includes/image.liquid
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<figure class="image">
<img src="{{ include.url }}" alt="{{ include.description }}">
<figcaption>{{ include.description }}</figcaption>
<center>
<img src="{{ include.url }}" alt="{{ include.description }}">
<figcaption>{{ include.description }}</figcaption>
</center>
</figure>
4 changes: 4 additions & 0 deletions docs/_includes/index.liquid
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<main class="main-container">
Advent of code is a set of computer science challenges to solve during Christmas time. Each day of December, a new two-part puzzle appears to help Santa Claus doing his work.
</br>
Here are my solutions.

<section class="post-list">
{% for post in paginator.posts %}
{% unless post.next %}
Expand Down
4 changes: 2 additions & 2 deletions docs/_layouts/page.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ layout: default
<div class="page-navigation">
<a
class="home"
href="{{ site.baseurl | prepend: site.url }}"
title="Back to Homepage">Home</a>
href="{{ site.baseurl | prepend: site.url }}/"
title="Back to solutions">Solutions</a>
</div>
</main>
6 changes: 2 additions & 4 deletions docs/_layouts/post.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ layout: default
<div class="center">
<h1>{{ page.title }}</h1>
<p class="author">
{{ page.author }}
<br/>
{{ page.date | date: '%B %-d, %Y' }}
</p>

Expand All @@ -32,8 +30,8 @@ layout: default
{% endif %}
<a
class="home"
href="{{ site.baseurl | prepend: site.url }}"
title="Back to Homepage">Home</a>
href="{{ site.baseurl | prepend: site.url }}/"
title="Back to solutions">Solutions</a>
{% if page.previous.url %}
<span>
&middot;
Expand Down
7 changes: 0 additions & 7 deletions docs/_posts/2019-06-20-second-page.md

This file was deleted.

13 changes: 12 additions & 1 deletion docs/_sass/overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ h6 {
}

.gravatar {
margin: 5px auto;
margin: 0px auto;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
Expand Down Expand Up @@ -180,6 +180,17 @@ h6 {
max-width: 500px;
margin: 0 auto;
font-size: 1rem;

.logo {
border-radius: 5%;
height: 56px;
width: 56px;
align-items: center;
display: inline-block;
vertical-align: middle;
text-decoration: none;
margin-right: rem(10px);
}
}

.page-navigation {
Expand Down
4 changes: 3 additions & 1 deletion docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ layout: page
title: About
---

This is your About page. Celebrate yourself and show the world who you are!
Advent of code is a set of computer science challenges to solve during Christmas time. Each day of December, a new two-part puzzle appears to help Santa Claus doing his work.

More about Advent of Code can be found <a href="https://adventofcode.com/" target="_blank">there</a>!!!
Binary file added docs/assets/big-advent-code-2015.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/github-mark-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/jekyll_latex_cover_art.png
Binary file not shown.
Binary file removed docs/assets/latex_image_example.jpeg
Binary file not shown.
Binary file modified docs/assets/touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 24e3a8c

Please sign in to comment.