Skip to content

Commit

Permalink
feat!: Initial moving to single humble SSG script rather than npm
Browse files Browse the repository at this point in the history
scripts
  • Loading branch information
ripixel committed Jan 10, 2021
1 parent d0e3c3c commit 91a9f78
Show file tree
Hide file tree
Showing 16 changed files with 1,241 additions and 519 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -8,7 +8,7 @@ SSGs are amazing, if you want a full-fledged site. But if you just want to dumb

## What

This repo simply looks for any `{template_name.html}` in the body of the `pages/page_name.html`, and replaces it with the content of `templates/template_name.html`, and writes it to `public/page_name.html` with that new content.
This repo simply looks for any `{template_name.html}` in the body of the `pages/page_name.html`, and replaces it with the content of `partials/template_name.html`, and writes it to `public/page_name.html` with that new content.

It also does a few other little things, like looking for `{page}` and replacing it with the `page_name` (for uses like `class="home"` and setting the `<title>`).

Expand Down
34 changes: 17 additions & 17 deletions favicon.config.js
@@ -1,23 +1,23 @@
module.exports = {
input: "./assets/images/favicon.png", // Required. override cli options.
output: "./public", // Required. override cli options.
template: "./templates/meta.html", // Default is the same as output, default name is meta.html.
input: './assets/images/favicon.png', // Required. override cli options.
output: './public', // Required. override cli options.
template: './partials/meta.html', // Default is the same as output, default name is meta.html.
config: {
path: "/", // Path for overriding default icons path. `string`
appName: "ripixel", // Your application's name. `string`
path: '/', // Path for overriding default icons path. `string`
appName: 'ripixel', // Your application's name. `string`
appDescription: "I'm James King, and I make things for the web", // Your application's description. `string`
developerName: "James King", // Your (or your developer's) name. `string`
developerURL: "https://www.ripixel.co.uk", // Your (or your developer's) URL. `string`
dir: "auto", // Primary text direction for name, short_name, and description
lang: "en-US", // Primary language for name and short_name
background: "#FF9100", // Background colour for flattened icons. `string`
theme_color: "#FF9100", // Theme color user for example in Android's task switcher. `string`
appleStatusBarStyle: "black-translucent", // Style for Apple status bar: "black-translucent", "default", "black". `string`
display: "standalone", // Preferred display mode: "fullscreen", "standalone", "minimal-ui" or "browser". `string`
orientation: "any", // Default orientation: "any", "natural", "portrait" or "landscape". `string`
scope: "/", // set of URLs that the browser considers within your app
start_url: "/", // Start URL when launching the application from a device. `string`
version: "1.0", // Your application's version string. `string`
developerName: 'James King', // Your (or your developer's) name. `string`
developerURL: 'https://www.ripixel.co.uk', // Your (or your developer's) URL. `string`
dir: 'auto', // Primary text direction for name, short_name, and description
lang: 'en-US', // Primary language for name and short_name
background: '#FF9100', // Background colour for flattened icons. `string`
theme_color: '#FF9100', // Theme color user for example in Android's task switcher. `string`
appleStatusBarStyle: 'black-translucent', // Style for Apple status bar: "black-translucent", "default", "black". `string`
display: 'standalone', // Preferred display mode: "fullscreen", "standalone", "minimal-ui" or "browser". `string`
orientation: 'any', // Default orientation: "any", "natural", "portrait" or "landscape". `string`
scope: '/', // set of URLs that the browser considers within your app
start_url: '/', // Start URL when launching the application from a device. `string`
version: '1.0', // Your application's version string. `string`
logging: false, // Print logs to console? `boolean`
pixel_art: false, // Keeps pixels "sharp" when scaling up, for pixel art. Only supported in offline mode.
loadManifestWithCredentials: false, // Browsers don't send cookies when fetching a manifest, enable this to fix that. `boolean`
Expand Down
10 changes: 10 additions & 0 deletions humble.config.ts
@@ -0,0 +1,10 @@
export const config = {
rootDir: './',
pagesDir: 'pages',
partialsDir: 'partials',
outDir: 'public',
cssDir: 'assets/styles',
imagesDir: 'assets/images',
nodeModulesDir: 'node_modules',
generateFavicons: true, // optional
};
2 changes: 1 addition & 1 deletion nodemon.json
Expand Up @@ -2,7 +2,7 @@
"watch": [
"pages",
"assets",
"templates",
"partials",
"thoughts"
],
"ext": "html,css,md",
Expand Down

0 comments on commit 91a9f78

Please sign in to comment.