Skip to content
Merged
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
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ preferences:
enabled: false
flashcards:
enabled: false #Not supported in NotesGadern theme
homepage:
enabled: false ##If you need a homepage, change this to true and edit _includes/Homepage.html

encoding: utf-8

Expand Down
6 changes: 6 additions & 0 deletions _includes/FeedContent.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div class="block">
<h1>Welcome to the Garden!</h1>

<p>This is a simple Jekyll theme created for building a digital garden with Obsidian and Github Pages. You have to fork this theme to your Github account, configure Github pages, and start using the `_notes` folder as the Obsidian vault. Check etailed documentation and my workflow. This theme is a fork of the Simple Jekyll theme. Check Gatsby-Garden to see the gatsby version of this theme. (Edit `Index.md` to modify this text)</p>

</div>
10 changes: 10 additions & 0 deletions _includes/Homepage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div class="block">
<h1>Jekyll Garden Homepage</h1>

<p>
If you are seeing this as homepage, it means your configuration is set to have homepage.
Edit _includes/Homepage.html to modify this content. </br>
To disable this, change homepage enabled to false at _config.yml
</p>

</div>
118 changes: 67 additions & 51 deletions _layouts/Post.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,32 +70,38 @@
{%- include Header.html -%}
<section class="section">
<div class="columns is-centered">
<!--- CASE 1 : Homepage-->

<!--- CASE 1 : Homepage-->

{%- if page.permalink == "/" -%}
{%- if page.permalink == "/" -%}
<div class="column is-half">
{%- include Content.html -%}
{%- include Feed.html -%}
{%- include Footer.html -%}
{%- if site.preferences.homepage.enabled -%}
<!--- Show Homepage -->
{%- include Homepage.html -%}
{%- include Footer.html -%}
{%- else -%}
<!--- Show Feed Part -->
{%- include FeedContent.html -%}
{%- include Feed.html -%}
{%- include Footer.html -%}
</div>
{%- endif -%}
{%- endif -%}
{%- endif -%}

<!---CASE 2 : Notes & Blog Page-->
<!---CASE 2 : Notes & Blog Page-->

{%- if page.content-type == "notes"
or page.content-type == "post" -%}
<div class="column is-three-fifths">
{%- if page.content-type == "notes"
or page.content-type == "post" -%}
<div class="column is-three-fifths">
<main>
<div class="note-page-section">
<div class="buttons for-back-home">
<a class="button is-text" onclick="window.location.assign('/');">
<span class="icon is-small">
<svg width="12" height="20" viewBox="0 0 12 20" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M11.0309 0.468998C11.1007 0.538667 11.1561 0.62143 11.1939 0.712548C11.2318 0.803665 11.2512 0.901347 11.2512 0.999998C11.2512 1.09865 11.2318 1.19633 11.1939 1.28745C11.1561 1.37857 11.1007 1.46133 11.0309 1.531L2.56038 10L11.0309 18.469C11.1717 18.6098 11.2508 18.8008 11.2508 19C11.2508 19.1992 11.1717 19.3902 11.0309 19.531C10.89 19.6718 10.699 19.7509 10.4999 19.7509C10.3007 19.7509 10.1097 19.6718 9.96887 19.531L0.968875 10.531C0.899031 10.4613 0.843616 10.3786 0.805806 10.2874C0.767997 10.1963 0.748535 10.0986 0.748535 10C0.748535 9.90135 0.767997 9.80367 0.805806 9.71255C0.843616 9.62143 0.899031 9.53867 0.968875 9.469L9.96887 0.468998C10.0385 0.399153 10.1213 0.343739 10.2124 0.305929C10.3035 0.26812 10.4012 0.248657 10.4999 0.248657C10.5985 0.248657 10.6962 0.26812 10.7873 0.305929C10.8784 0.343739 10.9612 0.399153 11.0309 0.468998Z"
fill="var(--text-sub)" />
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M11.0309 0.468998C11.1007 0.538667 11.1561 0.62143 11.1939 0.712548C11.2318 0.803665 11.2512 0.901347 11.2512 0.999998C11.2512 1.09865 11.2318 1.19633 11.1939 1.28745C11.1561 1.37857 11.1007 1.46133 11.0309 1.531L2.56038 10L11.0309 18.469C11.1717 18.6098 11.2508 18.8008 11.2508 19C11.2508 19.1992 11.1717 19.3902 11.0309 19.531C10.89 19.6718 10.699 19.7509 10.4999 19.7509C10.3007 19.7509 10.1097 19.6718 9.96887 19.531L0.968875 10.531C0.899031 10.4613 0.843616 10.3786 0.805806 10.2874C0.767997 10.1963 0.748535 10.0986 0.748535 10C0.748535 9.90135 0.767997 9.80367 0.805806 9.71255C0.843616 9.62143 0.899031 9.53867 0.968875 9.469L9.96887 0.468998C10.0385 0.399153 10.1213 0.343739 10.2124 0.305929C10.3035 0.26812 10.4012 0.248657 10.4999 0.248657C10.5985 0.248657 10.6962 0.26812 10.7873 0.305929C10.8784 0.343739 10.9612 0.399153 11.0309 0.468998Z"
fill="var(--text-sub)" />
</svg>
</span>
</a>
Expand All @@ -104,51 +110,61 @@ <h1>{{page.title}}</h1>
{%- include Content.html -%}
{%- include Backlinks.html -%}
</div>
{%- include Footer.html -%}
{%- include Footer.html -%}
</main>
</div>
</div>

