Add Netlify header file

A separate header file is necessary, even though header rule exists in netlify.toml
Revert aab11bcf14
This commit is contained in:
curben 2018-10-01 14:56:20 +09:30
parent b5529674c0
commit baf334c4fd
3 changed files with 15 additions and 2 deletions

View File

@ -27,7 +27,7 @@ code_dir: downloads/code
i18n_dir: :lang
skip_render:
include:
- _headers
- _headers # Netlify header file
# Writing
new_post_name: :title.md # File name of new posts

13
source/_headers Normal file
View File

@ -0,0 +1,13 @@
/*
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
/*.html
Content-Encoding: gzip, br
/*.css
Content-Encoding: gzip, br
/*.js
Content-Encoding: gzip, br

View File

@ -11,7 +11,7 @@ Create a website/blog (hosted by [GitLab](https://about.gitlab.com/features/page
3. Shared Runners should be enabled. Go to your (forked) project `Settings -> CI / CD -> Shared Runners`.
4. Change project website to a user website. This is so that the website's home page is `<your-username>.gitlab.io/`, instead of `<your-username>.gitlab.io/hexo`.
Go to `Settings -> General -> Advanced -> Rename repository`. Change the Path to `<your-username>.gitlab.io`.
5. You can start writing a new post straightaway without [installing](#installation) Hexo. You still need to change the blog's name and favicon though ([how-to](#naming).
5. You can start writing a new post straightaway without [installing](#installation) Hexo. You still need to change the blog's name and favicon though ([how-to](#naming)).
1. To create a new post (through GitLab.com), create a new `<post-title>.md` file in `source/_posts` folder.
2. Start with the following header/[front-matter](https://hexo.io/docs/front-matter):
```