This commit is contained in:
Can 2020-12-06 22:40:20 +03:00
parent ae44f9f5f7
commit 91b606d4be
15 changed files with 106 additions and 43 deletions

View File

@ -80,7 +80,7 @@ const Graph = ({ el, graphdata, current }) => {
} }
export const Network = ({ el, graphdata, current, router, allNodes }) => { export const Network = ({ el, graphdata, current, routeHandler, allNodes }) => {
var jsnx = require('jsnetworkx'); var jsnx = require('jsnetworkx');
@ -128,7 +128,8 @@ export const Network = ({ el, graphdata, current, router, allNodes }) => {
var currentTargetNames = currentRawEdges.map(ie => ie.data.target) var currentTargetNames = currentRawEdges.map(ie => ie.data.target)
var currentTargets = graphdata.filter(g => currentTargetNames.includes(g.data.id)) var currentTargets = graphdata.filter(g => currentTargetNames.includes(g.data.id))
othernodes = currentTargets.map(ct => [ct.data.id, {size:6, href:`/note/${ct.data.id}`}]) othernodes = currentTargets.map(ct => [ct.data.id, {size:6, href:`/note/${ct.data.id}`}])
othernodes = [indexnode, ...othernodes] if (current !== "index"){othernodes.push(indexnode)}
//othernodes = [indexnode, ...othernodes]
} }
@ -157,16 +158,17 @@ export const Network = ({ el, graphdata, current, router, allNodes }) => {
y:16, y:16,
click:function(l){ click:function(l){
this.addEventListener("click", function(){ this.addEventListener("click", function(){
router.push(l.data.href) routeHandler(l.data.href)
}) })
} }
}, },
weighted:true, weighted:true,
layoutAttr:{ layoutAttr:{
linkDistance:300, linkDistance:200,
linkStrength:1.5, linkStrength:1.5,
friction:0.5, friction:0.3,
charge:function(c){ return -80}, charge: -180,
//charge:function(c){ return -80},
}, },
nodeStyle: { nodeStyle: {
fill: function(d) { fill: function(d) {
@ -181,7 +183,7 @@ export const Network = ({ el, graphdata, current, router, allNodes }) => {
click:function(l){ click:function(l){
this.addEventListener("click", function(){ this.addEventListener("click", function(){
console.log("lll", l.data); console.log("lll", l.data);
router.push(l.data.href) routeHandler(l.data.href)
}) })
} }
}, },

View File

@ -50,6 +50,9 @@ export default function Layout({ children, home }) {
<main>{children}</main> <main>{children}</main>
<footer>
Created with
</footer>
</div> </div>
) )
} }

View File

@ -20,31 +20,34 @@ function pathSelector(filename, allFilePaths){
const postsDirectory = path.join(process.cwd(), 'posts') const postsDirectory = path.join(process.cwd(), 'posts')
export function getSinglePost(filename) { export function getSinglePost(filename) {
//console.log("\n\nFile is scanning: ", filename) console.log("\n\nFile is scanning: ", filename)
// List of filenames that will provide existing links to wikilink // List of filenames that will provide existing links to wikilink
var filePaths = Node.getFiles(postsDirectory) var filePaths = Node.getFiles(postsDirectory)
const fileNames = filePaths.map(f => Transformer.parseFileNameFromPath(f)) const fileNames = filePaths.map(f => Transformer.parseFileNameFromPath(f))
//console.log("\t filenames: ",fileNames, "\n")
// IF filename is not sidebar.md THEN Exclude sidebar.md from file list // IF filename is not sidebar.md THEN Exclude sidebar.md from file list
var currentFilePath; var currentFilePath;
if (filename === "sidebar"){ if (filename === "sidebar"){
//console.log(111)
currentFilePath = path.join(postsDirectory, "/sidebar.md") currentFilePath = path.join(postsDirectory, "/sidebar.md")
} }
else if (filename === "index"){ else if (filename === "index"){
//console.log(222)
currentFilePath = path.join(postsDirectory, "/index.md") currentFilePath = path.join(postsDirectory, "/index.md")
} }
else { else {
//console.log(333)
filePaths = filePaths.filter(f => !(f.endsWith("sidebar.md") && f.endsWith("index.md"))) filePaths = filePaths.filter(f => !(f.endsWith("sidebar.md") && f.endsWith("index.md")))
//console.log("\tDirectory is scanning to find corresponding filename") //console.log("\tDirectory is scanning to find corresponding filename")
currentFilePath = Transformer.pairCurrentFile(filename, filePaths) currentFilePath = Transformer.pairCurrentFile(filename, filePaths)
//console.log("\tScan is finished. Founded filepath", currentFilePath, "\n") //console.log("\tScan is finished. Founded filepath", currentFilePath, "\n")
} }
//console.log("currentFilePath: ", currentFilePath)
var fileContent = Node.readFileSync(currentFilePath) var fileContent = Node.readFileSync(currentFilePath)
//console.log("\tSearching any front matter data")
const currentFileFrontMatter = Transformer.getFrontMatterData(fileContent) const currentFileFrontMatter = Transformer.getFrontMatterData(fileContent)
//console.log("\tFounded front matter data: ", currentFileFrontMatter, "\n") //console.log("\tFounded front matter data: ", currentFileFrontMatter, "\n")
fileContent = Transformer.preprocessThreeDashes(fileContent) fileContent = Transformer.preprocessThreeDashes(fileContent)

View File

@ -143,7 +143,7 @@ export const Transformer = {
} }
return false return false
}) })
//console.log("p---", possibleFilePath) console.log("p---", possibleFilePath)
return possibleFilePath[0] return possibleFilePath[0]
} }
} }

