Skip to content

Commit

Permalink
🔧 tweaking cleanup workflow files
Browse files Browse the repository at this point in the history
  • Loading branch information
chrede88 committed Oct 31, 2024
1 parent 3281788 commit 6f7e0f7
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 303 deletions.
103 changes: 7 additions & 96 deletions .github/template-cleanup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,110 +4,21 @@ Please follow the instructions below to finish the setup of your new L1nkr site.

## Installation

0) Add a LICENSE to your repo.
1) Clone your version of the template to your local computer:
1) Add a LICENSE to your repo.
2) Clone your version of the template to your local computer:
```shell
git clone https://github.com/%USER%/%NAME%
```
2) Modify `config/_default/hugo.yaml` and `config/_default/params.yaml` according to the Configuration below.
3) In a terminal/commandline, move to the newly created folder using `cd`.
4) Build a local version of your site by executing `hugo server`. You can see the site by navigating to `http://localhost:1313/%NAME%/` (actual URL will be outputted in the CLI) in a browser.
5) Add a new image to the `assets/` folder, using the same name as you specified in `params.yaml`.
6) Add a new `icon.png` file to update the favicon. The png file should be 512px by 512px in size.
2) Modify `config/_default/hugo.yaml` and `config/_default/params.yaml` according to the configuration below.
3) Build a local version of your site by executing `hugo server`. You can see the site by navigating to `http://localhost:1313/%NAME%/` (actual URL will be outputted in the CLI) in a browser.
4) Add a new image to the `assets/` folder, using the same name as you specified in `params.yaml`.
5) Add a new `icon.png` file to update the favicon. The png file should be 512px by 512px in size.

---

## Configuration

All configuration is done in the two configuration files under `config/_default/`. The URL and site title can be set in `hugo.yaml`, all other parameters are set in `params.yaml`.

`hugo.yaml`:
```yaml
baseURL: 'https://%USER%.github.io/%NAME%'
title: 'L1nkr'
```
`params.yaml`:
```yaml
############################
## Author
############################
author:
name: %USER%
image: author.png
greeting: "Your new L1nkr site :tada:"
icon: ":wave:" # outcomment (or remove) if you don't want to display the emoji
############################
## Links
############################
links:
- github: https://github.com/%USER%/%NAME%
- link: https://github.com/%USER%/%NAME%#readme
############################
## Colunms of Links
############################
# between 2 & 6 columns are supported (both incl)
columns: 2
###########################
## Icon text
###########################
# add the icon name to each icon
icontext: true
############################
## Tooltips
############################
# add tooltips on all icons
tooltip: true
###############################
## OpenGraph & Twitter Cards
###############################
title: %NAME%
description: "Demo site build with L1nkr & Hugo"
images:
- thumbnail.png
```

Links are defined by the name (i.e. "github" or "facebook"). The names must match one of the supported links, see list below.

### Supported Link Icons
| **Supported Links** | **Supported Links** | **Supported Links** | **Supported Links** |
| --- | --- | --- | --- |
| amazon | apple | bandcamp | bitbucket |
| bluesky | check-mark | codepen | dev |
| discord | dribbble | email | etsy |
| facebook | flickr | foursquare | github |
| gitlab | google | instagram | keybase |
| kickstarter | link | linkedin | mastodon |
| medium | orcid | patreon | paypal | pinterest |
| reddit | signal | skype | slack |
| snapchat | soundcloud | spotify | stack-exchange |
| stack-overflow | strava | telegram | tiktok |
| tumblr | twitch | untappd | website |
| whatsapp | windows | x-twitter | youtube |


