Skip to content

Commit

Permalink
more tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
Andygrond committed Sep 20, 2022
1 parent 48d9c75 commit b43cda6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ composer require andygrond/hugonette

#### Adaptations for Hugonette

After that take a look at your project folder. If you are working on Linux or macOS, make `log` and `temp` folders writable. Now find some example files in the `vendor/Andygrond/hugonette/doc/install` folder of the Hugonette project. Replace the entire `app` folder with `install/app` folder of Hugonette and the entire `www` with `install/www`. The second one will be your DocumentRoot. Here you will find 2 subfolders:
Take a look at your project folder. If you are working on Linux or macOS, make `log` and `temp` folders writable. Now find some example files in the `vendor/Andygrond/hugonette/doc/install` folder of the Hugonette project. Replace the entire `app` folder with `install/app` folder of Hugonette and the entire `www` with `install/www`. The second one will be your DocumentRoot. Here you will find 2 subfolders:

* `myblog` will be your entry point. Modifying 2 files there: `.htaccess` and `gate.php` you can change the project name, path and do whatever pops into your head to adapt Hugonette to your existing project. It's very flexible, so if you have a question like "will it be possible" the answer is probably: YES!

Expand All @@ -66,18 +66,18 @@ If you decide to give Hugo a chance, please head over to the [Hugo documentation

```
hugo new site myblog
cd myblog
```

You will probably want to build your own theme. Use any html template for a good start.

```
cd myblog
hugo new theme ...
```

Hugo is a powerful tool, with some difficulties on start, but when your project is bigger than a blog I recommend you to go this way. You will find some useful hints when you look into `hugonette/doc/hugo` folder.

Start a Web Server: `hugo server` and watch your changes at `http://localhost:1313/`. At the end of the design process, you will issue `hugo` command, and static site will be ready to publish in the `public` folder. Place it inside the `static` folder and rename it to `myblog`. That's all.
Start a Web Server: `hugo server` and watch your changes at `http://localhost:1313/`. At the end of the design process, you will issue `hugo` command. After a while your static site will be ready to publish in the `public` folder. Place it inside the `static` folder and rename it to `myblog`. That's all.


## Basic usage
Expand Down
14 changes: 7 additions & 7 deletions doc/install/www/myblog/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]

# process all existing directories by gate
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ gate.php [END]

# all existing files are valid, take the rest from static
RewriteCond %{REQUEST_FILENAME} !-f
# static
RewriteCond %{REQUEST_URI} !\.html$
RewriteRule ^(.*)$ /static/myblog/$1 [L]
RewriteCond %{DOCUMENT_ROOT}/static%{REQUEST_URI} -f
RewriteRule . /static%{REQUEST_URI} [L]

# html & php
RewriteCond %{REQUEST_URI} !\.php$
RewriteRule .* index.php [L,QSA]
File renamed without changes.

0 comments on commit b43cda6

Please sign in to comment.