View File

@ -5,7 +5,8 @@
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build",
"start": "next start" "start": "next start",
"deploy": "yarn build && git add . && git commit -m '...' && git push"
}, },
"dependencies": { "dependencies": {
"cytoscape-d3-force": "^1.1.4", "cytoscape-d3-force": "^1.1.4",

View File

@ -11,7 +11,9 @@ export default function Home({ content, graphdata, filenames, ...props }) {
//console.log("Index Page Props: ", content /* backlinks, filenames*/) //console.log("Index Page Props: ", content /* backlinks, filenames*/)
const ref = useRef(null); const ref = useRef(null);
const router = useRouter() const router = useRouter()
const routeQuery = router.query.id
const routeHandler = (r) => router.push(r)
//console.log("route", router)
//var G = jsnx.binomialGraph(filenames.length, 1) //var G = jsnx.binomialGraph(filenames.length, 1)
//var G = jsnx.completeGraph(filenames.length); //var G = jsnx.completeGraph(filenames.length);
useEffect(() => { useEffect(() => {
@ -21,7 +23,8 @@ export default function Home({ content, graphdata, filenames, ...props }) {
el:ref.current, el:ref.current,
graphdata, graphdata,
current:"index", current:"index",
router, routeQuery,
routeHandler,
allNodes:false // If true then shows every markdown file as node allNodes:false // If true then shows every markdown file as node
}) })
} }

View File

@ -18,12 +18,22 @@ export default function Home({ note, graphdata, ...props }) {
const ref = useRef(null); const ref = useRef(null);
const router = useRouter() const router = useRouter()
const routeQuery = router.query.id
const routeHandler = (r) => router.push(r)
//console.log("route", router)
var G; var G;
useEffect(() => { useEffect(() => {
if (ref && ref.current){ if (ref && ref.current){
G = Network({el:ref.current, graphdata, current:note.id, router, allNodes:false}) G = Network({
el:ref.current,
graphdata,
current:note.id,
routeHandler,
allNodes:false
})
} }
}, []) }, [routeQuery])
useEffect(() => { useEffect(() => {
if (backlinks.length > 0){ if (backlinks.length > 0){
@ -82,9 +92,9 @@ export async function getStaticPaths() {
}; };
} }
export async function getStaticProps({ params }) { export async function getStaticProps({ params }) {
//console.log("params1", params.id) console.log("params1", params.id)
const note = await getSinglePost(params.id); const note = await getSinglePost(params.id);
//console.log("params2", params) //console.log("params2", note)
const graphdata = getGraphData(); const graphdata = getGraphData();
//console.log("params3", params) //console.log("params3", params)

View File

@ -1 +1 @@
{"theme":"moonstone","pluginEnabledStatus":{"file-explorer":true,"global-search":true,"switcher":true,"graph":true,"backlink":true,"command-palette":true,"markdown-importer":true,"word-count":true,"open-with-default-app":true},"promptDelete":false,"showFrontmatter":false,"alwaysUpdateLinks":true} {"theme":"moonstone","pluginEnabledStatus":{"file-explorer":true,"global-search":true,"switcher":true,"graph":true,"backlink":true,"command-palette":true,"markdown-importer":true,"word-count":false,"open-with-default-app":true,"custom-css":true,"tag-pane":true,"page-preview":false,"daily-notes":true,"publish":true},"promptDelete":false,"showFrontmatter":false,"alwaysUpdateLinks":true,"strictLineBreaks":true,"foldHeading":true,"foldIndent":true,"defaultViewMode":"preview"}

1
posts/.obsidian/graph.json vendored Normal file
View File

@ -0,0 +1 @@
{"search":"","showTags":false,"showAttachments":false,"hideUnresolved":false,"showOrphans":true,"showArrow":false,"textFadeMultiplier":0,"nodeSizeMultiplier":1,"lineSizeMultiplier":1,"centerStrength":0.518713248970312,"repelStrength":10,"linkStrength":1,"linkDistance":250,"scale":0.6989606412938232}

View File

@ -6,12 +6,12 @@
{ {
"id": "ba2b426490a0a575", "id": "ba2b426490a0a575",
"type": "leaf", "type": "leaf",
"dimension": 47.43589743589743, "dimension": 45.24647887323944,
"active": true, "active": true,
"state": { "state": {
"type": "markdown", "type": "markdown",
"state": { "state": {
"file": "Code/Codesheet.md", "file": "sidebar.md",
"mode": "source" "mode": "source"
} }
}, },
@ -20,11 +20,11 @@
{ {
"id": "7aa82793eba6e4fb", "id": "7aa82793eba6e4fb",
"type": "leaf", "type": "leaf",
"dimension": 52.56410256410257, "dimension": 54.75352112676056,
"state": { "state": {
"type": "markdown", "type": "markdown",
"state": { "state": {
"file": "Code/Codesheet.md", "file": "sidebar.md",
"mode": "preview" "mode": "preview"
} }
}, },
@ -68,7 +68,7 @@
} }
], ],
"direction": "horizontal", "direction": "horizontal",
"width": 300 "width": 208.01218795776367
}, },
"right": { "right": {
"id": "6576f251ebe95476", "id": "6576f251ebe95476",
@ -84,7 +84,7 @@
"state": { "state": {
"type": "backlink", "type": "backlink",
"state": { "state": {
"file": "Code/Codesheet.md", "file": "sidebar.md",
"collapseAll": true, "collapseAll": true,
"extraContext": true, "extraContext": true,
"sortOrder": "alphabetical", "sortOrder": "alphabetical",
@ -92,6 +92,14 @@
"unlinkedCollapsed": false "unlinkedCollapsed": false
} }
} }
},
{
"id": "6ca348cc4fcdceca",
"type": "leaf",
"state": {
"type": "tag",
"state": {}
}
} }
] ]
} }
@ -101,15 +109,15 @@
"collapsed": true "collapsed": true
}, },
"lastOpenFiles": [ "lastOpenFiles": [
"Code/Codesheet.md",
"Code/WebFlow/WebFlow.md",
"index.md",
"notes-eng/checklists/Sell Checklist.md",
"articles-eng/Articles (ENG).md",
"articles-tr/Articles (TR).md",
"sidebar.md", "sidebar.md",
"notes-tr/Iyzico Gereklilikler.md", "index.md",
"articles-tr/Sidekick Browser.md", "articles-tr/Sidekick Browser.md",
"articles-tr/Obsidian.md" "articles-eng/Collaborative Filtering.md",
"articles-eng/Articles (ENG).md",
"notes-tr/Kirazın Tadı.md",
"notes-tr/metafizik.md",
"articles-tr/Arama Motoru Optimizasyonu.md",
"articles-eng/Confluence Installation.md",
"Code/Codesheet.md"
] ]
} }

