Skip to content

Commit

Permalink
static files copying as an option
Browse files Browse the repository at this point in the history
  • Loading branch information
juliancwirko committed Aug 22, 2021
1 parent 84457ce commit 3c21a42
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### [0.8.0](https://github.com/juliancwirko/create-harold-app/releases/tag/v0.7.0) (2021-08-08)

- possibility to copy custom static files or/and dirs structures starting from the root (use cases: robots.txt, manifest config, etc.) Configurable with .haroldrc file

### [0.7.0](https://github.com/juliancwirko/create-harold-app/releases/tag/v0.7.0) (2021-08-08)

- possibility to pass a custom template package when initializing the project
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ You can use the `postsList` with `byTagName`, which you should set up the same a
}}
```

#### Adding robots.txt, manifest.json, and any other statics

In many cases, there is a need to add some custom files to the root of your website. You can do this using the optional `src/statics` directory. Example: `src/statics/robots.txt` will be placed in `build/robots.txt` next to your index.html file. You can also nest your directories like `src/statics/some-dir/some-dir/file.txt`. It will land in `build/some-dir/some-dir/file.txt`.

#### Hosting: GitHub Pages

If you want to host Harold's website under your main username (username.github.io), you would need to rename your output directory to supported by Github. It is the `docs` directory. You would need to create a `.haroldrc` file and put the output directory name there.
Expand Down Expand Up @@ -218,7 +222,7 @@ Here is the quick walk-through video on how to do that:

I wanted to have a simple static site generator to build and host on Netlify. There are many such solutions, but I wanted to have complete control.

What is essential, I equipped it with three templates that you can use and modify for your needs. I prepared the templates system for custom ones in the future. Templates are great because we don’t need to start every site/blog repeatedly from the ground.
What is essential, I equipped it with three templates that you can use and modify for your needs. I prepared the templates system for custom ones in the future. I also plan to provide some other complete thematic templates.

### When to use it

Expand Down
3 changes: 2 additions & 1 deletion bin/create-harold-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ const args = process.argv;
const projectName = args ? args[2] : undefined;

program
.option('-t, --template <type>', 'template type (bare, default)')
.option('-t, --template <type>', 'Template type (bare, default, docs)')
.option('-v, --version', 'Create Harold App version');
program.parse(process.argv);
program.showHelpAfterError();

const options = program.opts();

Expand Down
2 changes: 1 addition & 1 deletion bin/packagejson.template
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"start": "harold-scripts start"
},
"devDependencies": {
"harold-scripts": "^0.7.0"
"harold-scripts": "^0.8.0"
}
}
8 changes: 4 additions & 4 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-harold-app",
"version": "0.7.0",
"version": "0.8.0",
"description": "Static blog/site generator",
"author": "Julian Ćwirko (julian.io)",
"license": "MIT",
Expand All @@ -25,7 +25,7 @@
"prettier": "prettier --write '**/*.{js,json}'"
},
"dependencies": {
"commander": "^7.1.0",
"commander": "^8.1.0",
"cross-spawn": "^7.0.3",
"decompress": "^4.2.1",
"download": "^8.0.0",
Expand Down

0 comments on commit 3c21a42

Please sign in to comment.