{%- endif -%}
{%- endif -%}

<!--- CASE 3 : Static Page -->
<!--- CASE 3 : Static Page -->

{%- if page.content-type == "eg" -%}
<div class="column is-half">
<main>
<h1>{{page.title}}</h1>
{%- include Content.html -%}
{%- include Footer.html -%}
{%- if page.content-type == "eg" -%}
<div class="column is-half">
<main>
<h1>{{page.title}}</h1>
{%- include Content.html -%}
{%- include Footer.html -%}

</main>
</div>
{%- endif -%}
</main>
</div>
{%- endif -%}

<!--- CASE 4 : Blog Listing page -->
<!--- CASE 4 : Blog Listing page -->

{%- if page.permalink == "/posts" -%}
<div class="column is-half">
<h1>{{page.title}}</h1>
<div class="block">
{% for item in site.posts %}
<div class="block note-cards">
<div class="box-feed" data-url="{{site.url}}{{item.url}}">
<a href="{{item.url}}" style="text-decoration: none;">
<h4>{{ item.title }}</h4>
<div class="content">
<p style="margin: 0px;">
{{ item.content | strip_html | strip | remove: "[[" | remove: "]]" | escape | truncate: 260 }}
</p>
</div>
</a>
</div>
{%- if page.permalink == "/posts" -%}
<div class="column is-half">
<h1>{{page.title}}</h1>
<div class="block">
{% for item in site.posts %}
<div class="block note-cards">
<div class="box-feed" data-url="{{site.url}}{{item.url}}">
<a href="{{item.url}}" style="text-decoration: none;">
<h4>{{ item.title }}</h4>
<div class="content">
<p style="margin: 0px;">
{{ item.content | strip_html | strip | remove: "[[" | remove: "]]" | escape | truncate: 260 }}
</p>
</div>
</a>
</div>
{%- endfor -%}
</div>
{%- include Footer.html -%}

</div>
{%- endfor -%}
</div>
{%- endif -%}
{%- include Footer.html -%}
</div>
{%- endif -%}

<!--- CASE 5 : Notes Listing page -->

{%- if page.permalink == "/notes" -%}
<div class="column is-half">
{%- include FeedContent.html -%}
{%- include Feed.html -%}
{%- include Footer.html -%}
</div>
{%- endif -%}

</div>
</section>
</body>

</html>
9 changes: 1 addition & 8 deletions pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,4 @@

layout: Post
permalink: /
---

<div class="block">
<h1>Welcome to the Garden!</h1>

<p>This is a simple Jekyll theme created for building a digital garden with Obsidian and Github Pages. You have to fork this theme to your Github account, configure Github pages, and start using the `_notes` folder as the Obsidian vault. Check etailed documentation and my workflow. This theme is a fork of the Simple Jekyll theme. Check Gatsby-Garden to see the gatsby version of this theme. (Edit `Index.md` to modify this text)</p>

</div>
---