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

make it publishable on dat #182

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ This Hugo theme was ported from [Bootstrapious](http://bootstrapious.com/p/unive
* [Recent posts](#recent-posts)
* [Meta tags](#meta-tags)
* [Usage](#usage)
* [on Dat](#publish on dat)
* [Contributing](#contributing)
* [License](#license)
* [Thanks](#thanks)
Expand Down Expand Up @@ -429,6 +430,16 @@ Now enter [`localhost:1313`](http://localhost:1313) in the address bar of your b

For more information check out the official [Hugo documentation](http://gohugo.io/overview/usage/).

###publish on dat

To create a version of the website to publish in on dat, you will need to run:

```
$ hugo --config config.toml,config_todat.toml
```

A new folder will be created, share that folder on the dat network, then copy the dat address and use it as the baseURL, do not forget to add a slash at the end of the baseURL.
Run the command again, and reload the dat sharing, the website should be nice looking on the beakerbrowser. Be careful, small caps and capitals are treated differently on dat, while it is not on http sites (image file names,...).

## Contributing

Expand Down
2 changes: 2 additions & 0 deletions exampleSite/config_todat.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
baseurl = 'dat://xxx/'
publishDir = 'public-dat'
8 changes: 4 additions & 4 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<div class="row">
<div class="col-md-4">
<div class="image">
<a href="{{ .Permalink }}">
<a href="{{ .Permalink | safeURL }}">
{{ if .Params.banner }}
<img src="{{ .Site.BaseURL}}{{ .Params.banner }}" class="img-responsive" alt="">
{{ else }}
Expand All @@ -38,7 +38,7 @@
</div>
</div>
<div class="col-md-8">
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<h2><a href="{{ .Permalink | safeURL }}">{{ .Title }}</a></h2>
<div class="clearfix">
<p class="author-category">
{{ if isset .Params "author" }}
Expand All @@ -52,11 +52,11 @@ <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>

</p>
<p class="date-comments">
<a href="{{ .Permalink }}"><i class="fa fa-calendar-o"></i> {{ .Date.Format .Site.Params.date_format }}</a>
<a href="{{ .Permalink | safeURL }}"><i class="fa fa-calendar-o"></i> {{ .Date.Format .Site.Params.date_format }}</a>
</p>
</div>
<p class="intro">{{ .Summary }}</p>
<p class="read-more"><a href="{{ .Permalink }}" class="btn btn-template-main">{{ i18n "continueReading" }}</a>
<p class="read-more"><a href="{{ .Permalink | safeURL }}" class="btn btn-template-main">{{ i18n "continueReading" }}</a>
</p>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h4>{{ i18n "recentPosts" }}</h4>
{{ range first 3 (where .Site.Pages "Type" "blog") }}
<div class="item same-height-row clearfix">
<div class="image same-height-always">
<a href="{{ .Permalink }}">
<a href="{{ .Permalink | safeURL }}">
{{ if isset .Params "banner" }}
<img src="{{ .Site.BaseURL}}{{ .Params.banner }}" class="img-responsive" alt="{{ .Title }}">
{{ else }}
Expand All @@ -31,7 +31,7 @@ <h4>{{ i18n "recentPosts" }}</h4>
</a>
</div>
<div class="name same-height-always">
<h5><a href="{{ .Permalink }}">{{ .Title }}</a></h5>
<h5><a href="{{ .Permalink | safeURL }}">{{ .Title }}</a></h5>
</div>
</div>
{{ end }}
Expand Down
24 changes: 12 additions & 12 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,25 @@

{{ .Hugo.Generator }}

<link href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,500,700,800' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,500,700,800' rel='stylesheet' type='text/css'>
Copy link
Contributor

Choose a reason for hiding this comment

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

why is needed this change? I prefer the old version.


<!-- Bootstrap and Font Awesome css -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- Css animations -->
<link href="{{ "css/animate.css" | relURL}}" rel="stylesheet">
<link href="{{ .Site.BaseURL }}css/animate.css" rel="stylesheet">

<!-- Theme stylesheet, if possible do not edit this stylesheet -->
{{ if and (isset .Site.Params "style") .Site.Params.style }}
<link href="{{ "css/style" | relURL}}.{{ .Site.Params.style }}.css" rel="stylesheet" id="theme-stylesheet">
<link href="{{ .Site.BaseURL }}css/style.{{ .Site.Params.style }}.css" rel="stylesheet" id="theme-stylesheet">
{{ else }}
<link href="{{ "css/style.default.css" | relURL}}" rel="stylesheet" id="theme-stylesheet">
<link href="{{ .Site.BaseURL }}css/style.default.css" rel="stylesheet" id="theme-stylesheet">
{{ end }}


<!-- Custom stylesheet - for your changes -->
<link href="{{ "css/custom.css" | relURL}}" rel="stylesheet">
<link href="{{ .Site.BaseURL }}css/custom.css" rel="stylesheet">

<!-- Responsivity for older IE -->
{{ `
Expand All @@ -49,14 +49,14 @@
` | safeHTML }}

<!-- Favicon and apple touch icons-->
<link rel="shortcut icon" href="{{ "img/favicon.ico" | relURL }}" type="image/x-icon" />
<link rel="apple-touch-icon" href="{{ "img/apple-touch-icon.png" | relURL }}" />
<link rel="shortcut icon" href="{{ .Site.BaseURL }}img/favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" href="{{ .Site.BaseURL }}img/apple-touch-icon.png" />
<!-- owl carousel css -->

<link href="{{ "css/owl.carousel.css" | relURL}}" rel="stylesheet">
<link href="{{ "css/owl.theme.css" | relURL}}" rel="stylesheet">
<link href="{{ .Site.BaseURL }}css/owl.carousel.css" rel="stylesheet">
<link href="{{ .Site.BaseURL }}css/owl.theme.css" rel="stylesheet">

<link rel="alternate" href="{{ "/index.xml" | absURL }}" type="application/rss+xml" title="{{ .Site.Title }}">
<link rel="alternate" href="{{ .Site.BaseURL }}index.xml" type="application/rss+xml" title="{{ .Site.Title }}">

<!-- Facebook OpenGraph tags -->
<meta property="og:title" content="{{ .Title }}" />
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/recent_posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ <h2>{{ .Site.Params.recent_posts.title }}</h2>
<div class="bg"></div>
<div class="text">
<p class="buttons">
<a href="{{ .Permalink }}" class="btn btn-template-transparent-primary"><i class="fa fa-link"></i> {{ i18n "readMore" }}</a>
<a href="{{ .Permalink | safeURL }}" class="btn btn-template-transparent-primary"><i class="fa fa-link"></i> {{ i18n "readMore" }}</a>
</p>
</div>
</div>

<div class="content">
<h4><a href="{{ .Permalink }}">{{ .Title }}</a></h4>
<h4><a href="{{ .Permalink | safeURL }}">{{ .Title }}</a></h4>
<p class="author-category">
{{ with .Params.author }}
{{ i18n "authorBy" }} <a href="#">{{ . }}</a>
Expand All @@ -46,7 +46,7 @@ <h4><a href="{{ .Permalink }}">{{ .Title }}</a></h4>
</p>
<p class="intro">{{ .Summary }}</p>
<p class="read-more">
<a href="{{ .Permalink }}" class="btn btn-template-main">{{ i18n "continueReading" }}</a>
<a href="{{ .Permalink | safeURL }}" class="btn btn-template-main">{{ i18n "continueReading" }}</a>
</p>
</div>
</div>
Expand Down
16 changes: 8 additions & 8 deletions layouts/partials/scripts.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{{ template "_internal/google_analytics.html" . }}
<script src="//code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/waypoints/4.0.1/jquery.waypoints.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/Counter-Up/1.0/jquery.counterup.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-parallax/1.1.3/jquery-parallax.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/waypoints/4.0.1/jquery.waypoints.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Counter-Up/1.0/jquery.counterup.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-parallax/1.1.3/jquery-parallax.js"></script>
{{ if .Site.Params.googleMapsApiKey }}
<script src="//maps.googleapis.com/maps/api/js?key={{.Site.Params.googleMapsApiKey}}&v=3.exp"></script>
<script src="https://maps.googleapis.com/maps/api/js?key={{.Site.Params.googleMapsApiKey}}&v=3.exp"></script>
{{ else }}
<script src="//maps.googleapis.com/maps/api/js?v=3.exp"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
{{ end }}
<script src="{{ .Site.BaseURL }}js/hpneo.gmaps.js"></script>
<script src="{{ .Site.BaseURL }}js/gmaps.init.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/testimonials.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h2>{{ .Site.Params.testimonials.title }}</h2>
<div class="icon"><i class="fa fa-quote-left"></i>
</div>
<div class="name-picture">
<img class="" alt="" src="{{ .avatar | absURL }}">
<img class="" alt="" src="{{ .avatar | safeURL }}">
<h5>{{ .name }}</h5>
<p>{{ .position }}</p>
</div>
Expand Down