Skip to content

Commit

Permalink
chore: moving some things around in preparation of schemata
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsneighbour committed Apr 13, 2023
1 parent 6ff2f92 commit d02a45c
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 116 deletions.
1 change: 1 addition & 0 deletions archetypes/_schemata/blog.json
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions archetypes/_schemata/component.json
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions archetypes/_schemata/default.json
@@ -0,0 +1 @@
{}
41 changes: 0 additions & 41 deletions archetypes/hugo-release-notes/index.md

This file was deleted.

40 changes: 0 additions & 40 deletions archetypes/hugo-release-notes/schema.yaml

This file was deleted.

27 changes: 6 additions & 21 deletions bin/content/index.mjs
Expand Up @@ -39,7 +39,6 @@ async function main() {
{ value: "component", label: "Component", hint: "Documentation page for a Hugo component" },
{ value: "m2p2", label: "Music to program to" },
{ value: "labnotes", label: "Notes from the Lab" },
{ value: "hugonotes", label: "Hugo Release Notes" },
{ value: "tag", label: "Tag", hint: "Tag description page" },
{ value: "quit", label: "Quit" },
]
Expand Down Expand Up @@ -73,7 +72,7 @@ async function main() {
let number;
let increment;
const filename = "data/dnb/kollitsch/m2p2.json";
await new Promise((resolve, _reject) => {
await /** @type {Promise<void>} */(new Promise((resolve, _reject) => {
fs.readFile(filename, 'utf8', function (err, buf) {
if (err) {
console.log(err);
Expand All @@ -91,7 +90,7 @@ async function main() {
});
resolve();
});
});
}));
post = `blog/${year}/music-to-program-to-` + increment;
command = `hugo new --kind music2program2 ${post}`;
command2 = `code content/${post}/index.md`;
Expand All @@ -110,19 +109,6 @@ async function main() {
command2 = `code content/${post}/index.md`;
break;

case 'hugonotes':
title = await text({
message: 'Hugo Version:',
validate(value) {
if (value.length === 0) return `Version is required, doh!`;
}
});
slug = await prepareSlug(title);
post = `blog/${year}/hugo-"${title}"-release-notes`;
command = `hugo --kind hugo-release-notes blog ${post}`;
command2 = `code content/${post}/index.md`;
break;

case 'tag':
title = await text({
message: 'Tag Title:',
Expand Down Expand Up @@ -153,10 +139,9 @@ async function main() {
}

// @todo check if content file already exists and fail gracefully

spin.start('Creating content files...');

await new Promise((resolve, _reject) => {
await /** @type {Promise<void>} */(new Promise((resolve, _reject) => {
exec(command, function (
error,
_stdout,
Expand All @@ -174,11 +159,11 @@ async function main() {
}
resolve();
});
});
}));

spin.stop('Content created. Opening in VS Code...');

await new Promise((resolve, _reject) => {
await /** @type {Promise<void>} */(new Promise((resolve, _reject) => {
exec(command2, function (
error,
_stdout,
Expand All @@ -196,7 +181,7 @@ async function main() {
}
resolve();
});
});
}));

outro('All done :)');
process.exit(1);
Expand Down
Expand Up @@ -2,16 +2,16 @@
title: Fixing package dependency issues on Ubuntu with APT
description: Have you ever tried installing a program on your Ubuntu and ran into error messages about unconfigured dependencies? Don't worry; it happens to the best of us.
date: 2023-03-06T19:07:56+07:00
publishDate: '2023-03-06T19:07:56+07:00'
lastmod: '2023-03-06T21:25:53+07:00'
publishDate: 2023-03-06T19:07:56+07:00
lastmod: 2023-04-13T18:04:00+07:00
resources:
- title: Photo by [Gabriel Heinzer](https://unsplash.com/@6heinz3r) via [Unsplash](https://unsplash.com/)
src: header.jpg
- title: Photo by [Gabriel Heinzer](https://unsplash.com/@6heinz3r) via [Unsplash](https://unsplash.com/)
src: header.jpg
tags:
- troubleshooting
- shell
- ubuntu
- 100DaysToOffload
- troubleshooting
- shell
- ubuntu
- 100DaysToOffload
type: blog
---

Expand Down Expand Up @@ -48,10 +48,10 @@ What to do now?

The good news is that fixing this issue is easy with the `sudo apt install -f` command. This command checks for any broken dependencies in the package management system and automatically fixes them. Let's break down what each part of the command does:

- `sudo`: The sudo command runs the command following with administrative or root privileges.
- `apt`: The apt command is a package management utility in Ubuntu and other Debian-based Linux distributions used to manage software packages.
- `install`: The install command is used to install packages.
- `-f`: The -f option stands for "fix" and is used to fix broken dependencies in the package management system.
* `sudo`: The sudo command runs the command following with administrative or root privileges.
* `apt`: The apt command is a package management utility in Ubuntu and other Debian-based Linux distributions used to manage software packages.
* `install`: The install command is used to install packages.
* `-f`: The -f option stands for "fix" and is used to fix broken dependencies in the package management system.

When you run `sudo apt install -f`, the command will check for any missing or broken dependencies and attempt to fix them automatically. Afterward, it sets up all unconfigured packages. This can help ensure that your system runs smoothly and that all the necessary software packages are installed correctly.

Expand Down Expand Up @@ -95,4 +95,4 @@ Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
$[patrick@main]~❯
```

So, if you ever encounter any unconfigured dependencies while installing a program on Ubuntu, just remember to run `sudo apt install -f`, and you'll be good to go.
Long story short: if you ever encounter any unconfigured dependencies while installing a program on Ubuntu, just remember to run `sudo apt install -f`, and you'll be good to go.
1 change: 0 additions & 1 deletion data/dnb/netlification/config.toml
Expand Up @@ -4,7 +4,6 @@ reportUri = "https://kollitschdev.report-uri.com/r/d/csp/reportOnly"

#require-trusted-types-for = ["'script'"]
upgradeInsecureRequests = true
#require-trusted-types-for = ["'script'"]
base-uri = ["'self'"]
defaultSrc = ["'none'"]
script-src = [
Expand Down

0 comments on commit d02a45c

Please sign in to comment.