Skip to content

Commit b25e783

Browse files
committed
remove blog
1 parent ea9eaaf commit b25e783

File tree

20 files changed

+2
-364
lines changed

20 files changed

+2
-364
lines changed

COPYsrc/index.html

-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<div class="navbar-nav">
1616
<a class="nav-item nav-link pr-4 pl-4" href="docs/"><h5 class="font-weight-normal">Docs</h2></a>
1717
<a class="nav-item nav-link pr-4 pl-4" href="faq/"><h5 class="font-weight-normal">FAQ</h2></a>
18-
<a class="nav-item nav-link pr-4 pl-4" href="blog/"><h5 class="font-weight-normal">Blog</h2></a>
1918
<a class="nav-item nav-link pr-4 pl-4" href="community/"><h5 class="font-weight-normal">Community</h2></a>
2019
<a class="nav-item nav-link pr-4 pl-4" href="showcase/"><h5 class="font-weight-normal">Showcase</h2></a>
2120
</div>
@@ -42,9 +41,6 @@ <h2 style="font-family: Bison;">Exokit</h2>
4241
<div class="col-12 mb-4">
4342
<a href="faq/"><h5 class="font-weight-light">FAQ</h5></a>
4443
</div>
45-
<div class="col-12 mb-4">
46-
<a href="blog/"><h5 class="font-weight-light">Blog</h5></a>
47-
</div>
4844
<div class="col-12 mb-4">
4945
<a href="community/"><h5 class="font-weight-light">Community</h5></a>
5046
</div>

COPYsrc/style/blog.css

-7
This file was deleted.

