Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add front-matter options to hide post meta and actions. #399

Merged
merged 2 commits into from
Apr 2, 2017
Merged

Add front-matter options to hide post meta and actions. #399

merged 2 commits into from
Apr 2, 2017

Conversation

darekkay
Copy link
Contributor

This makes custom 404 error pages look more clean (#327).

Configuration

  • Operating system with version :
  • Node version : 6.9.1
  • Hexo version : 3.2.0
  • Hexo-cli version : 1.0.2

Changes proposed

  • Front-matter options to hide post meta and actions.

This makes custom 404 error pages look more clean (#327).
Copy link
Owner

@LouisBarranqueiro LouisBarranqueiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great!

docs/user.md Outdated
@@ -612,6 +612,8 @@ gallery:
- http://i.imgur.com/o9r19kD.jpg "Dubai"
- https://example.com/orignal.jpg https://example.com/thumbnail.jpg "Sidney"
comments: false
hideMeta: true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use meta and actions variable names to have the same code style as comments. so update your if condition with (post.actions === undefined || post.actions) to still show the meta and actions if variables are not declared in the front-matter.

docs/user.md Outdated
Finally, you need to tell your server to use `/404.html` (which Hexo generates out of `404.md`) as your default 404 error page. Here are tutorials for the most common web servers:

- [Apache](https://www.digitalocean.com/community/tutorials/how-to-create-a-custom-404-page-in-apache)
- [Nginx](https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-to-use-custom-error-pages-on-ubuntu-14-04)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May worth to reference Amazon Cloudfront/S3 custom errors too: http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html

@darekkay
Copy link
Contributor Author

I've updated this PR :bowtie:

Copy link
Owner

@LouisBarranqueiro LouisBarranqueiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@LouisBarranqueiro LouisBarranqueiro merged commit eb6faf2 into LouisBarranqueiro:dev Apr 2, 2017
@darekkay darekkay deleted the page-404 branch November 15, 2017 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants