Skip to content

Commit

Permalink
major stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed Jan 1, 2024
1 parent b7208b2 commit 352d50a
Show file tree
Hide file tree
Showing 30 changed files with 659 additions and 571 deletions.
5 changes: 5 additions & 0 deletions .github/runners/generate/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,8 @@

# Generate the RSS feed as a string
fg.rss_file("public/rss.xml")

with open("public/isabelroses/README.md", "r", encoding="utf-8") as f:
me_json_text = "{ content: " + json.dumps(f.read(), ensure_ascii=False) + " }"

Path("src/gen/me.json").write_text(me_json_text, "utf-8")
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.DS_Store
node_modules
/dist

.direnv

# local env files
.env.local
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ yarn dev

### Thanks to

- [Tnixc](https://github.com/Tnixc/website-v2) for helping me learn vue, unknowingly.
- [Tnixc](https://github.com/Tnixc/website-v2) for helping me learn vue,
unknowingly.

### License

- All code is licensed under: [GPLv3](https://www.gnu.org/licenses/gpl-3.0#license-text)
- All blog posts are licensed under: [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)
- All code is licensed under:
[GPLv3](https://www.gnu.org/licenses/gpl-3.0#license-text)
- All blog posts are licensed under:
[CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)
60 changes: 60 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
description = "isabelroses.com flake";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = {
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {inherit system;};
in {
devShells.default = pkgs.mkShellNoCC {
name = "isabelroses.com";
packages = with pkgs; let
mkNpxAlias = name: writeShellScriptBin name "npx ${name} \"$@\"";
in [
(nodePackages.yarn.override {inherit nodejs_20;})
nodejs_20
eslint_d
prettierd
(mkNpxAlias "tsc")
(mkNpxAlias "tsserver")

# for python gen script
python3
# python3.withPackages
# (
# with python311Packages; [
# pathlib
# pyyaml
# feedgen
# pytz
# ]
# )
];
};
}
);
}
64 changes: 32 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{
"name": "isabelroses.com",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "vite",
"preview": "vite preview",
"build": "vue-tsc --noEmit && vite build"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^6.5.1",
"highlight.js": "^11.9.0",
"marked": "^11.1.0",
"marked-highlight": "^2.1.0",
"vue": "^3.3.13",
"vue-router": "^4.1.6"
},
"devDependencies": {
"@types/jquery": "^3.5.16",
"@types/jqueryui": "^1.12.16",
"@types/marked": "^6.0.0",
"@types/node": "^20",
"@vitejs/plugin-vue": "^5.0.0",
"eslint": "^8.56.0",
"sass": "^1.58.3",
"tslib": "^2.5.0",
"typescript": "^5",
"vite": "^5.0.10",
"vue-class-component": "^8.0.0-rc.1",
"vue-property-decorator": "^10.0.0-rc.3",
"vue-tsc": "^1.8.26"
}
}
"name": "isabelroses.com",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "vite",
"preview": "vite preview",
"build": "vue-tsc --noEmit && vite build"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^6.5.1",
"highlight.js": "^11.9.0",
"marked": "^11.1.0",
"marked-highlight": "^2.1.0",
"vue": "^3.3.13",
"vue-router": "^4.1.6"
},
"devDependencies": {
"@types/jquery": "^3.5.16",
"@types/jqueryui": "^1.12.16",
"@types/marked": "^6.0.0",
"@types/node": "^20",
"@vitejs/plugin-vue": "^5.0.0",
"eslint": "^8.56.0",
"sass": "^1.58.3",
"tslib": "^2.5.0",
"typescript": "^5",
"vite": "^5.0.10",
"vue-class-component": "^8.0.0-rc.1",
"vue-property-decorator": "^10.0.0-rc.3",
"vue-tsc": "^1.8.26"
}
}
23 changes: 17 additions & 6 deletions public/posts/my-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ tags:
- vim
- nixos
---
In order to keep myself on track I wanted to document my workflow. So in order to do that this post will be kept up to date every 3 months or so with additional input and changes to how I work.
Currently, I use NixOS and have my neovim config managed through nix, a big thanks to [@nekowinson](https://github.com/nekowinston) for all their help.

In order to keep myself on track I wanted to document my workflow. So in order
to do that this post will be kept up to date every 3 months or so with
additional input and changes to how I work. Currently, I use NixOS and have my
neovim config managed through nix, a big thanks to
[@nekowinson](https://github.com/nekowinston) for all their help.

To start right away with things that I wish to get better at:

Expand All @@ -18,8 +22,15 @@ To start right away with things that I wish to get better at:
- rust
- nix

This list were created in order to improve my basic workflow to improve the generic speed that I work at. To start I barely use vim motions despite using neovim as my main editor, and touch typing goes along well with this.
And despite using NixOS I feel like I barely know anything about nix.
This list were created in order to improve my basic workflow to improve the
generic speed that I work at. To start I barely use vim motions despite using
neovim as my main editor, and touch typing goes along well with this. And
despite using NixOS I feel like I barely know anything about nix.

In order to also properly manage myself I have two main tools [bellado](https://github.com/isabelroses/bellado) and [vikunja](https://vikunja.io) having these two separate is really inconvenient but in order to use my to-do list well it needs to be accessible via the command line and through the web so whether I'm out and about or on my main work machine every will work well.
One way I plan to improve this issue is to allow bellado to interact with my vikunja instance.
In order to also properly manage myself I have two main tools
[bellado](https://github.com/isabelroses/bellado) and
[vikunja](https://vikunja.io) having these two separate is really inconvenient
but in order to use my to-do list well it needs to be accessible via the command
line and through the web so whether I'm out and about or on my main work machine
every will work well. One way I plan to improve this issue is to allow bellado
to interact with my vikunja instance.
7 changes: 5 additions & 2 deletions public/posts/nixos-and-postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ tags:
- postgresql
---

When upgrading to version 15 from 14, there was an issue. None of my data was transferred. To fix this issue I swapped to the `posgres` user who is a superuser on the PostgreSQL databases.
When upgrading to version 15 from 14, there was an issue. None of my data was
transferred. To fix this issue I swapped to the `posgres` user who is a
superuser on the PostgreSQL databases.

Then to preform the migration I ran:

Expand All @@ -16,7 +18,8 @@ Then to preform the migration I ran:
pg_dumpall > sqldump
```

then when I had the sqldump file, the following command was run from the command line to get use the sqldump file to recover the previous data
then when I had the sqldump file, the following command was run from the command
line to get use the sqldump file to recover the previous data

```bash
psql -f sqldump
Expand Down
34 changes: 28 additions & 6 deletions public/posts/self-healing-urls.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,30 @@ tags:
- webdev
---

I have been working on the creation of this [version](https://github.com/isabelroses/website/commit/8c53b9f3576d98a2ebe71976a3f921a30e6ad052) of my website for a while and when I finally thought I was done, I was introduced to the concept of self-healing URLs.
I have been working on the creation of this
[version](https://github.com/isabelroses/website/commit/8c53b9f3576d98a2ebe71976a3f921a30e6ad052)
of my website for a while and when I finally thought I was done, I was
introduced to the concept of self-healing URLs.

Self-healing URLs are designed in a way that if a user was to type in a URL as long as a certain part of the URL is correct, the user will be redirected to the correct page. This is useful for when a user is trying to access a page that has been moved or deleted.
Self-healing URLs are designed in a way that if a user was to type in a URL as
long as a certain part of the URL is correct, the user will be redirected to the
correct page. This is useful for when a user is trying to access a page that has
been moved or deleted.

For example, if a user was to type in [<domain>/blog/gaoengioa-2](https://isabelroses.com/blog/gaoengioa-2) they would be redirected to [<domain>/blog/self-healing-urls-2](https://isabelroses.com/blog/self-healing-urls-2) as the only important part of the URL is the "2" in this case, which refers to the second blog post by ID.
For example, if a user was to type in
[<domain>/blog/gaoengioa-2](https://isabelroses.com/blog/gaoengioa-2) they would
be redirected to
[<domain>/blog/self-healing-urls-2](https://isabelroses.com/blog/self-healing-urls-2)
as the only important part of the URL is the "2" in this case, which refers to
the second blog post by ID.

To implement this I had to make a few changes to my code. The original way that the post data was being fetched was by using the slug of the post. This meant that if the slug was incorrect, the post would not be found and the user would be redirected to a 404 page. To fix this I had to change the way that the post was being fetched to use the ID of the post instead. This meant that if the slug was incorrect, the post would still be found and the user would be redirected to the correct page.
To implement this I had to make a few changes to my code. The original way that
the post data was being fetched was by using the slug of the post. This meant
that if the slug was incorrect, the post would not be found and the user would
be redirected to a 404 page. To fix this I had to change the way that the post
was being fetched to use the ID of the post instead. This meant that if the slug
was incorrect, the post would still be found and the user would be redirected to
the correct page.

```js
// the old code
Expand All @@ -39,8 +56,13 @@ get post() {
}
```
Then all that was left was to ensure all links were using the new slug format. This was done by changing the way that the slug was being created. Instead of using the title of the post, the slug was created using the title and the id of the post. This meant that the slug would always be unique and would always be the same for the same post.
Then all that was left was to ensure all links were using the new slug format.
This was done by changing the way that the slug was being created. Instead of
using the title of the post, the slug was created using the title and the id of
the post. This meant that the slug would always be unique and would always be
the same for the same post.
#### Inspiration
The original idea for this post comes from: [https://www.youtube.com/watch?v=a6lnfyES-LA](https://www.youtube.com/watch?v=a6lnfyES-LA)
The original idea for this post comes from:
[https://www.youtube.com/watch?v=a6lnfyES-LA](https://www.youtube.com/watch?v=a6lnfyES-LA)
Loading

0 comments on commit 352d50a

Please sign in to comment.