View File

@ -2,6 +2,14 @@
title: "Blog Posts, Articles, Product Reviews" title: "Blog Posts, Articles, Product Reviews"
--- ---
## Articles written by me
Some articles that should be read later will come here.
[[Confluence Installation]]: Install self-hosted Atlassian Confluence on your host. In this way, you can use your own domain with Confluence. [[Confluence Installation]]: Install self-hosted Atlassian Confluence on your host. In this way, you can use your own domain with Confluence.
[[Collaborative Filtering]]: What is collaborative filtering? How does a simple recommendation engine makes good suggestions. [[Collaborative Filtering]]: What is collaborative filtering? How does a simple recommendation engine makes good suggestions.
## Articles
Some articles that should be read later will come here.
* Brian Dean's team analyzed 306 million keywords. [Here the findings](https://backlinko.com/google-keyword-study)

View File

@ -1,5 +1,5 @@
--- ---
title: "En İyi Blog Siteleri" title: "En iyi Blog Siteleri"
description: "Bir blog sitesi açarken dikkat edilmesi gerekenler ve en iyi blog sitelerinin incelendiği blog açmak isteyenlere öneriler yazısı." description: "Bir blog sitesi açarken dikkat edilmesi gerekenler ve en iyi blog sitelerinin incelendiği blog açmak isteyenlere öneriler yazısı."
canonical: "https://www.cbsofyalioglu.com/post/en-iyi-blog-siteleri/" canonical: "https://www.cbsofyalioglu.com/post/en-iyi-blog-siteleri/"
cover: "https://www.cbsofyalioglu.com/content/images/size/w1000/2020/09/blog-siteleri.jpg" cover: "https://www.cbsofyalioglu.com/content/images/size/w1000/2020/09/blog-siteleri.jpg"

View File

@ -6,7 +6,10 @@ This is my digital backroom. It is intended to be a personal public wiki page. I
## Quicklinks ## Quicklinks
* __[[Articles (TR)]]: Articles written in Turkish__. * __[[Articles (ENG)]]__: Articles written in English.
* __[[Codesheet]]__ : Code Snippets including Python, JS, CSS, HTML and Bash.
* __[[Articles (TR)]]__: Articles written in Turkish.
* * [[Sidekick Browser]]: Harikulade bir kullanıcı deneyimine sahip chromium tarayıcı. * * [[Sidekick Browser]]: Harikulade bir kullanıcı deneyimine sahip chromium tarayıcı.
* * [[TiddlyWiki]]: Çok işlevli bir not alma uygulaması olan Tiddlywiki hakkındaki incelemem. * * [[TiddlyWiki]]: Çok işlevli bir not alma uygulaması olan Tiddlywiki hakkındaki incelemem.
* * [[Zettelkasten Metodu]]: Zettelkasten metodu ile akıllı notlar nasıl alınır? * * [[Zettelkasten Metodu]]: Zettelkasten metodu ile akıllı notlar nasıl alınır?
@ -24,8 +27,7 @@ This is my digital backroom. It is intended to be a personal public wiki page. I
* [[Articles (ENG)]]: Articles written in English.
* [[Codesheet]] : Code Snippets including Python, JS, CSS, HTML and Bash.

View File

