Compare commits

..

28 Commits

Author SHA1 Message Date
Ola Rubaj
a580c2dc0a [guide/index.md][xs]: headings adjstmts 2023-07-28 15:35:18 +02:00
Ola Rubaj
a997a956b5 [site/content][xs]: minor fixes 2023-07-28 15:33:26 +02:00
Ola Rubaj
540a84d3f7 [site/content][s]: list howtos on the guide home page 2023-07-28 15:27:17 +02:00
Ola Rubaj
178659c6fe [site/content][s]: mv some files 2023-07-28 15:03:06 +02:00
Ola Rubaj
d8dfa8b682 [site/content][s]: rm duplicate howtos 2023-07-28 15:01:58 +02:00
Ola Rubaj
907ef9cbd3 [site/content][s]: delete duplicate howtos 2023-07-28 14:52:28 +02:00
Ola Rubaj
a8e399c59f [content/blog][s]: mv howto on formatting a perfect blog post from
markdownbased repo
2023-07-28 14:46:52 +02:00
Ola Rubaj
e7b71ec5c4 [content/blog][s]: mv howto on adding images from markdownbased repo 2023-07-28 14:31:04 +02:00
Ola Rubaj
eb987e139e [blog/*][xs]: add authors and dates 2023-07-28 14:11:08 +02:00
Ola Rubaj
845b98cca3 [site/content/blog/quicly-create-a-sandbox-website][xs]: adjust wiki links 2023-07-28 14:01:08 +02:00
Ola Rubaj
365bb3dfd3 [site/content][s]: mv howto on editing a page with code editor to
obsidian from markdownbased repo
2023-07-28 14:01:08 +02:00
Ola Rubaj
59a01f0f6f [site/content][s]: mv howto on adding a simple md page from
markdownbased repo
2023-07-28 14:01:08 +02:00
Ola Rubaj
a491fef5d0 [site/content][s]: mv howto on quickly creating a sandbox website from
markdownbased repo
2023-07-28 14:01:08 +02:00
Ola Rubaj
af0bc9da58 [site/content][s]: mv howto on editing and adding md pages locally from
markdownbased repo
2023-07-28 14:01:08 +02:00
Ola Rubaj
0b123a04ca [site/content][s]: mv howto on publishing obsidian vault to gh from
markdownbased repo
2023-07-28 14:01:08 +02:00
Ola Rubaj
0e2e2221fd [site/content][s]: mv howto on editing text on a single md page to blog
from markdownbased repo
2023-07-27 17:52:24 +02:00
Luccas Mateus de Medeiros Gomes
da226ef205 Merge branch 'main' of github.com:datopian/portaljs 2023-07-21 07:43:38 -03:00
Luccas Mateus de Medeiros Gomes
a37a31f89a [lighthouse][xs] - try ga lazyOnload 2023-07-21 07:42:36 -03:00
Luccas Mateus
06209877ea Lighthouse improvements (#990)
* [site][lighthouse] - increate accessibility

* [site][xs] - fix accessbiility
2023-07-20 11:11:07 -03:00
Luccas Mateus
822a3ce5ec [site][lighthouse] - increate accessibility (#989) 2023-07-20 10:17:24 -03:00
João Demenech
1f06c67d13 [site, blog][xs]: Fix order of authors on a post 2023-07-19 16:17:56 -03:00
João Demenech
9dea140859 SEO Improvements (#983)
* [site,seo][xs]: add custom _document with lang prop, add description to meta tags, make title larger

* [site,seo][xs]: add apple touch icon, add alt props to images

* [site,seo][xs]: add icon to default seo

* [site,seo][s]: implement next-sitemap

* [site,seo][s]: review page titles

* Rebuild package-lock.json files

* Regenerate package-lock
2023-07-19 07:23:06 -03:00
João Demenech
d5899b22ab [site,blog][xs]: Fix typo 2023-07-18 15:23:14 -03:00
João Demenech
dc895ed277 Merge pull request #984 from datopian/feature/maps-blog-post
[site]: Create new blog post about maps
2023-07-18 15:19:01 -03:00
João Demenech
7315df8a86 [site,blog][m]: create new blog post about maps 2023-07-18 14:08:33 -03:00
João Demenech
349f5bea66 Merge pull request #982 from datopian/lighthouse-improvements
[site][m] - improvements to lighthouse score
2023-07-17 15:04:25 -03:00
João Demenech
6aef860a81 Merge pull request #981 from datopian/changeset-release/main
Version Packages
2023-07-17 14:51:08 -03:00
github-actions[bot]
1a22e54d5b Version Packages 2023-07-17 17:41:23 +00:00
35 changed files with 308 additions and 56 deletions

View File

@@ -1,5 +0,0 @@
---
'@portaljs/components': patch
---
Fix missing CSS styles for PDF component

2
package-lock.json generated
View File

@@ -40048,7 +40048,7 @@
}, },
"packages/components": { "packages/components": {
"name": "@portaljs/components", "name": "@portaljs/components",
"version": "0.2.0", "version": "0.3.1",
"dependencies": { "dependencies": {
"@githubocto/flat-ui": "^0.14.1", "@githubocto/flat-ui": "^0.14.1",
"@heroicons/react": "^2.0.17", "@heroicons/react": "^2.0.17",

View File

@@ -1,6 +1,8 @@
{ {
"name": "portaljs", "name": "portaljs",
"workspaces": ["./packages/*"], "workspaces": [
"./packages/*"
],
"version": "0.0.0", "version": "0.0.0",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {

View File

@@ -1,5 +1,11 @@
# @portaljs/components # @portaljs/components
## 0.3.1
### Patch Changes
- [#980](https://github.com/datopian/portaljs/pull/980) [`38738525`](https://github.com/datopian/portaljs/commit/3873852567b1aab4827a716bd588bd5de3223e2b) Thanks [@demenech](https://github.com/demenech)! - Fix missing CSS styles for PDF component
## 0.3.0 ## 0.3.0
### Minor Changes ### Minor Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@portaljs/components", "name": "@portaljs/components",
"version": "0.3.0", "version": "0.3.1",
"type": "module", "type": "module",
"description": "https://portaljs.org", "description": "https://portaljs.org",
"keywords": [ "keywords": [

5
site/.gitignore vendored
View File

@@ -35,3 +35,8 @@ yarn-error.log*
# markdowndb # markdowndb
markdown.db markdown.db
# seo
robots.txt
sitemap-0.xml
sitemap.xml

View File

@@ -58,7 +58,7 @@ export default function Features() {
> >
<div className="absolute -inset-px rounded-xl border-2 border-transparent opacity-0 [background:linear-gradient(var(--quick-links-hover-bg,theme(colors.sky.50)),var(--quick-links-hover-bg,theme(colors.sky.50)))_padding-box,linear-gradient(to_top,theme(colors.blue.300),theme(colors.blue.400),theme(colors.blue.500))_border-box] group-hover:opacity-100 dark:[--quick-links-hover-bg:theme(colors.slate.800)]" /> <div className="absolute -inset-px rounded-xl border-2 border-transparent opacity-0 [background:linear-gradient(var(--quick-links-hover-bg,theme(colors.sky.50)),var(--quick-links-hover-bg,theme(colors.sky.50)))_padding-box,linear-gradient(to_top,theme(colors.blue.300),theme(colors.blue.400),theme(colors.blue.500))_border-box] group-hover:opacity-100 dark:[--quick-links-hover-bg:theme(colors.slate.800)]" />
<div className="relative overflow-hidden rounded-xl p-6"> <div className="relative overflow-hidden rounded-xl p-6">
<img src={feature.icon} alt="" className="h-24 w-auto" /> <img src={feature.icon} alt={feature.title} className="h-24 w-auto" />
<h2 className="mt-4 font-display text-base text-primary dark:text-primary-dark"> <h2 className="mt-4 font-display text-base text-primary dark:text-primary-dark">
<span className="absolute -inset-px rounded-xl" /> <span className="absolute -inset-px rounded-xl" />
{feature.title} {feature.title}

View File

@@ -12,7 +12,6 @@ export default function MDXPage({ source, frontMatter }) {
return <LayoutComponent {...frontMatter}>{children}</LayoutComponent>; return <LayoutComponent {...frontMatter}>{children}</LayoutComponent>;
}; };
return ( return (
<Layout> <Layout>
<MDXRemote {...source} components={{ DocsPagination, NextSeo, Hero }} /> <MDXRemote {...source} components={{ DocsPagination, NextSeo, Hero }} />

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 KiB

View File

@@ -0,0 +1,64 @@
---
title: 'Enhancing Geospatial Data Visualization with PortalJS'
date: 2023-07-18
authors: ['João Demenech', 'Luccas Mateus', 'Yoana Popova']
filetype: 'blog'
---
Are you keen on building rich and interactive data portals? Do you find value in the power and flexibility of JavaScript, Nextjs, and React? In that case, allow us to introduce you to [PortalJS](https://portaljs.org/), a state-of-the-art framework leveraging these technologies to help you build amazing data portals.
Perhaps you already understand that the effective data visualization lies in the adept utilization of various data components. Within [PortalJS](https://portaljs.org/), we take data visualization a step further. It's not just about displaying data - it's about telling a captivating story through the strategic orchestration of a diverse array of data components.
We are now eager to share our latest enhancement to [PortalJS](https://portaljs.org/): maps, a powerful tool for visualizing geospatial data. In this post, we will to take you on a tour of our experiments and progress in enhancing map functionalities on [PortalJS](https://portaljs.org/). Our journey into this innovative feature is still in its early stages, with new facets being unveiled and refined as we perfect our API. Still, this exciting development opens a new avenue for visualizing data, enhancing your ability to convey complex geospatial information with clarity and precision.
## Exploring Map Formats
Maps play a crucial role in geospatial data visualization. Several formats exist for storing and sharing this type of data, with GeoJSON, KML, and shapefiles being among the most popular. As a prominent figure in the field of open-source data portal platforms, [PortalJS](https://portaljs.org/) strives to support as many map formats as possible.
Taking inspiration from the ckanext-geoview extension, we currently support KML and GeoJSON formats in [PortalJS](https://portaljs.org/). This remarkable extension is a plugin for CKAN, the worlds leading open source data management system, that enables users to visualize geospatial data in diverse formats on an interactive map. Apart from KML and GeoJSON formats support, our roadmap entails extending compatibility to encompass all other formats supported by ckanext-geoview. Rest assured, we are committed to empowering users with a wide array of map format options in the future.
So, what makes these formats special?
- **GeoJSON**: This format uses JSON to depict simple geographic features and their associated attributes. It's often hailed as the most popular choice in the field.
- **KML**: An XML-based format, KML can store details like placemarks, paths, polygons, and styles.
- **Shapefiles**: These are file collections that store vector data—points, lines, and polygons—and their attributes.
## Unveiling the Power of Leaflet and OpenLayers
To display maps in [PortalJS](https://portaljs.org/), we utilize two powerful JavaScript libraries for creating interactive maps based on different layers: Leaflet and OpenLayers. Each offers distinct advantages (and disadvantages), inspiring us to integrate both and give users the flexibility to choose.
Leaflet is the leading open-source JavaScript library known for its mobile-friendly, interactive maps. With its compact size (just 42 KB of JS), it provides all the map features most developers need. Leaflet is designed with simplicity, performance and usability in mind. It works efficiently across all major desktop and mobile platforms.
OpenLayers is a high-performance library packed with features for creating interactive web maps. OpenLayers can display map tiles, vector data, and markers sourced from anywhere on any webpage. It's an excellent tool for leveraging geographic information of all kinds.
## Introducing Map Feature
Both components have some similar features and props, such as:
### Polygons and points
![Map with polygons and points](/assets/blog/2023-07-18-map-polygons-and-points.png)
Our initial version enables the use of both vectors and points to display information. Points are simpler and faster to render than vectors, but they have less detail and interactivity. For example, if you have data that is represented by coordinates or addresses, you can use points to show them on the map. This way, you can avoid time-consuming loading and rendering complex vector shapes that may slow down your map.
### Tooltips
![Map with tooltips](/assets/blog/2023-07-18-map-tooltips.png)
We have implemented an exciting feature that enhances the usability of our map component: tooltips. When you hover over a polygon or point on the map, a small pop-up window, known as a tooltip, appears. This tooltip provides relevant details about the feature under your cursor, according to what features the map creator wants to highlight. For example, when exploring countries, you can effortlessly discover their name, population, and area by hovering over them. Similarly, hovering over cities reveals useful information like their name, temperature, and elevation. To enable this handy tooltip functionality on our map, simply include a tooltip prop when using the map component.
### Focus
![Map with polygons over a region](/assets/blog/2023-07-18-map-polygons-on-region.png)
Users can also choose a region of focus, which will depend on the data, by setting initial center coordinates and zoom level. This is especially helpful for maps that are not global, such as the ones that use data from a specific country, city or region.
## Mapping the Future with PortalJS
Through our ongoing enhancements to the [PortalJS library](https://storybook.portaljs.org/), we aim to empower users to create engaging and informative data portals featuring diverse map formats and data components.
Why not give [PortalJS](https://portaljs.org/) a try today and discover the possibilities for your own data portals? To get started, check out our comprehensive documentation here: [PortalJS Documentation](https://portaljs.org/docs).
Have questions or comments about using [PortalJS](https://portaljs.org/) for your data portals? Feel free to share your thoughts on our [Discord channel](https://discord.com/invite/EeyfGrGu4U). We're here to help you make the most of your data.
Stay tuned for more exciting developments as we continue to enhance [PortalJS](https://portaljs.org/)!

View File

@@ -1,7 +1,7 @@
const config = { const config = {
title: 'PortalJS', title: 'PortalJS - The JavaScript framework for data portals.',
description: description:
'PortalJS is a framework for rapidly building rich data portal frontends using a modern frontend approach. PortalJS can be used to present a single dataset or build a full-scale data catalog/portal.', 'PortalJS is a framework for rapidly building rich data portal frontends using a modern frontend approach.',
theme: { theme: {
default: 'dark', default: 'dark',
toggleIcon: '/images/theme-button.svg', toggleIcon: '/images/theme-button.svg',
@@ -36,6 +36,10 @@ const config = {
], ],
footerLinks: [], footerLinks: [],
nextSeo: { nextSeo: {
additionalLinkTags: [
{ rel: 'icon', href: '/favicon.ico' },
{ rel: 'apple-touch-icon', href: '/icon.png', sizes: '120x120' },
],
openGraph: { openGraph: {
type: 'website', type: 'website',
title: title:

View File

@@ -1,11 +1,15 @@
--- ---
showToc: false showToc: false
showSidebar: false showSidebar: false
title: 'Markdown-based Websites Guide'
disableTitle: true
--- ---
<Hero title="Markdown-based Websites" subtitle="Create markdown-based website, update it, add collaborators and discover markdown superpowers" /> <Hero title="Markdown-based Websites" subtitle="Create markdown-based website, update it, add collaborators and discover markdown superpowers" />
# Tutorial 1: Create a website from scratch using markdown and PortalJS ## Tutorials
### Tutorial 1: Create a website from scratch using markdown and PortalJS
In this tutorial we will walk you through creating an elegant, fully functional website written in simple markdown and published with PortalJS. In this tutorial we will walk you through creating an elegant, fully functional website written in simple markdown and published with PortalJS.
@@ -17,7 +21,7 @@ By the end of this tutorial you will:
Below is a screenshot of how the final website will look like: Below is a screenshot of how the final website will look like:
![[tutorial-1-result.png]] ![[tutorial-1-result.png]]
### Setup a sandbox website including live publishing #### Setup a sandbox website including live publishing
- Prerequisites: sign up for GitHub and Vercel - Prerequisites: sign up for GitHub and Vercel
- Navigate to [datopian/flowershow repository](https://github.com/datopian/flowershow) - Navigate to [datopian/flowershow repository](https://github.com/datopian/flowershow)
@@ -25,14 +29,14 @@ Below is a screenshot of how the final website will look like:
- Let the site build on Vercel - Let the site build on Vercel
- Visit the site! Yay! Your site is working! 🎉 - Visit the site! Yay! Your site is working! 🎉
### Now, let's edit the front page #### Now, let's edit the front page
- Navigate to `content/index.md` file in the site repository - Navigate to `content/index.md` file in the site repository
- Add some text to it - Add some text to it
- Save and watch the site redeploy - Save and watch the site redeploy
- Visit the site! Yay! Your changes are live! 🎉 - Visit the site! Yay! Your changes are live! 🎉
### Let's add a page: e.g. about page #### Let's add a page: e.g. about page
- Navigate to the `content` folder in the site repository - Navigate to the `content` folder in the site repository
- Add `about.md` file with some text - Add `about.md` file with some text
@@ -42,7 +46,7 @@ Below is a screenshot of how the final website will look like:
> [!tip] > [!tip]
> Read full tutorial [[create-a-website-from-scratch|here!]] > Read full tutorial [[create-a-website-from-scratch|here!]]
# Tutorial 2: Editing your site locally on your computer ### Tutorial 2: Editing your site locally on your computer
In this tutorial, we will walk you through the process of editing your Flowershow website locally on your computer. In this tutorial, we will walk you through the process of editing your Flowershow website locally on your computer.
@@ -58,20 +62,20 @@ Below is a screenshot of how the final website will look like:
![[tutorial-2-result.png]] ![[tutorial-2-result.png]]
### Clone the repository to your computer #### Clone the repository to your computer
- Setup GitHub Desktop app with your GitHub account - Setup GitHub Desktop app with your GitHub account
- Grab your site's repository URL - Grab your site's repository URL
- Open GitHub Desktop app and clone the repository - Open GitHub Desktop app and clone the repository
- Yay! You have a copy of your website's repository on your computer! 🎉 - Yay! You have a copy of your website's repository on your computer! 🎉
### Now, let's edit in Obsidian #### Now, let's edit in Obsidian
- Open the `/content` folder of the cloned repository in Obsidian - Open the `/content` folder of the cloned repository in Obsidian
- Edit the home page and the about page - Edit the home page and the about page
- Create a folder with the reviews of books you've read - Create a folder with the reviews of books you've read
### Commit your changes #### Commit your changes
- Commit the changes in GitHub Desktop app - Commit the changes in GitHub Desktop app
- Push the changes to the remote repository - Push the changes to the remote repository
@@ -80,3 +84,13 @@ Below is a screenshot of how the final website will look like:
> [!tip] > [!tip]
> Read full tutorial [[edit-a-website-locally|here!]] > Read full tutorial [[edit-a-website-locally|here!]]
## Howtos
- [[quickly-create-a-sandbox-website|How to quickly create a sandbox website]]
- [[edit-text-on-a-single-md-page|How to quickly edit text on a single Markdown-based page]]
- [[add-a-simple-md-page|How to add a simple Markdown page]]
- [[edit-or-add-md-pages-locally|How to edit or add Markdown-based pages locally on your computer]]
- [[how-to-add-images-to-a-md-page|How to add images to a Markdown-based page]]
- [[publish-obsidian-vault-to-github|How to push an Obsidian vault to a GitHub repository]]
- [[create-a-simple-catalog-of-anything|How to create a simple catalog of anything in Obsidian]]

View File

@@ -1,8 +1,11 @@
--- ---
title: How to quickly add a simple Markdown-based page title: How to quickly add a simple Markdown-based page
date: 2023-07-27
authors: ['Lauren Wigmore', 'Ola Rubaj']
filetype: 'blog'
--- ---
Welcome to this tutorial on how to quickly add a simple Markdown-based page to your website. The steps here are designed for non-technical contributors. There's no need to know how to code! Welcome to this howto on how to quickly add a simple Markdown-based page to your website. The steps here are designed for non-technical contributors. There's no need to know how to code!
> [!important] > [!important]
> This "How to" is only recommended for very simple Markdown pages, e.g. those without images, links to other pages, diagrams, or other elements that can't be previewed in GitHub preview mode. > This "How to" is only recommended for very simple Markdown pages, e.g. those without images, links to other pages, diagrams, or other elements that can't be previewed in GitHub preview mode.
@@ -22,8 +25,8 @@ Welcome to this tutorial on how to quickly add a simple Markdown-based page to y
5. Paste or write the contents of the file in Markdown format. 5. Paste or write the contents of the file in Markdown format.
6. (Optionally) Switch to the "Preview" mode, by toggling from "Edit" -> "Preview" at the top of the file content, to see a rough visualisation of your changes. Keep in mind though, that the actual website may have different styling and may support additional Markdown elements that GitHub doesn't render on the preview. 6. (Optionally) Switch to the "Preview" mode, by toggling from "Edit" -> "Preview" at the top of the file content, to see a rough visualisation of your changes. Keep in mind though, that the actual website may have different styling and may support additional Markdown elements that GitHub doesn't render on the preview.
5. When you're happy with the content, click on the “Commit changes...” button. In the "Commit message" field, provide a concise summary of your changes. If necessary, you can add further explanation in the "Extended description" text field. Then select “Commit directly to the main branch”, and hit "Commit changes." 7. When you're happy with the content, click on the “Commit changes...” button. In the "Commit message" field, provide a concise summary of your changes. If necessary, you can add further explanation in the "Extended description" text field. Then select “Commit directly to the main branch”, and hit "Commit changes."
6. The site is now going to be rebuilt to reflect the changes saved to the `main` branch. This can take up to a few minutes. After this time you should see your page live. 8. The site is now going to be rebuilt to reflect the changes saved to the `main` branch. This can take up to a few minutes. After this time you should see your page live.
## Summary ## Summary

View File

@@ -3,13 +3,6 @@ title: How to add or edit content on the Life Itself ecosystem page
isDraft: true isDraft: true
--- ---
## Contents
1. [Introduction](#introduction)
2. [How to edit and add to the site](#how-to-edit-and-add-to-the-site)
3. [Glossary](#glossary)
4. [Contact](#contact)
## Introduction ## Introduction
From the outset, we have argued that any successful mapping effort must be collaborative and participatory. To make it as simple as possible to contribute, we have opened up the site, giving it a wiki-like structure, meaning people can contribute and add items directly - no coding required. We hope this can support the ongoing growth of our contributor community, and empower users to continue in collective efforts to make the map ever more useful and informative. From the outset, we have argued that any successful mapping effort must be collaborative and participatory. To make it as simple as possible to contribute, we have opened up the site, giving it a wiki-like structure, meaning people can contribute and add items directly - no coding required. We hope this can support the ongoing growth of our contributor community, and empower users to continue in collective efforts to make the map ever more useful and informative.

View File

@@ -1,5 +1,8 @@
--- ---
title: "How to edit a page with a code editor or Obsidian" title: 'How to edit a page with a code editor or Obsidian'
date: 2023-07-27
authors: ['Jake Hirsch', 'Ola Rubaj']
filetype: 'blog'
isDraft: true isDraft: true
--- ---

View File

@@ -1,5 +1,8 @@
--- ---
title: How to edit or add Markdown-based pages locally on your computer title: How to edit or add Markdown-based pages locally on your computer
date: 2023-07-27
authors: ['Jake Hirsch', 'Ola Rubaj']
filetype: 'blog'
--- ---
## Intro ## Intro

View File

@@ -1,5 +1,8 @@
--- ---
title: How to quickly edit text content on a single Markdown-based page title: How to quickly edit text on a single Markdown-based page
date: 2023-07-27
authors: ['Ola Rubaj']
filetype: 'blog'
--- ---
Welcome to this tutorial on how to quickly edit text content on a single Markdown-based page. The steps here are designed for non-technical contributors. There's no need to know how to code! Welcome to this tutorial on how to quickly edit text content on a single Markdown-based page. The steps here are designed for non-technical contributors. There's no need to know how to code!

View File

@@ -0,0 +1,45 @@
---
title: How to add images to a Markdown-based page
date: 2023-07-27
authors: ['Jake Hirsch', 'Ola Rubaj']
filetype: 'blog'
---
## Intro
Here, you will learn how to add images to a Markdown-based page. These instructions show how to add these images locally, on your computer, so first you need to know how to work locally with GitHub Desktop app and Obsidian. If you're new to these tools, we recommend reading this howto first:
- [[blog/edit-or-add-md-pages-locally|How to edit or add Markdown pages locally]]
Or you can follow these two tutorials to start from scratch:
- [[create-a-website-from-scratch|Tutorial 1: Create a Markdown based website from scratch]]
- [[edit-a-website-locally|Tutorial 2: Edit your website locally on your computer]]
## Prerequisites
- A GitHub account
- A GitHub Desktop app
- Obsidian
## Steps
### Step 1: Set the assets folder as an attachment folder
In Obsidian, in the root of your vault, create a new folder called 'assets'. Then, right click on and select "set as attachment folder". By doing so, all the images you paste into your note will automatically be saved to this folder (instead of being saved to the root, next to all your notes). This is necessary for your website to display embedded images.
### Step 2: Copy and paste your image
Copy whichever image you would like to add and paste it directly into your Obsidian note. You can check that it has been saved to the "assets" folder.
### Step 3: Commit and push
To learn more about this step, see the howto or the tutorials listed in the intro section.
## Summary
Congratulations, you've now learned how to add an image to your Markdown page!
If anything is not clear to you, or you have suggestions on how we can make this 'How to' better, please don't hesitate to let us know.
Happy editing!

View File

@@ -0,0 +1,33 @@
---
title: How to format a perfect Markdown-based page
date: 2023-07-27
authors: ['Lauren Wigmore', 'Ola Rubaj']
filetype: 'blog'
isDraft: true
---
Welcome to this information guide to help you understand how to format the perfect Markdown-based page for your website. The information here is designed to give you an overview.
## Types of Markdown Styles
There are three types of Markdown options that are supported by Flowershow.
- CommonMark
- GitHub Flavored Markdown (GFM) - a superset of CommonMark
- Obsidian Flavored Markdown - a superset of CommonMark with most GFM functionalities plus its own syntax elements, such as wikilinks, callouts, LaTeX, mermaid diagrams, and more.
Each one has extra functionalities building on top of the previous Markdown option.
Flowershow aims to be fully Obsidian compatible since it supports most Obsidian Flavored Markdown syntax elements and therefore, it is the best to use as an editor.
## Useful Links
It would be too complicated (and long) to explain all of the formatting aspects here, so we have included the links below to provide you with this information and more!
[Flowershow Documents Page](https://flowershow.app/docs/syntax) - Use this page to see all of the useful key elements that are frequently required on Flowershow pages.
[Obsidian help pages](https://help.obsidian.md/Editing+and+formatting/Obsidian+Flavored+Markdown) - Use this to get more information on Obsidian's supported syntax
[GFM cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) - Use this as a quick guide to using Markdown for Github
## Other useful pages
[How to quickly add a simple Markdown-based page](https://guide.portaljs.org/guides/add-a-simple-md-page)
[How to quickly edit text content on a single Markdown-based page](https://guide.portaljs.org/guides/edit-text-on-a-single-md-page)

View File

@@ -1,4 +1,6 @@
# Guides and tutorials ---
title: Guides and Tutorials
---
- [[howtos/analytics|How to add web analytics?]] - [[howtos/analytics|How to add web analytics?]]
- [[howtos/seo|How to customize page metadata for SEO?]] - [[howtos/seo|How to customize page metadata for SEO?]]

View File

@@ -1,5 +1,8 @@
--- ---
title: How to push an Obsidian vault to a GitHub repository title: How to push an Obsidian vault to a GitHub repository
date: 2023-07-27
authors: ['Jake Hirsch', 'Ola Rubaj']
filetype: 'blog'
--- ---
This howto walks you through the process of setting up your Obsidian vault as a GitHub repository. Here are some of the benefits of doing so: This howto walks you through the process of setting up your Obsidian vault as a GitHub repository. Here are some of the benefits of doing so:
@@ -34,7 +37,7 @@ In this howto, we will use the GitHub Desktop application, an easy-to-use interf
2.6. Add an optional description. 2.6. Add an optional description.
2.7. Make sure the checkbox "Initialize this repository with a README" is unchecked, and "Git Ignore" and "License" are set to "None". 2.7. Make sure the checkbox "Initialise this repository with a README" is unchecked, and "Git Ignore" and "License" are set to "None".
2.8. Click on "Create Repository". 2.8. Click on "Create Repository".

View File

@@ -1,5 +1,8 @@
--- ---
title: How to quickly create a sandbox website title: How to quickly create a sandbox website
date: 2023-07-27
authors: ['Lauren Wigmore', 'Ola Rubaj']
filetype: 'blog'
--- ---
By the end of this guide you will have a working markdown site you can edit, which gets published automatically online 🎉 By the end of this guide you will have a working markdown site you can edit, which gets published automatically online 🎉
@@ -22,13 +25,8 @@ The website will then be deployed. This takes approximately 1 minute.
Once you are on the Congratulations screen, click on the preview of your sandbox website to see the live/published version. Once you are on the Congratulations screen, click on the preview of your sandbox website to see the live/published version.
For instructions on how to add and edit pages, we recommend these tutorials: For instructions on how to add and edit pages, we recommend these howtos:
- [[edit-a-page-with-code-editor-or-obsidian|How to edit text content on a single Markdown-based page]] - [[howtos/add-a-simple-md-page|How to add a simple markdown page]]
- [[add-a-simple-md-page|How to add a simple Markdown-based page]] - [[howtos/edit-text-on-a-single-md-page|How to edit text on a single markdown-based page]]
- [[howtos/edit-or-add-md-pages-locally|How to edit or add a markdown page locally on your computer]]
Here are some other links Vercel links that might be useful for you:
- [Dashboard Features Overview](https://vercel.com/docs/concepts/dashboard-features/overview)
- [Dashboard Features](https://vercel.com/docs/concepts/dashboard-features)
- [Projects](https://vercel.com/docs/concepts/projects/project-dashboard)

View File

@@ -1,5 +1,6 @@
--- ---
title: "Why use these tools to create a catalog?" title: "Why use these tools to create a catalog?"
isDraft: true
--- ---
On this site, we offer a “recipe” which uses a combination of free tools to easily create a directory of information that can be used for multiple purposes. With this method, you can start capturing information quickly and intuitively in a format that is flexible and usable later for various needs. Why does this help us? Because to map information to collect, organise, structure, and classify it and present it clearly is a way to make more sense of it and therefore of the world around us. On this site, we offer a “recipe” which uses a combination of free tools to easily create a directory of information that can be used for multiple purposes. With this method, you can start capturing information quickly and intuitively in a format that is flexible and usable later for various needs. Why does this help us? Because to map information to collect, organise, structure, and classify it and present it clearly is a way to make more sense of it and therefore of the world around us.

View File

@@ -6,7 +6,7 @@ export default function DefaultLayout({ children, ...frontMatter }) {
{/* Default layout */} {/* Default layout */}
{!frontMatter.layout && ( {!frontMatter.layout && (
<> <>
<h1>{frontMatter.title}</h1> {!frontMatter.disableTitle && <h1>{frontMatter.title}</h1>}
{frontMatter.author && ( {frontMatter.author && (
<div className="-mt-6"> <div className="-mt-6">
<p className="opacity-60 pl-1">{frontMatter.author}</p> <p className="opacity-60 pl-1">{frontMatter.author}</p>

View File

@@ -13,7 +13,7 @@ export const DocsLayout: React.FC<any> = ({ children, ...frontMatter }) => {
<time dateTime={created}>{formatDate(created)}</time> <time dateTime={created}>{formatDate(created)}</time>
</p> </p>
)} )}
{title && <h1>{title}</h1>} {!frontMatter.disableTitle && title && <h1>{title}</h1>}
</div> </div>
</header> </header>
<section>{children}</section> <section>{children}</section>

View File

@@ -0,0 +1,5 @@
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: process.env.SITE_URL || 'https://portaljs.org',
generateRobotsTxt: true,
}

49
site/package-lock.json generated
View File

@@ -50,6 +50,7 @@
"devDependencies": { "devDependencies": {
"@tailwindcss/typography": "^0.5.9", "@tailwindcss/typography": "^0.5.9",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.14",
"next-sitemap": "^4.1.8",
"postcss": "^8.4.22", "postcss": "^8.4.22",
"prettier": "^2.8.7", "prettier": "^2.8.7",
"remark": "^14.0.2", "remark": "^14.0.2",
@@ -229,6 +230,12 @@
"resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-6.0.2.tgz", "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-6.0.2.tgz",
"integrity": "sha512-Tbsj02wXCbqGmzdnXNk0SOF19ChhRU70BsroIi4Pm6Ehp56in6vch94mfbdQ17DozxkL3BAVjbZ4Qc1a0HFRAg==" "integrity": "sha512-Tbsj02wXCbqGmzdnXNk0SOF19ChhRU70BsroIi4Pm6Ehp56in6vch94mfbdQ17DozxkL3BAVjbZ4Qc1a0HFRAg=="
}, },
"node_modules/@corex/deepmerge": {
"version": "4.0.43",
"resolved": "https://registry.npmjs.org/@corex/deepmerge/-/deepmerge-4.0.43.tgz",
"integrity": "sha512-N8uEMrMPL0cu/bdboEWpQYb/0i2K5Qn8eCsxzOmxSggJbbQte7ljMRoXm917AbntqTGOzdTu+vP3KOOzoC70HQ==",
"dev": true
},
"node_modules/@docsearch/css": { "node_modules/@docsearch/css": {
"version": "3.5.0", "version": "3.5.0",
"resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.5.0.tgz", "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.5.0.tgz",
@@ -7087,6 +7094,15 @@
"node": "*" "node": "*"
} }
}, },
"node_modules/minimist": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
"dev": true,
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/minipass": { "node_modules/minipass": {
"version": "3.3.6", "version": "3.3.6",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
@@ -7330,6 +7346,39 @@
"react-dom": ">=16.0.0" "react-dom": ">=16.0.0"
} }
}, },
"node_modules/next-sitemap": {
"version": "4.1.8",
"resolved": "https://registry.npmjs.org/next-sitemap/-/next-sitemap-4.1.8.tgz",
"integrity": "sha512-XAXpBHX4o89JfMgvrm0zimlZwpu2iBPXHpimJMUrqOZSc4C2oB1Lv89mxuVON9IE8HOezaM+w4GjJxcYCuGPTQ==",
"dev": true,
"funding": [
{
"url": "https://github.com/iamvishnusankar/next-sitemap.git"
}
],
"dependencies": {
"@corex/deepmerge": "^4.0.43",
"@next/env": "^13.4.3",
"fast-glob": "^3.2.12",
"minimist": "^1.2.8"
},
"bin": {
"next-sitemap": "bin/next-sitemap.mjs",
"next-sitemap-cjs": "bin/next-sitemap.cjs"
},
"engines": {
"node": ">=14.18"
},
"peerDependencies": {
"next": "*"
}
},
"node_modules/next-sitemap/node_modules/@next/env": {
"version": "13.4.10",
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.4.10.tgz",
"integrity": "sha512-3G1yD/XKTSLdihyDSa8JEsaWOELY+OWe08o0LUYzfuHp1zHDA8SObQlzKt+v+wrkkPcnPweoLH1ImZeUa0A1NQ==",
"dev": true
},
"node_modules/next-themes": { "node_modules/next-themes": {
"version": "0.2.1", "version": "0.2.1",
"resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.2.1.tgz", "resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.2.1.tgz",

View File

@@ -6,6 +6,7 @@
"dev": "npm run mddb && next dev", "dev": "npm run mddb && next dev",
"build": "next build", "build": "next build",
"prebuild": "npm run mddb && node ./scripts/fix-symlinks.mjs", "prebuild": "npm run mddb && node ./scripts/fix-symlinks.mjs",
"postbuild": "next-sitemap",
"start": "next start", "start": "next start",
"mddb": "mddb content" "mddb": "mddb content"
}, },
@@ -52,6 +53,7 @@
"devDependencies": { "devDependencies": {
"@tailwindcss/typography": "^0.5.9", "@tailwindcss/typography": "^0.5.9",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.14",
"next-sitemap": "^4.1.8",
"postcss": "^8.4.22", "postcss": "^8.4.22",
"prettier": "^2.8.7", "prettier": "^2.8.7",
"remark": "^14.0.2", "remark": "^14.0.2",

View File

@@ -47,7 +47,12 @@ function MyApp({ Component, pageProps }) {
defaultTheme={siteConfig.theme.default} defaultTheme={siteConfig.theme.default}
forcedTheme={siteConfig.theme.default ? null : 'light'} forcedTheme={siteConfig.theme.default ? null : 'light'}
> >
<DefaultSeo defaultTitle={siteConfig.title} {...siteConfig.nextSeo} /> <DefaultSeo
defaultTitle={siteConfig.title}
description={siteConfig.description}
titleTemplate="PortalJS - %s"
{...siteConfig.nextSeo}
/>
{/* Global Site Tag (gtag.js) - Google Analytics */} {/* Global Site Tag (gtag.js) - Google Analytics */}
{siteConfig.analytics && ( {siteConfig.analytics && (
@@ -58,7 +63,7 @@ function MyApp({ Component, pageProps }) {
/> />
<Script <Script
id="gtag-init" id="gtag-init"
strategy="afterInteractive" strategy="lazyOnload"
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: ` __html: `
window.dataLayer = window.dataLayer || []; window.dataLayer = window.dataLayer || [];

13
site/pages/_document.tsx Normal file
View File

@@ -0,0 +1,13 @@
import { Html, Head, Main, NextScript } from 'next/document';
export default function Document() {
return (
<Html lang="en">
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
);
}

View File

@@ -3,10 +3,12 @@ import computeFields from '@/lib/computeFields';
import clientPromise from '@/lib/mddb'; import clientPromise from '@/lib/mddb';
import { BlogsList, SimpleLayout } from '@portaljs/core'; import { BlogsList, SimpleLayout } from '@portaljs/core';
import * as fs from 'fs'; import * as fs from 'fs';
import {NextSeo} from 'next-seo';
export default function Blog({ blogs }) { export default function Blog({ blogs }) {
return ( return (
<> <>
<NextSeo title="Blog posts" />
<Layout> <Layout>
<SimpleLayout title="Blog posts"> <SimpleLayout title="Blog posts">
<BlogsList blogs={blogs} /> <BlogsList blogs={blogs} />

BIN
site/public/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB