Skip to content

Commit

Permalink
feat: move blog from codeberg.org
Browse files Browse the repository at this point in the history
- due to recent platform stability issues, time to move this one out of
  there ...
  - withnessed in addition problems with the CI/CD server which never
    used to automatically run my pipeline ...

Resolves:
Related:
Signed-off-by: Daniel Andrei Mincă <[email protected]>
  • Loading branch information
dminca committed Apr 21, 2024
1 parent 0a6e031 commit bf4c008
Show file tree
Hide file tree
Showing 69 changed files with 2,085 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.pdf filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text

47 changes: 47 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# ---> VisualStudioCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

# ---> macOS
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Generated data by `hugo`
resources/**
public/**

9 changes: 9 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) <year> <copyright holders>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
79 changes: 79 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Personal blog [![status-badge](https://ci.codeberg.org/api/badges/dminca/pages/status.svg?branch=hugo)](https://ci.codeberg.org/dminca/pages)

## Initial setup
On a first clone, you'd wanna do it this way

```sh
git clone -b hugo https://codeberg.org/dminca/pages.git
```

Then we have to pull the theme which is installed with `hugo`

```sh
hugo mod get -u
```

## Local development
Before pushing on the `hugo` branch which is our 'production' (so-to-speak),
you'd wanna test out your changes quickly locally.

After adding content or modifying anything in the blog, compile it

```sh
hugo --gc --buildDrafts --minify
```

This makes sure that the blog can be rendered and it's also compacting the CSS
and JavaScript in order to have a smaller footprint on the web.

Run the server locally and see how it looks

```sh
hugo serve --buildDrafts -p 8080
```

Now head-off to http://localhost:8080 and check if all okay

### Assets (media and all that)
They're tracked with [`git-lfs`][1] which I've installed via

```sh
brew install git-lfs
```

And then initialised it

```sh
git lfs install
```

#### Tracking files

```sh
git lfs track "*.png"
```

Commit the [`.gitattributes`](.gitattributes) file and done.

#### How does the CI handle that?
That flag's [enabled by default][2] in Woodpecker CI

# Troubleshooting

## template for shortcode not found

```sh
> ~/P/c/d/pages on hugo ◦ hugo -D --gc --minify && hugo serve --gc -D -p 8080
Start building sites …
hugo v0.101.0+extended darwin/arm64 BuildDate=unknown
Error: Error building site: "/Users/dminca/Projects/codeberg.org/dminca/pages/content/posts/awesome-foss-tooling.md:24:1": failed to extract shortcode: template for shortcode "button" not found
Total in 47 ms
```
Can be resolved by clearing the hugo module cache
```sh
hugo mod clean
```


[1]: https://git-lfs.github.com
[2]: https://woodpecker-ci.org/plugins/plugin-git
Empty file added archetypes/.gitkeep
Empty file.
1 change: 1 addition & 0 deletions assets/icons/android.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/chrome.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/codeberg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/edge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/fedora.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/firefox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/flatpak.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/linux.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/matrix.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/opera.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/pixelfed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/safari.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/threema.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit bf4c008

Please sign in to comment.