@ -0,0 +1,15 @@
Dostum selam, metafiziğe dair bilgim kısıtlı. Ancak birden çok anlama geliyor. Hatta zaman içerisinde anlamı değişiyor. Anlamın böyle zaman içerisinde değişmesine "semantik dönüşüme" uğramak deniyor.
Bildiğim kadarıyla Aristo zamanında fizik ötesi anlamına geliyor. Günümüzde toplum nezdinde, bilimsel metotlarla açıklanamayan örneğin beden gücü, görünmeyen varlıklar gibi şeylere metafizik denilse de, akademide daha çok ontoloji ile bir tutuluyor olabilir. Ontoloji varlık disiplini. Varlığın niteliğini inceliyor. Ama bilgim kısıtlı bu alanda. Ama şunu diyebilirim sanırım: Felsefe disiplini bağlamında ontoloji tüm varlığı inceleyen disiplindir. Buna varlığı fiziksel olan şeyler de dahil.
Metafizik denildiğinde bir de Kant'ın metafiziği çokça konuşulur. Gene hatırladığım kadarıyla ve kendi yorumumu katarak açıklayacağım. Kant varlıkları ikiye ayırıyor:
Fenomen ve numena (harf hataları olabilir). Fenomen dedikleri zaman ve mekana tabi olan, "şeylerin" bize nasıl gözüktüğüdür ya da Türkçesiyle onları nasıl duyumsadığımızdır.
Ancak bunlar bize hep bir pencere vasıtasıyla geliyor. Mesela gözümüz yalnızca belli bir dalga boyundaki ışığı görürken ışık spektrumunun büyük kısmını göremez. Mesela kızılötesi ışınları göremeyiz. Ya da bir yarasayı düşünelim. Önüne çıkan engelleri yaydığı ses dalgalarının geri dönüşüne göre algılıyor. E böyle olunca, aynı engel hem senin hem onun karşısına çıktığında aynı şey iki farklı fenomene dönüşür.
Peki o engel dediğimiz şey, bize gördüğümüz gibi gözüktü ama o şey kendiliğinde nasıl bir şeydir? İşte o "şeyin" "kendinde nasıl" olduğu, bizim fiziksel sınırlarımızın ötesinde kendinde ne olduğu ise "numen"dir.
Kant bu gibi hakiki soruları ve de algımızın ötesinde olan Tanrı'nın varlığını gibi konuları numen olarak tanımlar. Ancak bunları bilmemizin imkansız olduğunu dolayısıyla bunları konuşmanın bir faydası olmadığını söyler. Çünkü biz ancak zaman ve mekana bağlı şeyleri düşünebileceğimizi belirtir. Bu soruları zihnin sormasının çok normal olduğunu, ancak bir cevap alamayacağımızı belirtir. Şu örneği verir: Uçan bir kuş düşünün, bu kuş uçarken "Ah keşke şu hava sürtünmesi olmasa da daha rahat uçabilsem" diyebilir ancak bizatihi o hava sürtünmesi onun varlığını oluşturmasına sebep olmuştur. İnsan zihni için de bu böyledir. Bunları neden bilemiyoruz, keşke zaman ve mekana tabi olmayan şeyleri de anlayabilsek diyebiliriz ancan o bilememe gene bizim zaman ve mekan içerisinde varlığımızı mümkün kılmaktadır.
(Kant'ın bir Hristiyan olduğunu da not edelim buraya')

View File

@ -102,10 +102,11 @@ a {text-decoration: none;color:#333 !important}
width: 100%; width: 100%;
margin-top: 32px; margin-top: 32px;
margin-bottom:64px; margin-bottom:64px;
min-height:400px; min-height:300px;
background-color: #dcdbdf; background-color: #FFCDDC;
border-radius: 8px; border-radius: 8px;
box-shadow: 0 0px 4px -1px rgba(0, 0, 0, 0.9); border:2px solid #FF9E80;
box-shadow: 0 2px 8px 0px rgba(0, 0, 0, 0.0);
cursor: grab; cursor: grab;
} }
#side-graph-box { #side-graph-box {
@ -204,7 +205,7 @@ blockquote {
-ms-flex-align: start; -ms-flex-align: start;
align-items: flex-start; align-items: flex-start;
border-right: 1px solid #999; border-right: 1px solid #999;
background-color: #f5f6f8; background-color: #ECEBEE;
color: #222; color: #222;
} }
.sidebar div { width: 100%; padding: 32px 0;} .sidebar div { width: 100%; padding: 32px 0;}
@ -223,9 +224,11 @@ blockquote {
left: 250px; left: 250px;
z-index: 0; z-index: 0;
width: 100%; width: 100%;
max-width: 98%;
min-height: 100vh; min-height: 100vh;
padding: 32px 1vw; padding: 32px 1vw;
overflow-wrap: break-word; overflow-wrap: break-word;
background-color: #fcfcfc !important;
} }
main.parent-main {display: flex;flex-direction: column;align-items: center; } main.parent-main {display: flex;flex-direction: column;align-items: center; }
@ -288,8 +291,12 @@ main.parent-main {display: flex;flex-direction: column;align-items: center; }
padding-top:96px; padding-top:96px;
} }
.parent-main {max-width: calc(100% - 32px);}
.main { .main {
left: 0px; left: 16px;
/*
width:calc(100% - 32px);
*/
} }
.heading { .heading {