Skip to content

Commit

Permalink
remove submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
Melissa Huang committed Dec 18, 2023
1 parent e11242d commit 7276630
Show file tree
Hide file tree
Showing 50 changed files with 10,185 additions and 1 deletion.
1 change: 0 additions & 1 deletion themes/ghostwriter
Submodule ghostwriter deleted from 6b3e78
7 changes: 7 additions & 0 deletions themes/ghostwriter/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# os
.DS_Store
Thumbs.db
Desktop.ini

# sass
node_modules/
22 changes: 22 additions & 0 deletions themes/ghostwriter/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2013 Rory Gibson - Released under The MIT License.

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
128 changes: 128 additions & 0 deletions themes/ghostwriter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Ghostwriter

Enhanced port of the Ghost "[ghostwriter](https://github.com/roryg/ghostwriter)" theme to the [Hugo](https://gohugo.io) site generator.

## Installation

Inside the folder of your Hugo site run:

```bash
$ mkdir themes
$ cd themes
$ git clone https://github.com/jbub/ghostwriter
```

For more information read the official [setup guide](//gohugo.io/overview/installing/) of Hugo.

## Development

After installing the theme you need to install javascript dependencies. You can use
`npm` to install them from `package.json`. We are using `webpack` to build and package
styles. In order to develop with realtime reloading in the browser you can use this powerful combo:

```bash
hugo server
npm run watch
```

To update theme styles edit the `styles/style.scss` file. You can then either use the `watch` command
or run `build` to compile the styles:

```bash
npm run build
```

## Example config.yml

To customize your theme you can use following params:

```yaml
baseurl: "https://example.com/"
title: mytitle
theme: ghostwriter
languageCode: en-us
copyright: My Name
googleAnalytics: XXX
disqusShortname: XXX
pygmentsUseClasses: true
pygmentsCodefences: true

markup:
highlight:
codeFences: true
guessSyntax: false
hl_Lines: ""
lineNoStart: 1
lineNos: false
lineNumbersInTable: true
noClasses: true
tabWidth: 2

privacy:
disqus:
disable: true
googleAnalytics:
anonymizeIP: true
respectDoNotTrack: true
useSessionStorage: false

author:
name: My Name
profile: ""

taxonomies:
tag: tags

params:
mainSections:
- post
intro: true
headline: My headline
description: My description
github: "https://github.com/XXX"
gitlab: "https://gitlab.com/XXX"
linkedin: "https://linkedin.com/in/XXX/"
twitter: "https://twitter.com/XXX"
stackoverflow: "https://stackoverflow.com/users/XXX/YYY"
facebook: "https://www.facebook.com/username"
email: xxx@example.com
opengraph: true
shareTwitter: true
rss: true
shareFacebook: true
shareLinkedIn: false
dateFormat: "Mon, Jan 2, 2006"
exponeaJsUrl: ""
exponeaTarget: ""
exponeaToken: ""
exponeaTrackVisits: false
readingTime: true
readingTimeText: "Estimated reading time:"
fathomUrl: ""
fathomSiteId: ""
plausibleAnalytics:
domain: ""
# Default value is plausible.io, overwrite this if you are self-hosting or using a custom domain
serverURL: ""

permalinks:
post: "/:year/:month/:day/:filename/"

menu:
main:
- name: Blog
url: /
weight: 1
- name: Projects
url: /project/
weight: 2
- name: Contact
url: /page/contact/
weight: 3
- name: About
url: /page/about/
weight: 4
```
You can also inject arbitrary HTML into `<head>` simply by overriding the `extra-in-head.html`
partial, which is meant for that purpose.
8 changes: 8 additions & 0 deletions themes/ghostwriter/archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
+++
title = "{{ humanize .Name | title }}"
description = ""
author = ""
date = {{ .Date }}
tags = []
draft = true
+++
Binary file added themes/ghostwriter/images/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added themes/ghostwriter/images/tn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions themes/ghostwriter/layouts/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{ partial "header.html" . }}

<div class="container">
{{ partial "intro.html" . }}
<p class="error">Oh, this page does not exist. You can head back to <a href="{{ .Site.BaseURL }}">homepage</a>.</p>
</div>

{{ partial "footer.html" . }}
18 changes: 18 additions & 0 deletions themes/ghostwriter/layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{ partial "header.html" . }}

<div id="post-index" class="container">
{{ partial "intro.html" . }}

<ol class="post-list">
{{ $pag := .Paginate .Pages }}
{{ range $pag.Pages }}
{{ partial "page-stub.html" . }}
{{ end }}
</ol>

<div class="post-navigation">
{{ partial "pagination.html" . }}
</div>
</div>

{{ partial "footer.html" . }}
14 changes: 14 additions & 0 deletions themes/ghostwriter/layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{ partial "header.html" . }}

<div class="container">
<article class="post-container">

{{ partial "post-header.html" . }}