### Custom Link Icons
Users can provide their own icons by placing a `.svg` image in `./assets/icons/` in their own repo. Creating folders when necessary. The image should be as square as possible for the best result. Don't use spaces in the filename!
The background color will be the tailwind color `bg-indigo-500` (#6366f1) unless another color is specified. This can be done by placing the following css snippet in `./assets/css/custom.css`:

```css
.link-nameOfIcon {
background-color: #6366f1; /* Hex color code */
}
```
Where `nameOfIcon` is be the name of the custom `.svg` file.
See the [wiki](https://github.com/chrede88/L1nkr/wiki) for all info about configuration.

---

Expand Down
10 changes: 4 additions & 6 deletions .github/template-cleanup/config/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## CHANGE THESE
############################

baseURL: 'https://%USER%.github.io/%NAME%'
baseURL: "https://%USER%.github.io/%NAME%"
title: %NAME%

############################
Expand All @@ -13,13 +13,11 @@ module:
imports:
- path: github.com/chrede88/L1nkr


############################
## MISC
############################

enableEmoji: true
disableKinds: ['taxonomy', 'term']
languageCode: 'en-us'


disableKinds: ["taxonomy", "term"]
languageCode: "en-us"
enableRobotsTXT: true
80 changes: 40 additions & 40 deletions .github/template-cleanup/config/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,46 +15,46 @@ author:
links:
- github: https://github.com/%USER%/%NAME%
- link: https://github.com/%USER%/%NAME%#readme
# - website:
# - x-twitter:
# - mastodon:
# - linkedin:
# - instagram:
# - reddit:
# - telegram:
# - whatsapp:
# - signal:
# - codepen:
# - dev:
# - email:
# - discord:
# - orcid:
# - slack:
# - stack-overflow:
# - twitch:
# - patreon:
# - soundcloud:
# - dribbble:
# - stack-exchange:
# - tiktok:
# - youtube:
# - keybase:
# - flickr:
# - tumblr:
# - kickstarter:
# - website:
# - x-twitter:
# - mastodon:
# - linkedin:
# - instagram:
# - reddit:
# - telegram:
# - whatsapp:
# - signal:
# - codepen:
# - dev:
# - email:
# - discord:
# - orcid:
# - slack:
# - stack-overflow:
# - twitch:
# - patreon:
# - soundcloud:
# - dribbble:
# - stack-exchange:
# - tiktok:
# - youtube:
# - keybase:
# - flickr:
# - tumblr:
# - kickstarter:
# - snapchat:
# - bluesky:
# - bitbucket:
# - bandcamp:
# - etsy:
# - spotify:
# - pinterest:
# - strava:
# - untappd:
# - skype:
# - medium:
# - foursquare:
# - apple:
# - bluesky:
# - bitbucket:
# - bandcamp:
# - etsy:
# - spotify:
# - pinterest:
# - strava:
# - untappd:
# - skype:
# - medium:
# - foursquare:
# - apple:
# - amazon:
# - google:
# - paypal:
Expand All @@ -79,7 +79,7 @@ icontext: true
############################

# add tooltips on all icons
tooltip: true
tooltip: false

###############################
## OpenGraph & Twitter Cards
Expand Down
121 changes: 7 additions & 114 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@ If you're looking for the actual theme repository, follow this [link](https://gi

## Installation

1) Use this template by pressing `Use this template`. Don't fork this repository!
1) Use this template by pressing `Use this template`. **Don't fork this repository!**
2) Wait 20s-30s and update the page. The files in your repo are getting populated.
3) Add a LICENSE to your repo.
4) Clone your version of the template to your local computer:
```shell
git clone https://github.com/<username>/<reponame>
```
5) Change the module name to match your github repo in `go.mod`.
6) Modify `config/_default/hugo.yaml` and `config/_default/params.yaml` according to the Configuration below.
7) In a terminal/commandline, move to the newly created folder using `cd`.
8) Build a local version of your site by executing `hugo server`. You can see the site by navigating to `http://localhost:1313/<YourRepoName>` (actual URL will be outputted in the CLI) in a browser.
9) Add a new image to the `assets/` folder, using the same name as you specified in `params.yaml`.
10) Add a new `icon.png` file to update the favicon. The png file should be 512px by 512px in size.
6) Modify `config/_default/hugo.yaml` and `config/_default/params.yaml` according to the configuration below.
7) All images are stored in the `assets/` folder. You can group in subfolders if you like.
8) Build a local version of your site by executing `hugo server`. You can see the site by navigating to `localhost:1313` (actual URL will be outputted in the CLI) in a browser.
9) Add a new `icon.png` file to update the favicon. The png file should be 512px by 512px in size.

