Skip to content

Commit

Permalink
Adding hugo website (#15)
Browse files Browse the repository at this point in the history
🎉
  • Loading branch information
pedroql committed Aug 13, 2020
1 parent edf5412 commit 51f4fa9
Show file tree
Hide file tree
Showing 99 changed files with 4,322 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Ensure documentation is up to date
id: doc-check
run: |
./gradlew --no-daemon dokka
./gradlew --no-daemon cleanDokka dokka
# the next command will list documentation files out of date. Please run ./gradlew dokka
git diff --exit-code --name-only || echo ::set-output name=status::failure
- name: Check which documentation files have changed
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Ensure documentation is up to date
id: doc-check
run: |
./gradlew --no-daemon dokka
./gradlew --no-daemon cleanDokka dokka
# the next command will list documentation files out of date. Please run ./gradlew dokka
git diff --exit-code --name-only || echo ::set-output name=status::failure
- name: Check which documentation files have changed
Expand Down
1 change: 1 addition & 0 deletions docs

This file was deleted.

4 changes: 2 additions & 2 deletions dokka.build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dokka {
// https://github.com/Kotlin/dokka#using-dokka
outputFormat = 'html'
outputDirectory = "${project.rootDir}/documentation"
outputDirectory = "${project.rootDir}/website-src/static/documentation"

subProjects = ["mvflow-core"]
configuration {
Expand Down Expand Up @@ -40,7 +40,7 @@ dokka {

task removeAbsolutePathsFromDokkaFiles {
doLast {
fileTree("${project.rootDir}/documentation/").matching {
fileTree("${project.rootDir}/website-src/static/documentation/").matching {
include "**/index-outline.html"
}
.forEach { File file ->
Expand Down
3 changes: 3 additions & 0 deletions samples/android-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ android {
lintOptions {
checkGeneratedSources = true
warningsAsErrors = true

// allow dependencies go out of date in this sample project
informational("GradleDependency")
}
}

Expand Down
16 changes: 16 additions & 0 deletions todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ In no particular order
[dokka/pull/955](https://github.com/Kotlin/dokka/pull/955) )

* Write docs in a github.io page

* Announce it!

* Cleanup the theme code (better structure for partials, list pages vs content pages, etc)

* Put TOC inline with the content when on landscape

* Optimize for SEO, run checks

* See if I could integrate SASS / minify CSS/js

* Follow [Tufte](https://edwardtufte.github.io/tufte-css/) guidelines for better styling

* The homepage should contain links to the main sections (just like the header )

* Write blog posts

Expand Down Expand Up @@ -38,6 +52,8 @@ functionality to be developed)

* Update the example using `launchWhenResumed` to use the new better approach

* run https://github.com/plnice/can-i-drop-jetifier to see if can drop jetifier

## To consider

Not sure we will do those things, but keeping track of some possibilities. Feedback welcome!
Expand Down
Empty file.
1 change: 1 addition & 0 deletions website/hugo-generated/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Page not found 😱
175 changes: 175 additions & 0 deletions website/hugo-generated/articles/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" href="https://unpkg.com/purecss@2.0.3/build/pure-min.css"
integrity="sha384-cg6SkqEOCV1NbJoCu11+bm0NvBRc8IYLRGXkmNrqUBfTjmMYwNKPWBTIKyw9mHNJ" crossorigin="anonymous">
<link rel="stylesheet" href="https://unpkg.com/purecss@2.0.3/build/grids-responsive-min.css">


<link rel="stylesheet" href="/mvflow/css/github.css">




<link href="/mvflow/articles/index.xml" rel="alternate" type="application/rss+xml" title="MVFLow: a simple MVI library using Kotlin coroutines and flows"/>
<link href="/mvflow/articles/index.xml" rel="feed" type="application/rss+xml" title="MVFLow: a simple MVI library using Kotlin coroutines and flows"/>




<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">

<title>Articles</title>
</head>
<body>
<div class="pure-g"><div class="pure-u-1 header-parent">
<div class="content header">
<div class="pure-menu pure-menu-horizontal">
<ul class="custom-menu-list pure-menu-list">
<li class="pure-menu-item">

<a href="https://pedroql.github.io/mvflow/" class="pure-menu-link">Home</a>

</li>




<li class="pure-menu-item">






<a href="https://pedroql.github.io/mvflow/articles/" class="pure-menu-link active">Articles</a>

</li>
<li class="pure-menu-item">
<a href="https://github.com/pedroql/mvflow" target="_blank" class="pure-menu-link">GitHub</a>
</li>
<li class="pure-menu-item">

<a href="https://pedroql.github.io/mvflow/documentation/mvflow/net.pedroloureiro.mvflow/" target="_blank" class="pure-menu-link">Documentation</a>

</li>
</ul>
</div>
</div>
</div>



<div class="content pure-u-1">



<div id="content" >
<article>
<section>
</section>
<section class="section-listing">

<div class="section-item">
<div class="">
<h1 id="implementing-your-view-actions-flow">Implementing your view actions flow</h1>
<p>MVFlow defines the view interface as follows:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-kotlin" data-lang="kotlin"><span style="color:#204a87;font-weight:bold">interface</span> <span style="color:#000">View</span><span style="color:#000;font-weight:bold">&lt;</span><span style="color:#000">State</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">Action</span><span style="color:#000;font-weight:bold">&gt;</span> <span style="color:#000;font-weight:bold">{</span>

<span style="color:#204a87;font-weight:bold">fun</span> <span style="color:#000">render</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">state</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000">State</span><span style="color:#000;font-weight:bold">)</span>

<span style="color:#204a87;font-weight:bold">fun</span> <span style="color:#000">actions</span><span style="color:#000;font-weight:bold">():</span> <span style="color:#000">Flow</span><span style="color:#000;font-weight:bold">&lt;</span><span style="color:#000">Action</span><span style="color:#000;font-weight:bold">&gt;</span>
<span style="color:#000;font-weight:bold">}</span>
</code></pre></div><p>Most developers should have a reasonable idea of how to implement <code>render(state: State)</code>, but implementing
<code>actions(): Flow&lt;Action&gt;</code> might not seem so obvious if this is the first time you are implementing your own
<a href="https://kotlinlang.org/docs/reference/coroutines/flow.html">Flow</a>.</p>
<p>We can suggest three different ways to implement this, each with different pros and cons.</p>
</div>


<div class="section-item-link">
<a href="/mvflow/implementing-your-view-actions-flow/">Read More…</a>
</div>

</div>

</section>

</article>

</div>
</div><script>

var elements = document.getElementsByTagName("pre");
function isHorizontallyScrollable(element) {
return element.scrollWidth > element.clientWidth;
};
var sidebar = document.querySelector(".sidebar");
function hideSidebarWhenHovered(element) {
element.addEventListener('mouseenter', e => {
sidebar.classList.add("hide-for-horizontal-scroll");
});
element.addEventListener('mouseleave', e => {
sidebar.classList.remove("hide-for-horizontal-scroll");
});
};
Array.prototype.forEach.call(elements, function(el, i){
if(isHorizontallyScrollable(el)) {
el.classList.add("expand");
hideSidebarWhenHovered(el);
}
});
</script>

<script data-goatcounter="https://wi3r4gjn.goatcounter.com/count"
async src="//gc.zgo.at/count.js"></script>
<noscript>
<img src="https://wi3r4gjn.goatcounter.com/count?p=/mvflow/articles/">
</noscript>

<script src="https://unpkg.com/in-view@0.6.1/dist/in-view.min.js"></script>
<script>

var sidebarContent = document.querySelector(".toc-container.transparent");
if(sidebarContent != null) {
var lastElement = null;
const handleView = item => {
const linkEl = document.querySelector(`a[href='#${item.id}']`);

if(item.classList.contains("hide-from-toc")) {
linkEl.classList.add("hide-from-toc");
return;
}

let offsetHeight = 0.6*(window.innerHeight);
inView.offset({
bottom:offsetHeight
});

inView(`#${item.id}`)
.on("enter", () => {
if( lastElement != null) {
lastElement.classList.remove('active');
}
if( linkEl != null) {
linkEl.classList.add('active');
}
lastElement = linkEl;
})
};


document.querySelectorAll("#content h1, #content h2, #content h3").forEach(handleView);


sidebarContent.classList.remove("transparent");
}
</script>


</div>
</body>
</html>
35 changes: 35 additions & 0 deletions website/hugo-generated/articles/index.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Articles on MVFLow: a simple MVI library using Kotlin coroutines and flows</title>
<link>https://pedroql.github.io/mvflow/articles/</link>
<description>Recent content in Articles on MVFLow: a simple MVI library using Kotlin coroutines and flows</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Wed, 12 Aug 2020 10:52:15 +0100</lastBuildDate>

<atom:link href="https://pedroql.github.io/mvflow/articles/index.xml" rel="self" type="application/rss+xml" />


<item>
<title>Implementing Your View Actions Flow</title>
<link>https://pedroql.github.io/mvflow/implementing-your-view-actions-flow/</link>
<pubDate>Wed, 12 Aug 2020 10:52:15 +0100</pubDate>

<guid>https://pedroql.github.io/mvflow/implementing-your-view-actions-flow/</guid>
<description>&lt;h1 id=&#34;implementing-your-view-actions-flow&#34;&gt;Implementing your view actions flow&lt;/h1&gt;
&lt;p&gt;MVFlow defines the view interface as follows:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-kotlin&#34; data-lang=&#34;kotlin&#34;&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;interface&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;View&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;State&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;Action&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;

&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;fun&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;render&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;state&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;State&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt;

&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;fun&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;actions&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;():&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;Flow&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Action&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Most developers should have a reasonable idea of how to implement &lt;code&gt;render(state: State)&lt;/code&gt;, but implementing
&lt;code&gt;actions(): Flow&amp;lt;Action&amp;gt;&lt;/code&gt; might not seem so obvious if this is the first time you are implementing your own
&lt;a href=&#34;https://kotlinlang.org/docs/reference/coroutines/flow.html&#34;&gt;Flow&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We can suggest three different ways to implement this, each with different pros and cons.&lt;/p&gt;</description>
</item>

</channel>
</rss>
1 change: 1 addition & 0 deletions website/hugo-generated/articles/page/1/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>https://pedroql.github.io/mvflow/articles/</title><link rel="canonical" href="https://pedroql.github.io/mvflow/articles/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://pedroql.github.io/mvflow/articles/" /></head></html>
Loading

0 comments on commit 51f4fa9

Please sign in to comment.