{{ partial "page-content.html" . }}

{{ partial "post-footer.html" . }}
</article>
</div>

{{ partial "footer.html" . }}
19 changes: 19 additions & 0 deletions themes/ghostwriter/layouts/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{ partial "header.html" . }}

<div id="post-index" class="container" itemscope="" itemtype="https://schema.org/Blog">
{{ partial "intro.html" . }}
<ol class="post-list">
{{ $pag := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
{{ range $pag.Pages }}
{{ partial "post-stub.html" . }}
{{ end }}
</ol>

<div class="post-navigation">
{{ partial "pagination.html" . }}
</div>
</div>

{{ partial "subscribe.html" . }}

{{ partial "footer.html" . }}
11 changes: 11 additions & 0 deletions themes/ghostwriter/layouts/page/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{ partial "header.html" . }}

<div class="container">
<article class="post-container">
{{ partial "page-header.html" . }}

{{ partial "page-content.html" . }}
</article>
</div>

{{ partial "footer.html" . }}
9 changes: 9 additions & 0 deletions themes/ghostwriter/layouts/partials/analytics-gtag.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.Params.googleAnalyticsID }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', '{{ .Site.Params.googleAnalyticsID }}');
</script>
5 changes: 5 additions & 0 deletions themes/ghostwriter/layouts/partials/disqus.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ if .Site.DisqusShortname }}
<div class="comments">
{{ template "_internal/disqus.html" . }}
</div>
{{ end }}
12 changes: 12 additions & 0 deletions themes/ghostwriter/layouts/partials/exponea.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{ if .Site.Params.exponeaJsUrl }}
<script>(function(d,b){if(!d.exponea){var a=function(a,g){function k(c){return function(){var e=arguments;""==a&&"initialize"==c&&e&&e[0].modify&&e[0].modify.overlay&&"loading"==b.readyState&&(b.write('<div id="__inf__overlay__" style="position:absolute;background:#fff;left:0;top:0;width:100%;height:100%;z-index:1000000"></div>'),setTimeout(function(){var a=b.getElementById("__inf__overlay__");a&&b.body.removeChild(a);res.__=!0},e[0].modify.delay||500));d.exponea._.push([a+c,arguments])}}var h=g.split(" "),f,c;res={_:[]};for(c=0;c<h.length;c++)f=h[c],res[f]=k(f);return res};d.exponea=a("","initialize identify update track trackLink trackEnhancedEcommerce getHtml showHtml showBanner showForm ping getAbTest");d.exponea.notifications=a("notifications.","isAvailable isSubscribed subscribe unsubscribe");var a=b.createElement("script"),g="https:"===b.location.protocol?"https:":"http:";a.type="text/javascript";a.async=!0;a.src=g+"{{ .Site.Params.exponeaJsUrl }}";b.getElementsByTagName("head")[0].appendChild(a)}})(window,document);</script>
<script type="text/javascript">
exponea.initialize({
"target": "{{ .Site.Params.exponeaTarget }}",
"token": "{{ .Site.Params.exponeaToken }}",
"track": {
"visits": {{ if .Site.Params.exponeaTrackVisits }}true{{ else }}false{{ end }}
}
});
</script>
{{ end }}
Empty file.
1 change: 1 addition & 0 deletions themes/ghostwriter/layouts/partials/extra-in-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<meta property="og:title" content="{{ .Title }}">
17 changes: 17 additions & 0 deletions themes/ghostwriter/layouts/partials/fathom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{ if .Site.Params.fathomUrl }}
<!-- Fathom - simple website analytics - https://github.com/usefathom/fathom -->
<script>
(function(f, a, t, h, o, m){
a[h]=a[h]||function(){
(a[h].q=a[h].q||[]).push(arguments)
};
o=f.createElement('script'),
m=f.getElementsByTagName('script')[0];
o.async=1; o.src=t; o.id='fathom-script';
m.parentNode.insertBefore(o,m)
})(document, window, '{{ .Site.Params.fathomUrl }}', 'fathom');
fathom('set', 'siteId', '{{ .Site.Params.fathomSiteId }}');
fathom('trackPageview');
</script>
<!-- / Fathom -->
{{ end }}
26 changes: 26 additions & 0 deletions themes/ghostwriter/layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
</div>
</div>

<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#" aria-label="Back to Top">
<i class="fa fa-angle-up" aria-hidden="true"></i>
</a>
</div>

<p class="footer-copyright">
<span>&copy; {{ .Site.LastChange.Format "2006" }} / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
</div>
</footer>

<script src="{{ .Site.BaseURL }}js/jquery-1.11.3.min.js"></script>
<script src="{{ .Site.BaseURL }}js/jquery.fitvids.js"></script>
<script src="{{ .Site.BaseURL }}js/scripts.js"></script>
{{ partial "extra-in-foot.html" . }}
</body>
</html>
Loading

0 comments on commit 7276630

Please sign in to comment.