---

Expand All @@ -33,95 +32,7 @@ git clone https://github.com/<username>/<reponame>

## Configuration

All configuration is done in the two configuration files under `config/_default/`. The URL and site title can be set in `hugo.yaml`, all other parameters are set in `params.yaml`.

`hugo.yaml`:
```yaml
baseURL: 'https://username.github.io/L1nkr'
title: 'L1nkr'
```
`params.yaml`:
```yaml
############################
## Author
############################
author:
name: "L1nkr"
image: author.jpeg
greeting: "A simple LinkTree theme for Hugo :evergreen_tree:"
icon: ":wave:" # outcomment (or remove) if you don't want to display the emoji
############################
## Links
############################
links:
- github: https://github.com/username/
- facebook: https://facebook.com/
############################
## Colunms of Links
############################
# between 2 & 6 columns are supported (both incl)
columns: 3
###########################
## Icon text
###########################
# add the icon name to each icon
icontext: true
############################
## Tooltips
############################
# add tooltips on all icons
tooltip: true
###############################
## OpenGraph & Twitter Cards
###############################
title: "L1nkr"
description: "Demo site build with L1nkr & Hugo"
images:
- thumbnail.jpeg
```

Links are defined by the name (i.e. "github" or "facebook"). The names must match one of the supported links, see list below.

### Supported Link Icons
| **Supported Links** | **Supported Links** | **Supported Links** | **Supported Links** |
| --- | --- | --- | --- |
| amazon | apple | bandcamp | bitbucket |
| bluesky | check-mark | codepen | dev |
| discord | dribbble | email | etsy |
| facebook | flickr | foursquare | github |
| gitlab | google | instagram | keybase |
| kickstarter | link | linkedin | mastodon |
| medium | orcid | patreon | paypal | pinterest |
| reddit | signal | skype | slack |
| snapchat | soundcloud | spotify | stack-exchange |
| stack-overflow | strava | telegram | tiktok |
| tumblr | twitch | untappd | website |
| whatsapp | windows | x-twitter | youtube |


### Custom Link Icons
Users can provide their own icons by placing a `.svg` image in `./assets/icons/` in their own repo. Creating folders when necessary. The image should be as square as possible for the best result. Don't use spaces in the filename!
The background color will be the tailwind color `bg-indigo-500` (#6366f1) unless another color is specified. This can be done by placing the following css snippet in `./assets/css/custom.css`:

```css
.link-nameOfIcon {
background-color: #6366f1; /* Hex color code */
}
```
Where `nameOfIcon` is be the name of the custom `.svg` file.
See the [wiki](https://github.com/chrede88/L1nkr/wiki) for all info about configuration and how to easily deploy to Github Pages.

---

Expand All @@ -134,22 +45,4 @@ The best practice is to update to released and tested versions. To update to a s
```shell
hugo mod get github.com/chrede88/[email protected]
```
Replace X,Y & Z with the corresponding version numbers. You can find the releases [here](https://github.com/chrede88/L1nkr/releases). Please check if any breaking changes are listed under the release you want to update to, before proceeding.

---

## Deploy on Github Pages
You can very easily deploy your site using Github Pages. Included in this template is a Github Action workflow that will build and deploy your site to Github Pages automatically:+1:

You can find the workflow here `.github/deploymentWorkflow/buildDeploy.yml`. To use this, move it to `.github/workflows/`.

The workflow is already set up and ready to go, but go through it and spend some time to understand what's going on. Otherwise, it'll always be this black box of magic that you can't fix when it breaks!

Last step: Go to Settings -> Pages -> Build and deployment -> Set the Source to "Github Actions".

Next time you publish a release this workflow will build and deploy your site :tada:

Your site will be published to the following URL:
`https://<username>.github.io/<repo>`, where `<username>` and `<repo>` is your Github username and the name of your repository.


Replace X,Y & Z with the corresponding version numbers. You can find the releases [here](https://github.com/chrede88/L1nkr/releases). Please check if any breaking changes are listed under the release you want to update to, before proceeding.
Loading

0 comments on commit 6f7e0f7

Please sign in to comment.