ORGANIZATION.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ Powered by [Hexo](https://hexo.io/)
1010
- `COPYsrc` - Landing page files copied over after generating Hexo files.
1111
- `src` - Content. Do not put CSS/JavaScript files here because Hexo will malform them.
1212
- `_data/` -
13-
- `_posts/` - Blog posts.
14-
- `blog/index.md` - Hexo blog section metadata. Does **not** contain blog posts.
1513
- `community/index.md` - Community page.
1614
- `faq/index.md` - FAQ page.
17-
- `images/` - Site and blog images
15+
- `images/` - Site images
1816
- `themes/` - Layout, CSS, releases.
1917
- `exokit/`
2018
- `layout/` - HTML and templates.

_config.prod.yml

-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ description: "Native VR/AR/XR engine for JavaScript"
99
email:
1010
language:
1111
robots: all
12-
blog_title: Blog
1312

1413
# Color for `<meta name="theme-color">`.
1514
## https://html.spec.whatwg.org/multipage/semantics.html#meta-theme-color
@@ -20,7 +19,6 @@ theme_color: black
2019
## If your site is put in a sub-directory, set URL as `http://yoursite.com/child` and root as `/child/`.
2120
url: https://exokit.org
2221
root: /
23-
permalink: blog/:title/
2422
tag_dir: tags
2523
archive_dir: archives
2624
category_dir: categories

scripts/generators.js

-47
Original file line numberDiff line numberDiff line change
@@ -19,50 +19,3 @@ hexo.extend.generator.register('examples', function (locals) {
1919

2020
return routes;
2121
});
22-
23-
/**
24-
* Paginated blog.
25-
*/
26-
hexo.extend.generator.register('blog', function (locals) {
27-
var routes = [];
28-
var perPage = hexo.config.per_page;
29-
var posts = locals.posts.sort('date', -1);
30-
for (var i = 1, j = posts.length, page = 1; i < j; i += perPage, page++) {
31-
// blog/page/*/
32-
var route = {
33-
path: 'blog/' + page + '/',
34-
data: {
35-
blog_index: true,
36-
posts: posts.slice(i - 1, i - 1 + perPage),
37-
},
38-
layout: 'blog'
39-
};
40-
41-
// Next.
42-
if (i + perPage < posts.length) {
43-
route.data.next = {
44-
pageNum: page + 1,
45-
path: '/blog/' + (page + 1) + '/',
46-
title: 'Next Page'
47-
};
48-
}
49-
50-
// Prev.
51-
if (i > 1) {
52-
route.data.prev = {
53-
pageNum: page - 1,
54-
path: page - 1 === 1 ? 'blog/' : '/blog/' + (page - 1) + '/',
55-
title: 'Previous Page'
56-
};
57-
}
58-
59-
// blog/ root alias of blog/page/1/.
60-
routes.push(route);
61-
if (page === 1) {
62-
var indexRoute = Object.assign({}, route);
63-
indexRoute.path = 'blog/';
64-
routes.push(indexRoute);
65-
}
66-
}
67-
return routes;
68-
});

scripts/helpers.js

+1-71
Original file line numberDiff line numberDiff line change
@@ -56,69 +56,10 @@ hexo.extend.helper.register('table_of_contents', function (content) {
5656
return toc;
5757
});
5858

59-
/**
60-
* twitter|exokitxr -> [@exokitxr](twitter.com/exokitxr)
61-
* twitter|exokitxr|Exokit XR -> [Exokit XR](twitter.com/exokitxr)
62-
* github|exokitxr -> [exokitxr](github.com/exokitxr)
63-
* exokitxr -> [exokitxr](exokitxr)
64-
* http://exokitxr.com|Exokit XR -> [Exokit XR](exokitxr.com)
65-
*/
66-
hexo.extend.helper.register('blog_attribution', function (author) {
67-
var authorSplit = author.split('|');
68-
var display;
69-
var link;
70-
71-
// Nothing to do.
72-
if (authorSplit.length === 1) { return author; }
73-
74-
// Twitter handle.
75-
if (authorSplit[0] === 'twitter') {
76-
if (authorSplit.length === 2) {
77-
display = authorSplit[1];
78-
link = authorSplit[1];
79-
} else {
80-
display = authorSplit[2];
81-
link = authorSplit[1];
82-
}
83-
// Strip `@` from link.
84-
if (link[0] === '@') {
85-
link = link.substring(1);
86-
}
87-
return '<a class="blog-attribution" href="https://twitter.com/' + link + '">' +
88-
display + '</a>';
89-
}
90-
91-
// GitHub username.
92-
if (authorSplit[0] === 'github') {
93-
if (authorSplit.length === 2) {
94-
display = authorSplit[1];
95-
link = authorSplit[1];
96-
} else {
97-
display = authorSplit[2];
98-
link = authorSplit[1];
99-
}
100-
return '<a class="blog-attribution" href="https://github.com/' + link + '">' +
101-
display + '</a>';
102-
}
103-
104-
// Link.
105-
display = authorSplit[1];
106-
link = authorSplit[0];
107-
return '<a class="blog-attribution" href="' + link + '">' + display + '</a>';
108-
});
109-
11059
hexo.extend.helper.register('markdown', function (text) {
11160
return hexo.render.renderSync({text: text, engine: 'markdown'});
11261
});
11362

114-
hexo.extend.helper.register('blog_date', function (date) {
115-
return moment(date).format('MMM D[,] YYYY');
116-
});
117-
118-
hexo.extend.helper.register('blog_date_subtract_week', function (date) {
119-
return moment(date).subtract({weeks: 1}).format('MMM D[,] YYYY');
120-
});
121-
12263
/**
12364
* #1000 -> github.com/exokitxr/exokit/pull/1000
12465
* abcde -> github.com/exokitxr/exokit/commit/abcde
@@ -164,9 +105,7 @@ hexo.extend.helper.register('website_github_edit_url', function (path) {
164105
return urljoin(this.config.github.exokit_site.url, 'edit', MASTER,
165106
path.replace('docs/', 'src/docs/').replace(/\.html$/, '.md'));
166107
}
167-
// For blog posts.
168-
return urljoin(this.config.github.exokit_site.url, 'edit', MASTER, this.config.source_dir,
169-
path.replace(/\.html$/, '.md'));
108+
170109
});
171110

172111
/**
@@ -248,10 +187,6 @@ hexo.extend.helper.register('is_external_url', isUrl);
248187
* Generate description for `<meta name="description">`.
249188
*/
250189
hexo.extend.helper.register('meta_description', function (page) {
251-
// If blog or documentation, return article excerpt.
252-
if (page.layout === 'docs' || (page.layout === 'blog' && !page.blog_index)) {
253-
return striptags(page.excerpt).substring(0, 280);
254-
}
255190
// Else, return vanilla description.
256191
return hexo.config.description;
257192
});
@@ -260,11 +195,6 @@ hexo.extend.helper.register('meta_description', function (page) {
260195
* Infer image for `<meta property="og:image">` and Twitter card.
261196
*/
262197
hexo.extend.helper.register('meta_image', function (page, defaultCard) {
263-
// If blog, return blog image.
264-
if (page.layout === 'blog' && !page.blog_index && page.image &&
265-
!page.image.src.endsWith('.gif')) {
266-
return 'images/blog/' + page.image.src;
267-
}
268198
// Else, return default card image.
269199
return defaultCard;
270200
});

scripts/redirects.js

-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ hexo.extend.generator.register('site-redirects', function () {
1414
]);
1515
});
1616

17-
hexo.extend.generator.register('blog-redirects', function () {
18-
return expandRedirectObjs([
19-
]);
20-
});
21-
2217
hexo.extend.generator.register('community-short-url-redirects', function () {
2318
return expandRedirectObjs([
2419
['github/', hexo.config.github.exokit.url],

src/_posts/introducing-exokit.md

-44
This file was deleted.

src/blog/index.md

-6
This file was deleted.

src/community/index.md

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ people who come together to make developing WebXR a rewarding experience.
2121

2222
## News
2323

24-
- [Blog](../blog/) - collects the latest
25-
news, upcoming events, and cool projects that other people are working on.
2624
- [Twitter](https://twitter.com/exokitxr) - Keep up to date with awesome
2725
projects that people are doing and announcements.
2826

themes/exokit/layout/blog.ejs

-98
This file was deleted.

themes/exokit/layout/index.ejs

-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
<li class="menu-item">
1818
<a href="<%- url_for('faq/') %>">FAQ</a>
1919
</li>
20-
<!-- <li class="menu-item">
21-
<a href="<%- url_for('blog/') %>">Blog</a>
22-
</li> -->
2320
<li class="menu-item">
2421
<a href="<%- url_for('community/') %>">Community</a>
2522
</li>

0 commit comments

Comments
 (0)