mirror of
https://github.com/danpros/htmly.git
synced 2026-04-17 19:26:08 +05:30
Update files
This commit is contained in:
parent
356d60672b
commit
317348bbd9
4 changed files with 129 additions and 22 deletions
128
README.md
128
README.md
|
|
@ -149,6 +149,134 @@ $ php -a
|
|||
````
|
||||
This will produce a hash which is to be placed in the `password` field in `username.ini`. Ensure that the `encryption` field is set to `password_hash`.
|
||||
|
||||
|
||||
Both Online or Offline
|
||||
----------------------
|
||||
The built-in editor found in the admin panel, also provides you the ability to write to Markdown files offline by uploading them (see naming convention below) into the `content/username/blog/category/type/`:
|
||||
|
||||
* `username` must match `config/users/username.ini`.
|
||||
* `category` must match the `category.md` inside `content/data/category/category.md` except the `uncategorized` category.
|
||||
* `type` is the content type. Available content type `post`, `video`, `audio`, `link`, `quote`.
|
||||
|
||||
For static pages you can upload it to the `content/static` folder.
|
||||
|
||||
Category
|
||||
--------
|
||||
The default category is `Uncategorized` with slug `uncategorized` and you do not need to creating it inside `content/data/category/` folder. But if you write it offline and want to assign new category to specific post you need to creating it first before you can use those category, example `content/data/category/new-category.md` with the following content:
|
||||
|
||||
```html
|
||||
<!--t New category title t-->
|
||||
<!--d New category meta description d-->
|
||||
|
||||
New category info etc.
|
||||
````
|
||||
The slug for the new category is `new-category` (htmly removing the file extension). And for full file directory:
|
||||
````
|
||||
content/username/new-category/post/file.md
|
||||
````
|
||||
|
||||
File Naming Convention
|
||||
----------------------
|
||||
When you write a blog post and save it via the admin panel, HTMLy automatically create a .md file extension with the following name, example:
|
||||
|
||||
````
|
||||
2014-01-31-12-56-40_tag1,tag2,tag3_databaseless-blogging-platform-flat-file-blog.md
|
||||
````
|
||||
|
||||
Here's the explanation (separated by an underscore):
|
||||
|
||||
- `2014-01-31-12-56-40` is the published date. The date format is `yyyy-mm-dd-hh-mm-ss`
|
||||
- `tag1,tag2,tag3` are the tags, separated by commas
|
||||
- `databaseless-blogging-platform-flat-file-blog` is the URL
|
||||
|
||||
For static pages, use the following format:
|
||||
|
||||
````
|
||||
content/static/about.md
|
||||
````
|
||||
|
||||
In the example above, the `/about.md` creates the URL: `www.yourblog.com/about`
|
||||
|
||||
Thus, if you write/create files offline, you must name the .md file in the format above.
|
||||
|
||||
For static subpages, use the following format:
|
||||
|
||||
````
|
||||
content/static/about/me.md
|
||||
````
|
||||
|
||||
This will create the URL: `www.yourblog.com/about/me`
|
||||
|
||||
Content Tags
|
||||
-------------
|
||||
If you are writing offline, you need specify the content tags below:
|
||||
|
||||
**Title**
|
||||
```html
|
||||
<!--t Title t-->
|
||||
````
|
||||
|
||||
**Meta description**
|
||||
```html
|
||||
<!--d The meta description d-->
|
||||
````
|
||||
|
||||
**Tags**
|
||||
|
||||
This is just the tags display and for the slug is in the filename.
|
||||
```html
|
||||
<!--tag Tag1,Tag2 tag-->
|
||||
````
|
||||
|
||||
**Featured image**
|
||||
|
||||
Post with featured image.
|
||||
```html
|
||||
<!--image http://www.example.com/image-url/image.jpg image-->
|
||||
````
|
||||
|
||||
**Featured youtube video**
|
||||
|
||||
Post with featured youtube video.
|
||||
```html
|
||||
<!--video https://www.youtube.com/watch?v=xxxxxxx video-->
|
||||
````
|
||||
|
||||
**Featured soundcloud audio**
|
||||
|
||||
Post with featured soundcloud audio.
|
||||
```html
|
||||
<!--audio https://soundcloud.com/xxxx/audio-url audio-->
|
||||
````
|
||||
|
||||
**Featured link**
|
||||
|
||||
Post with featured link.
|
||||
```html
|
||||
<!--link https://github.com/danpros/htmly link-->
|
||||
````
|
||||
|
||||
**Featured quote**
|
||||
|
||||
Post with featured quote.
|
||||
```html
|
||||
<!--quote Premature Optimization is The Root of All Evil quote-->
|
||||
````
|
||||
|
||||
**Example**
|
||||
|
||||
Example of how your post would look like:
|
||||
```html
|
||||
<!--t Here is the post title t-->
|
||||
<!--d The meta description d-->
|
||||
<!--tag Tag1,Tag2 tag-->
|
||||
<!--video https://www.youtube.com/watch?v=xxxxxxx video-->
|
||||
|
||||
Paragraph 1
|
||||
|
||||
Paragraph 2 etc.
|
||||
```
|
||||
|
||||
Contribute
|
||||
----------
|
||||
1. Fork and edit
|
||||
|
|
|
|||
|
|
@ -20,14 +20,7 @@
|
|||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<?php
|
||||
if (isset($_GET['search'])) {
|
||||
$search = _h($_GET['search']);
|
||||
$url = site_url() . 'search/' . remove_accent($search);
|
||||
header("Location: $url");
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
<body class="<?php echo $bodyclass; ?>" itemscope="itemscope" itemtype="http://schema.org/Blog">
|
||||
<div class="hide">
|
||||
<meta content="<?php echo blog_title() ?>" itemprop="name"/>
|
||||
|
|
|
|||
|
|
@ -16,13 +16,6 @@
|
|||
<link rel='stylesheet' id='twentyfifteen-ie7-css' href='<?php echo theme_path();?>css/ie7.css' type='text/css' media='all' />
|
||||
<![endif]-->
|
||||
</head>
|
||||
<?php
|
||||
if (isset($_GET['search'])) {
|
||||
$search = _h($_GET['search']);
|
||||
$url = site_url() . 'search/' . remove_accent($search);
|
||||
header("Location: $url");
|
||||
}
|
||||
?>
|
||||
<body class="<?php echo $bodyclass;?>">
|
||||
<?php if (facebook()) { echo facebook(); } ?>
|
||||
<?php if (login()) { toolbar(); } ?>
|
||||
|
|
|
|||
|
|
@ -19,13 +19,6 @@
|
|||
<link rel="stylesheet" id="twentysixteen-ie7-css" href="<?php echo theme_path();?>css/ie7.css" type="text/css" media="all" />
|
||||
<![endif]-->
|
||||
</head>
|
||||
<?php
|
||||
if (isset($_GET['search'])) {
|
||||
$search = _h($_GET['search']);
|
||||
$url = site_url() . 'search/' . remove_accent($search);
|
||||
header("Location: $url");
|
||||
}
|
||||
?>
|
||||
<body class="<?php echo $bodyclass;?>">
|
||||
<?php if (facebook()) { echo facebook(); } ?>
|
||||
<?php if (login()) { toolbar(); } ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue