mirror of
https://github.com/HERDAC/Cours-programmation.git
synced 2024-11-28 12:23:28 +00:00
test 5
This commit is contained in:
parent
54dd5214ff
commit
3eb7e557b6
3
.obsidian/app.json
vendored
3
.obsidian/app.json
vendored
@ -2,5 +2,6 @@
|
|||||||
"legacyEditor": false,
|
"legacyEditor": false,
|
||||||
"newLinkFormat": "absolute",
|
"newLinkFormat": "absolute",
|
||||||
"alwaysUpdateLinks": true,
|
"alwaysUpdateLinks": true,
|
||||||
"useMarkdownLinks": true
|
"useMarkdownLinks": true,
|
||||||
|
"promptDelete": false
|
||||||
}
|
}
|
19
.obsidian/workspace
vendored
19
.obsidian/workspace
vendored
@ -7,12 +7,8 @@
|
|||||||
"id": "53c7d65d526f34fc",
|
"id": "53c7d65d526f34fc",
|
||||||
"type": "leaf",
|
"type": "leaf",
|
||||||
"state": {
|
"state": {
|
||||||
"type": "markdown",
|
"type": "empty",
|
||||||
"state": {
|
"state": {}
|
||||||
"file": "README.md",
|
|
||||||
"mode": "source",
|
|
||||||
"source": false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -69,7 +65,6 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "backlink",
|
"type": "backlink",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "README.md",
|
|
||||||
"collapseAll": false,
|
"collapseAll": false,
|
||||||
"extraContext": false,
|
"extraContext": false,
|
||||||
"sortOrder": "alphabetical",
|
"sortOrder": "alphabetical",
|
||||||
@ -89,15 +84,15 @@
|
|||||||
},
|
},
|
||||||
"active": "53c7d65d526f34fc",
|
"active": "53c7d65d526f34fc",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
|
"static/icon.png",
|
||||||
"README.md",
|
"README.md",
|
||||||
|
"screenshot.png",
|
||||||
|
"CODE_OF_CONDUCT.md",
|
||||||
|
"content/notes/_index 1.md",
|
||||||
"content/notes/_index.md",
|
"content/notes/_index.md",
|
||||||
"content/notes/custom Domain.md",
|
"content/notes/custom Domain.md",
|
||||||
"content/note/Installation.md",
|
"content/note/Installation.md",
|
||||||
"content/notes/showcase.md",
|
"content/notes/showcase.md",
|
||||||
"content/notes/obsidian.md",
|
"content/notes/obsidian.md"
|
||||||
"content/notes/editing.md",
|
|
||||||
"content/notes/config.md",
|
|
||||||
"content/notes/Installation et mise en place pour Java.md",
|
|
||||||
"content/_index.md"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -1,93 +0,0 @@
|
|||||||
# Citizen Code of Conduct
|
|
||||||
|
|
||||||
## 1. Purpose
|
|
||||||
|
|
||||||
A primary goal of the Quartz community is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof).
|
|
||||||
|
|
||||||
This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior.
|
|
||||||
|
|
||||||
We invite all those who participate in the Quartz community to help us create safe and positive experiences for everyone.
|
|
||||||
|
|
||||||
## 2. Open [Source/Culture/Tech] Citizenship
|
|
||||||
|
|
||||||
A supplemental goal of this Code of Conduct is to increase open [source/culture/tech] citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community.
|
|
||||||
|
|
||||||
Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society.
|
|
||||||
|
|
||||||
If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know.
|
|
||||||
|
|
||||||
## 3. Expected Behavior
|
|
||||||
|
|
||||||
The following behaviors are expected and requested of all community members:
|
|
||||||
|
|
||||||
* Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
|
|
||||||
* Exercise consideration and respect in your speech and actions.
|
|
||||||
* Attempt collaboration before conflict.
|
|
||||||
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
|
|
||||||
* Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
|
|
||||||
* Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.
|
|
||||||
|
|
||||||
## 4. Unacceptable Behavior
|
|
||||||
|
|
||||||
The following behaviors are considered harassment and are unacceptable within our community:
|
|
||||||
|
|
||||||
* Violence, threats of violence or violent language directed against another person.
|
|
||||||
* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
|
|
||||||
* Posting or displaying sexually explicit or violent material.
|
|
||||||
* Posting or threatening to post other people's personally identifying information ("doxing").
|
|
||||||
* Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
|
|
||||||
* Inappropriate photography or recording.
|
|
||||||
* Inappropriate physical contact. You should have someone's consent before touching them.
|
|
||||||
* Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
|
|
||||||
* Deliberate intimidation, stalking or following (online or in person).
|
|
||||||
* Advocating for, or encouraging, any of the above behavior.
|
|
||||||
* Sustained disruption of community events, including talks and presentations.
|
|
||||||
|
|
||||||
## 5. Weapons Policy
|
|
||||||
|
|
||||||
No weapons will be allowed at Quartz community events, community spaces, or in other spaces covered by the scope of this Code of Conduct. Weapons include but are not limited to guns, explosives (including fireworks), and large knives such as those used for hunting or display, as well as any other item used for the purpose of causing injury or harm to others. Anyone seen in possession of one of these items will be asked to leave immediately, and will only be allowed to return without the weapon. Community members are further expected to comply with all state and local laws on this matter.
|
|
||||||
|
|
||||||
## 6. Consequences of Unacceptable Behavior
|
|
||||||
|
|
||||||
Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated.
|
|
||||||
|
|
||||||
Anyone asked to stop unacceptable behavior is expected to comply immediately.
|
|
||||||
|
|
||||||
If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event).
|
|
||||||
|
|
||||||
## 7. Reporting Guidelines
|
|
||||||
|
|
||||||
If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. j.zhao2k19@gmail.com.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress.
|
|
||||||
|
|
||||||
## 8. Addressing Grievances
|
|
||||||
|
|
||||||
If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify @jackyzha0 with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.
|
|
||||||
|
|
||||||
|
|
||||||
## 9. Scope
|
|
||||||
|
|
||||||
We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues--online and in-person--as well as in all one-on-one communications pertaining to community business.
|
|
||||||
|
|
||||||
This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members.
|
|
||||||
|
|
||||||
## 10. Contact info
|
|
||||||
|
|
||||||
j.zhao2k19@gmail.com
|
|
||||||
|
|
||||||
## 11. License and attribution
|
|
||||||
|
|
||||||
The Citizen Code of Conduct is distributed by [Stumptown Syndicate](http://stumptownsyndicate.org) under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).
|
|
||||||
|
|
||||||
Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).
|
|
||||||
|
|
||||||
_Revision 2.3. Posted 6 March 2017._
|
|
||||||
|
|
||||||
_Revision 2.2. Posted 4 February 2016._
|
|
||||||
|
|
||||||
_Revision 2.1. Posted 23 June 2014._
|
|
||||||
|
|
||||||
_Revision 2.0, adopted by the [Stumptown Syndicate](http://stumptownsyndicate.org) board on 10 January 2013. Posted 17 March 2013._
|
|
17
README.md
17
README.md
@ -1,17 +0,0 @@
|
|||||||
# Programmer un RaspiDAC
|
|
||||||
## Introduction à Java
|
|
||||||
Les Raspberry pi peuvent être programmé de multipple façon. Le RaspiDAC est spécialement conçu pour fonctionner avec un ou des programme(s) écri(en)t en Java bien qu'il puisse fonctionner avec d'autre language de programmation.
|
|
||||||
Nous allons donc réaliser une initiation au Java au travers d'un cours basique de programmation en suivant les étapes suivantes:
|
|
||||||
|
|
||||||
1. [Installation et mise en place pour Java](content/notes/Installation%20et%20mise%20en%20place%20pour%20Java.md)
|
|
||||||
2. La structure du code
|
|
||||||
3. Les types en Java
|
|
||||||
4. Les expression
|
|
||||||
5. Les boucles
|
|
||||||
6. Les fonctions
|
|
||||||
7. Les objets
|
|
||||||
8. Les types complexes
|
|
||||||
|
|
||||||
## Les particularités d'un raspberry pi
|
|
||||||
|
|
||||||
## L'automate en détails
|
|
@ -1,29 +0,0 @@
|
|||||||
---
|
|
||||||
title: 🪴 Quartz 3.2
|
|
||||||
---
|
|
||||||
|
|
||||||
TEST!!!!
|
|
||||||
|
|
||||||
Host your second brain and [digital garden](https://jzhao.xyz/posts/networked-thought) for free. Quartz features
|
|
||||||
|
|
||||||
1. Extremely fast full-text search by pressing `Ctrl` + `k`
|
|
||||||
2. Customizable and hackable design based on Hugo
|
|
||||||
3. Automatically generated backlinks, link previews, and local graph
|
|
||||||
4. Built-in [[notes/CJK + Latex Support (测试) | CJK + Latex Support]]
|
|
||||||
5. Support for both Markdown Links and Wikilinks
|
|
||||||
|
|
||||||
## Get Started
|
|
||||||
> 📚 [Setup your own digital garden using Quartz](notes/setup.md)
|
|
||||||
|
|
||||||
Not convinced yet? Look at some [community digital gardens](notes/showcase.md) built with Quartz, or read about [why I made Quartz](notes/philosophy.md) to begin with.
|
|
||||||
|
|
||||||
## Content Lists
|
|
||||||
If you prefer browsing the contents of this site through a list instead of a graph, you can find content lists here too:
|
|
||||||
|
|
||||||
- [All Notes](/notes)
|
|
||||||
- [Setup-related Notes](/tags/setup)
|
|
||||||
|
|
||||||
## Troubleshooting
|
|
||||||
- 🚧 [Troubleshooting and FAQ](notes/troubleshooting.md)
|
|
||||||
- 🐛 [Submit an Issue](https://github.com/jackyzha0/quartz/issues)
|
|
||||||
- 👀 [Discord Community](https://discord.gg/cRFFHYye7t)
|
|
@ -1,40 +0,0 @@
|
|||||||
---
|
|
||||||
title: "CJK + Latex Support (测试)"
|
|
||||||
---
|
|
||||||
|
|
||||||
## Chinese, Japanese, Korean Support
|
|
||||||
几乎在我们意识到之前,我们已经离开了地面。
|
|
||||||
|
|
||||||
우리가 그것을 알기도 전에 우리는 땅을 떠났습니다.
|
|
||||||
|
|
||||||
私たちがそれを知るほぼ前に、私たちは地面を離れていました。
|
|
||||||
|
|
||||||
## Latex
|
|
||||||
|
|
||||||
Block math works with two dollar signs `$$...$$`
|
|
||||||
|
|
||||||
$$f(x) = \int_{-\infty}^\infty
|
|
||||||
f\hat(\xi),e^{2 \pi i \xi x}
|
|
||||||
\,d\xi$$
|
|
||||||
|
|
||||||
Inline math also works with single dollar signs `$...$`. For example, Euler's identity but inline: $e^{i\pi} = 0$
|
|
||||||
|
|
||||||
Aligned equations work quite well:
|
|
||||||
|
|
||||||
$$
|
|
||||||
\begin{aligned}
|
|
||||||
a &= b + c \\ &= e + f \\
|
|
||||||
\end{aligned}
|
|
||||||
$$
|
|
||||||
|
|
||||||
And matrices
|
|
||||||
|
|
||||||
$$
|
|
||||||
\begin{bmatrix}
|
|
||||||
1 & 2 & 3 \\
|
|
||||||
a & b & c
|
|
||||||
\end{bmatrix}
|
|
||||||
$$
|
|
||||||
|
|
||||||
## RTL
|
|
||||||
More information on configuring RTL languages like Arabic in the [config](notes/config.md) page.
|
|
@ -1,67 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Configuration"
|
|
||||||
tags:
|
|
||||||
- setup
|
|
||||||
---
|
|
||||||
|
|
||||||
## Configuration
|
|
||||||
Quartz is designed to be extremely configurable. You can find the bulk of the configuration scattered throughout the repository depending on how in-depth you'd like to get.
|
|
||||||
|
|
||||||
The majority of configuration can be be found under `data/config.yaml`. An annotated example configuration is shown below.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
name: Your name here! # Shows in the footer
|
|
||||||
enableToc: true # Whether to show a Table of Contents
|
|
||||||
enableLinkPreview: true # whether to render card previews for links
|
|
||||||
description: Page description to show to search engines
|
|
||||||
page_title: Quartz Example Page # Default Page Title
|
|
||||||
|
|
||||||
links: # Links to show in footer
|
|
||||||
- link_name: Twitter
|
|
||||||
link: https://twitter.com/_jzhao
|
|
||||||
- link_name: Github
|
|
||||||
link: https://github.com/jackyzha0
|
|
||||||
```
|
|
||||||
|
|
||||||
### Graph View
|
|
||||||
To customize the Interactive Graph view, you can poke around `data/graphConfig.yaml`.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
enableLegend: false # automatically generate a legend
|
|
||||||
enableDrag: true # allow dragging nodes in the graph
|
|
||||||
enableZoom: true # allow zooming and panning the graph
|
|
||||||
depth: -1 # how many neighbours of the current node to show (-1 is all nodes)
|
|
||||||
paths: # colour specific nodes path off of their path
|
|
||||||
- /moc: "#4388cc"
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## Styling
|
|
||||||
Want to go even more in-depth? You can add custom CSS styling and change existing colours through editing `assets/styles/custom.scss`. If you'd like to target specific parts of the site, you can add ids and classes to the HTML partials in `/layouts/partials`.
|
|
||||||
|
|
||||||
### Partials
|
|
||||||
Partials are what dictate what actually gets rendered to the page. Want to change how pages are styled and structured? You can edit the appropriate layout in `/layouts`.
|
|
||||||
|
|
||||||
For example, the structure of the home page can be edited through `/layouts/index.html`. To customize the footer, you can edit `/layouts/partials/footer.html`
|
|
||||||
|
|
||||||
More info about partials on [Hugo's website.](https://gohugo.io/templates/partials/)
|
|
||||||
|
|
||||||
Still having problems? Checkout our [FAQ and Troubleshooting guide](notes/troubleshooting.md).
|
|
||||||
|
|
||||||
## Multilingual
|
|
||||||
[CJK + Latex Support (测试)](notes/CJK%20+%20Latex%20Support%20(测试).md) comes out of the box with Quartz.
|
|
||||||
|
|
||||||
Want to support languages that read from right-to-left (like Arabic)? Hugo (and by proxy, Quartz) supports this natively.
|
|
||||||
|
|
||||||
Follow the steps [Hugo provides here](https://gohugo.io/content-management/multilingual/#configure-languages) and modify your `config.toml`
|
|
||||||
|
|
||||||
For example:
|
|
||||||
|
|
||||||
```toml
|
|
||||||
defaultContentLanguage = 'ar'
|
|
||||||
[languages]
|
|
||||||
[languages.ar]
|
|
||||||
languagedirection = 'rtl'
|
|
||||||
title = 'مدونتي'
|
|
||||||
weight = 1
|
|
||||||
```
|
|
@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Custom Domain"
|
|
||||||
---
|
|
||||||
|
|
||||||
### Registrar
|
|
||||||
This step is only applicable if you are using a **custom domain**! If you are using a `<YOUR-USERNAME>.github.io` domain, you can skip this step.
|
|
||||||
|
|
||||||
For this last bit to take effect, you also need to create a CNAME record with the DNS provider you register your domain with (i.e. NameCheap, Google Domains).
|
|
||||||
|
|
||||||
GitHub has some [documentation on this](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site), but the tldr; is to
|
|
||||||
|
|
||||||
1. Go to your forked repository (`github.com/<YOUR-GITHUB-USERNAME>/quartz`) settings page and go to the Pages tab. Under "Custom domain", type your custom domain, then click **Save**.
|
|
||||||
2. Go to your DNS Provider and create a CNAME record that points from your domain to `<YOUR-GITHUB-USERNAME.github.io.` (yes, with the trailing period).
|
|
||||||
|
|
||||||
![Example Configuration for Quartz](/notes/images/google-domains.png)*Example Configuration for Quartz*
|
|
||||||
3. Wait 30 minutes to an hour for the network changes to kick in.
|
|
||||||
4. Done!
|
|
@ -1,69 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Editing Content in Quartz"
|
|
||||||
tags:
|
|
||||||
- setup
|
|
||||||
---
|
|
||||||
|
|
||||||
## Editing
|
|
||||||
Quartz runs on top of [Hugo](https://gohugo.io/) so all notes are written in [Markdown](https://www.markdownguide.org/getting-started/).
|
|
||||||
|
|
||||||
### Obsidian
|
|
||||||
I recommend using [Obsidian](http://obsidian.md/) as a way to edit and grow your digital garden. It comes with a really nice editor and graphical interface to preview all of your local files.
|
|
||||||
|
|
||||||
This step is **highly recommended**.
|
|
||||||
|
|
||||||
🔗 [How to setup your Obsidian Vault to work with Quartz](notes/obsidian.md)
|
|
||||||
|
|
||||||
### Ignoring Files
|
|
||||||
Only want to publish a subset of all of your notes? Don't worry, Quartz makes this a simple two-step process.
|
|
||||||
|
|
||||||
❌ [Excluding pages from being published](notes/ignore%20notes.md)
|
|
||||||
|
|
||||||
### Folder Structure
|
|
||||||
Here's a rough overview of what's what.
|
|
||||||
|
|
||||||
**All content in your garden can found in the `/content` folder.** To make edits, you can open any of the files and make changes directly and save it. You can organize content into any folder you'd like.
|
|
||||||
|
|
||||||
**To edit the main home page, open `/content/_index.md`.*
|
|
||||||
|
|
||||||
To create a link between notes in your garden, just create a normal link using Markdown pointing to the document in question. Please note that **all links should be relative to the root `/content` path**.
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
For example, I want to link this current document to `notes/config.md`.
|
|
||||||
[A link to the config page](notes/config.md)
|
|
||||||
```
|
|
||||||
|
|
||||||
Similarly, you can put local images anywhere in the `/content` folder.
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
Example image (source is in content/notes/images/example.png)
|
|
||||||
![Example Image](/content/notes/images/example.png)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Front Matter
|
|
||||||
Hugo is picky when it comes to metadata for files. Make sure that your title is double-quoted and that you have a title defined at the top of your file like so. You can also add tags here as well.
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
---
|
|
||||||
title: "Example Title"
|
|
||||||
tags:
|
|
||||||
- example-tag
|
|
||||||
enableToc: false # do not show a table of contents on this page
|
|
||||||
---
|
|
||||||
|
|
||||||
Rest of your content here...
|
|
||||||
```
|
|
||||||
|
|
||||||
## Previewing Changes
|
|
||||||
This step is purely optional and mostly for those who want to see the published version of their digital garden locally before opening it up to the internet. This is *highly recommended* but not required.
|
|
||||||
|
|
||||||
👀 [Preview Quartz Changes](notes/preview%20changes.md)
|
|
||||||
|
|
||||||
For those who like to live life more on the edge, viewing the garden through Obsidian gets you pretty close to the real thing.
|
|
||||||
|
|
||||||
## Publishing Changes
|
|
||||||
Now that you know the basics of managing your digital garden using Quartz, you can publish it to the internet!
|
|
||||||
|
|
||||||
🌍 [Hosting Quartz online!](notes/hosting.md)
|
|
||||||
|
|
||||||
Having problems? Checkout our [FAQ and Troubleshooting guide](notes/troubleshooting.md).
|
|
@ -1,84 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Deploying Quartz to the Web"
|
|
||||||
tags:
|
|
||||||
- setup
|
|
||||||
---
|
|
||||||
|
|
||||||
## GitHub Pages
|
|
||||||
Quartz is designed to be effortless to deploy. If you forked and cloned Quartz directly from the repository, everything should already be good to go! Follow the steps below.
|
|
||||||
|
|
||||||
### Enable GitHub Actions
|
|
||||||
By default, GitHub disables workflows from running automatically on Forked Repostories. Head to the 'Actions' tab of your forked repository and Enable Workflows to setup deploying your Quartz site!
|
|
||||||
|
|
||||||
![Enable GitHub Actions](notes/images/github-actions.png)*Enable GitHub Actions*
|
|
||||||
|
|
||||||
### Enable GitHub Pages
|
|
||||||
|
|
||||||
Head to the 'Settings' tab of your forked repository and go to the 'Pages' tab.
|
|
||||||
|
|
||||||
1. (IMPORTANT) Set the source to deploy from `master` (and not `hugo`) using `/ (root)`
|
|
||||||
2. Set a custom domain here if you have one!
|
|
||||||
|
|
||||||
![Enable GitHub Pages](/notes/images/github-pages.png)*Enable GitHub Pages*
|
|
||||||
|
|
||||||
### Pushing Changes
|
|
||||||
To see your changes on the internet, we need to push it them to GitHub. Quartz is a `git` repository so updating it is the same workflow as you would follow as if it were just a regular software project.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# Navigate to Quartz folder
|
|
||||||
cd <path-to-quartz>
|
|
||||||
|
|
||||||
# Commit all changes
|
|
||||||
git add .
|
|
||||||
git commit -m "message describing changes"
|
|
||||||
|
|
||||||
# Push to GitHub to update site
|
|
||||||
git push origin hugo
|
|
||||||
```
|
|
||||||
|
|
||||||
Note: we specifically push to the `hugo` branch here. Our GitHub action automatically runs everytime a push to is detected to that branch and then updates the `master` branch for redeployment.
|
|
||||||
|
|
||||||
### Setting up the Site
|
|
||||||
Now let's get this site up and running. Never hosted a site before? No problem. Have a fancy custom domain you already own or want to subdomain your Quartz? That's easy too.
|
|
||||||
|
|
||||||
Here, we take advantage of GitHub's free page hosting to deploy our site. Change `baseURL` in `/config.toml`.
|
|
||||||
|
|
||||||
Make sure that your `baseURL` has a trailing `/`!
|
|
||||||
|
|
||||||
[Reference `config.toml` here](https://github.com/jackyzha0/quartz/blob/hugo/config.toml)
|
|
||||||
|
|
||||||
```toml
|
|
||||||
baseURL = "https://<YOUR-DOMAIN>/"
|
|
||||||
```
|
|
||||||
|
|
||||||
If you are using this under a subdomain (e.g. `<YOUR-GITHUB-USERNAME>.github.io/quartz`), include the trailing `/`.
|
|
||||||
|
|
||||||
```toml
|
|
||||||
baseURL = "https://<YOUR-GITHUB-USERNAME>.github.io/quartz/"
|
|
||||||
```
|
|
||||||
|
|
||||||
Change `cname` in `/.github/workflows/deploy.yaml`. Again, if you don't have a custom domain to use, you can use `<YOUR-USERNAME>.github.io`.
|
|
||||||
|
|
||||||
Please note that the `cname` field should *not* have any path `e.g. end with /quartz` or have a trailing `/`.
|
|
||||||
|
|
||||||
[Reference `deploy.yaml` here](https://github.com/jackyzha0/quartz/blob/hugo/.github/workflows/deploy.yaml)
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: Deploy
|
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }} # this can stay as is, GitHub fills this in for us!
|
|
||||||
publish_dir: ./public
|
|
||||||
publish_branch: master
|
|
||||||
cname: <YOUR-DOMAIN>
|
|
||||||
```
|
|
||||||
|
|
||||||
Have a custom domain? [Learn how to set it up with Quartz ](notes/custom%20Domain.md).
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Now that your Quartz is live, let's figure out how to make Quartz really *yours*!
|
|
||||||
|
|
||||||
🎨 [Customizing Quartz](notes/config.md)
|
|
||||||
|
|
||||||
Having problems? Checkout our [FAQ and Troubleshooting guide](notes/troubleshooting.md).
|
|
@ -1,31 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Ignoring Notes"
|
|
||||||
---
|
|
||||||
|
|
||||||
### Quartz Ignore
|
|
||||||
Edit `ignoreFiles` in `config.toml` to include paths you'd like to exclude from being rendered.
|
|
||||||
|
|
||||||
```toml
|
|
||||||
...
|
|
||||||
ignoreFiles = [
|
|
||||||
"/content/templates/*",
|
|
||||||
"/content/private/*",
|
|
||||||
"<your path here>"
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
`ignoreFiles` supports the use of Regular Expressions (RegEx) so you can ignore patterns as well (e.g. ignoring all `.png`s by doing `\\.png$`).
|
|
||||||
To ignore a specific file, you can also add the tag `draft: true` to the frontmatter of a note.
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
---
|
|
||||||
title: Some Private Note
|
|
||||||
draft: true
|
|
||||||
---
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
More details in [Hugo's documentation](https://gohugo.io/getting-started/configuration/#ignore-content-and-data-files-when-rendering).
|
|
||||||
|
|
||||||
### Global Ignore
|
|
||||||
However, just adding to the `ignoreFiles` will only prevent the page from being access through Quartz. If you want to prevent the file from being pushed to GitHub (for example if you have a public repository), you need to also add the path to the `.gitignore` file at the root of the repository.
|
|
@ -1,29 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Obsidian Vault Integration"
|
|
||||||
tags:
|
|
||||||
- setup
|
|
||||||
---
|
|
||||||
|
|
||||||
## Setup
|
|
||||||
Obsidian is the preferred way to use Quartz. You can either create a new Obsidian Vault or link one that your already have.
|
|
||||||
|
|
||||||
### New Vault
|
|
||||||
If you don't have an existing Vault, [download Obsidian](https://obsidian.md/) and create a new Vault in the `/content` folder that you created and cloned during the [setup](notes/setup.md) step.
|
|
||||||
|
|
||||||
### Linking an existing Vault
|
|
||||||
The easiest way to use an existing Vault is to copy all of your files (directory and hierarchies intact) into the `/content` folder.
|
|
||||||
|
|
||||||
## Settings
|
|
||||||
Great, now that you have your Obsidian linked to your Quartz, let's fix some settings so that they play well.
|
|
||||||
|
|
||||||
1. Under Options > Files and Links, set the New link format to always e Absolute Path in Vault.
|
|
||||||
2. Go to Settings > Files & Links > Turn "on" automatically update internal links.
|
|
||||||
|
|
||||||
![Obsidian Settings](/notes/images/obsidian-settings.png)*Obsidian Settings*
|
|
||||||
|
|
||||||
## Templates
|
|
||||||
Inserting front matter everytime you want to create a new Note gets annoying really quickly. Luckily, Obsidian supports templates which makes inserting new content really easily.
|
|
||||||
|
|
||||||
**If you decide to overwrite the `/content` folder completely, don't remove the `/content/templates` folder!**
|
|
||||||
|
|
||||||
Head over to Options > Core Plugins and enable the Templates plugin. Then go to Options > Hotkeys and set a hotkey for 'Insert Template' (I recomment `[cmd]+T`). That way, when you create a new note, you can just press the hotkey for a new template and be ready to go!
|
|
@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Quartz Philosophy"
|
|
||||||
---
|
|
||||||
|
|
||||||
> “[One] who works with the door open gets all kinds of interruptions, but [they] also occasionally gets clues as to what the world is and what might be important.” — Richard Hamming
|
|
||||||
|
|
||||||
## Why Quartz?
|
|
||||||
Hosting a public digital garden isn't easy. There are an overwhelming number of tutorials, resources, and guides for tools like [Notion](https://www.notion.so/), [Roam](https://roamresearch.com/), and [Obsidian](https://obsidian.md/), yet none of them have super easy to use *free* tools to publish that garden to the world.
|
|
||||||
|
|
||||||
I've personally found that
|
|
||||||
1. It's nice to access notes from anywhere
|
|
||||||
2. Having a public digital garden invites open conversations
|
|
||||||
3. It makes keeping personal notes and knowledge *playful and fun*
|
|
||||||
|
|
||||||
I was really inspired by [Bianca](https://garden.bianca.digital/) and [Joel](https://joelhooks.com/digital-garden)'s digital gardens and wanted to try making my own.
|
|
||||||
|
|
||||||
**The goal of Quartz is to make hosting your own public digital garden free and simple.** You don't even need your own website. Quartz does all of that for you and gives your own little corner of the internet.
|
|
@ -1,38 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Preview Changes"
|
|
||||||
---
|
|
||||||
|
|
||||||
If you'd like to preview what your Quartz site looks like before deploying it to the internet, here's exactly how to do that!
|
|
||||||
|
|
||||||
Note that both of these steps need to be completed.
|
|
||||||
|
|
||||||
## Install `hugo-obsidian`
|
|
||||||
This step will generate the list of backlinks for Hugo to parse. Ensure you have [Go](https://golang.org/doc/install) (>= 1.16) installed.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# Install and link `hugo-obsidian` locally
|
|
||||||
$ go install github.com/jackyzha0/hugo-obsidian@latest
|
|
||||||
|
|
||||||
# Navigate to your local Quartz folder
|
|
||||||
$ cd <location-of-your-local-quartz>
|
|
||||||
|
|
||||||
# Scrape all links in your Quartz folder and generate info for Quartz
|
|
||||||
$ hugo-obsidian -input=content -output=assets/indices -index -root=.
|
|
||||||
```
|
|
||||||
|
|
||||||
If you are running into an error saying that `command not found: hugo-obsidian`, make sure you set your `GOPATH` correctly! This will allow your terminal to correctly recognize hugo-obsidian as an executable.
|
|
||||||
|
|
||||||
Afterwards, start the Hugo server as shown above and your local backlinks and interactive graph should be populated!
|
|
||||||
|
|
||||||
## Installing Hugo
|
|
||||||
Hugo is the static site generator that powers Quartz. [Install Hugo with "extended" Sass/SCSS version](https://gohugo.io/getting-started/installing/) first. Then,
|
|
||||||
|
|
||||||
```
|
|
||||||
# Navigate to your local Quartz folder
|
|
||||||
$ cd <location-of-your-local-quartz>
|
|
||||||
|
|
||||||
# Start local server
|
|
||||||
$ hugo server
|
|
||||||
|
|
||||||
# View your site in a browser at http://localhost:1313/
|
|
||||||
```
|
|
@ -1,58 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Setup"
|
|
||||||
tags:
|
|
||||||
- setup
|
|
||||||
---
|
|
||||||
|
|
||||||
## Making your own Quartz
|
|
||||||
Setting up Quartz requires a basic understanding of `git`. If you are unfamiliar, [this resource](https://resources.nwplus.io/2-beginner/how-to-git-github.html) is a great place to start!
|
|
||||||
|
|
||||||
### Forking
|
|
||||||
> A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project.
|
|
||||||
|
|
||||||
Navigate to the GitHub repository for the Quartz project:
|
|
||||||
|
|
||||||
📁 [Quartz Repository](https://github.com/jackyzha0/quartz)
|
|
||||||
|
|
||||||
Then, Fork the repository into your own GitHub account. If you don't have an account, you can make on for free [here](https://github.com/join). More details about forking a repo can be found on [GitHub's documentation](https://docs.github.com/en/get-started/quickstart/fork-a-repo).
|
|
||||||
|
|
||||||
### Cloning
|
|
||||||
After you've made a fork of the repository, you need to download the files locally onto your machine. Ensure you have `git`, then type the following command replacing `YOUR-USERNAME` with your GitHub username.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ git clone https://github.com/YOUR-USERNAME/quartz
|
|
||||||
```
|
|
||||||
|
|
||||||
## Editing
|
|
||||||
Great! Now you have everything you need to start editing and growing your digital garden. If you're ready to start writing content already, check out the recommended flow for editing notes in Quartz.
|
|
||||||
|
|
||||||
✏️ [Editing Notes in Quartz](notes/editing.md)
|
|
||||||
|
|
||||||
Having problems? Checkout our [FAQ and Troubleshooting guide](notes/troubleshooting.md).
|
|
||||||
|
|
||||||
## Updating
|
|
||||||
Haven't updated Quartz in a while and want all the cool new optimizations? On Unix/Mac systems you can run the following command for a one-line update! This command will show you a log summary of all commits since you last updated, press `q` to acknowledge this. Then, it will show you each change in turn and press `y` to accept the patch or `n` to reject it. Usually you should press `y` for most of these unless it conflicts with existing changes you've made!
|
|
||||||
|
|
||||||
```shell
|
|
||||||
make update
|
|
||||||
|
|
||||||
# or, if you don't want the interactive parts and just want the update
|
|
||||||
make update-force
|
|
||||||
```
|
|
||||||
|
|
||||||
Or, manually checkout the changes yourself.
|
|
||||||
|
|
||||||
> ⚠️ **WARNING** ⚠️
|
|
||||||
>
|
|
||||||
> If you customized the files in `data/`, or anything inside `layouts/`, your customization may be overwritten!
|
|
||||||
> Make sure you have a copy of these changes if you don't want to lose them.
|
|
||||||
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# add Quartz as a remote host
|
|
||||||
git remote add upstream git@github.com:jackyzha0/quartz.git
|
|
||||||
|
|
||||||
# index and fetch changes
|
|
||||||
git fetch upstream
|
|
||||||
git checkout -p upstream/hugo -- layouts .github Makefile assets/js assets/styles/base.scss assets/styles/darkmode.scss config.toml data
|
|
||||||
```
|
|
@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Showcase"
|
|
||||||
---
|
|
||||||
|
|
||||||
Want to see what Quartz can do? Here are some cool community gardens :)
|
|
||||||
|
|
||||||
- [Quartz Documentation (this site!)](https://quartz.jzhao.xyz/)
|
|
||||||
- [Jacky Zhao's Garden](https://garden.jzhao.xyz/)
|
|
||||||
- [AWAGMI Intern Notes](https://notes.awagmi.xyz/)
|
|
||||||
- [Shihyu's PKM](https://shihyuho.github.io/pkm/)
|
|
||||||
- [Chloe's Garden](https://garden.chloeabrasada.online/)
|
|
||||||
- [SlRvb's Site](https://slrvb.github.io/Site/)
|
|
||||||
- [Course notes for Information Technology Advanced Theory](https://a2itnotes.github.io/quartz/)
|
|
||||||
- [Brandon Boswell's Garden](https://brandonkboswell.com)
|
|
||||||
- [Siyang's Courtyard](https://siyangsun.github.io/courtyard/)
|
|
||||||
|
|
||||||
If you want to see your own on here, submit a [Pull Request adding yourself to this file](https://github.com/jackyzha0/quartz/blob/hugo/content/notes/showcase.md)!
|
|
@ -1,81 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Troubleshooting and FAQ"
|
|
||||||
---
|
|
||||||
|
|
||||||
Still having trouble? Here are a list of common questions and problems people encounter when installing Quartz.
|
|
||||||
|
|
||||||
While you're here, join our [Discord](https://discord.gg/cRFFHYye7t) :)
|
|
||||||
|
|
||||||
### Does Quartz have Latex support?
|
|
||||||
Yes! See [CJK + Latex Support (测试)](notes/CJK%20+%20Latex%20Support%20(测试).md) for a brief demo.
|
|
||||||
|
|
||||||
### Can I use \<Obsidian Plugin\> in Quartz?
|
|
||||||
Unless it produces direct Markdown output in the file, no. There currently is no way to bundle plugin code with Quartz.
|
|
||||||
|
|
||||||
The easiest way would be to add your own HTML partial that supports the functionality you are looking for.
|
|
||||||
|
|
||||||
### My GitHub pages is just showing the README and not Quartz
|
|
||||||
Make sure you set the source to deploy from `master` (and not `hugo`) using `/ (root)`! See more in the [hosting](/notes/hosting) guide
|
|
||||||
|
|
||||||
### Some of my pages have 'January 1, 0001' as the last modified date
|
|
||||||
This is a problem caused by `git` treating files as case-insensitive by default and some of your posts probably have capitalized file names. You can turn this off in your Quartz by running this command.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# in the root of your Quartz (same folder as config.toml)
|
|
||||||
git config core.ignorecase true
|
|
||||||
|
|
||||||
# or globally (not recommended)
|
|
||||||
git config --global core.ignorecase true
|
|
||||||
```
|
|
||||||
|
|
||||||
### Can I publish only a subset of my pages?
|
|
||||||
Yes! Quartz makes selective publishing really easy. Heres a guide on [excluding pages from being published](notes/ignore%20notes.md).
|
|
||||||
|
|
||||||
### Can I host this myself and not on GitHub Pages?
|
|
||||||
Yes! All built files can be found under `/public` in the `master` branch. More details under [hosting](notes/hosting.md).
|
|
||||||
|
|
||||||
### `command not found: hugo-obsidian`
|
|
||||||
Make sure you set your `GOPATH` correctly! This will allow your terminal to correctly recognize `hugo-obsidian` as an executable.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# Add the following 2 lines to your ~/.bash_profile
|
|
||||||
export GOPATH=/Users/$USER/go
|
|
||||||
export PATH=$GOPATH/bin:$PATH
|
|
||||||
|
|
||||||
# In your current terminal, to reload the session
|
|
||||||
source ~/.bash_profile
|
|
||||||
```
|
|
||||||
|
|
||||||
### How come my notes aren't being rendered?
|
|
||||||
You probably forgot to include front matter in your Markdown files. You can either setup [Obsidian](notes/obsidian.md) to do this for you or you need to manually define it. More details in [the 'how to edit' guide](notes/editing.md).
|
|
||||||
|
|
||||||
### My custom domain isn't working!
|
|
||||||
Walk through the steps in [the hosting guide](notes/hosting.md) again. Make sure you wait 30 min to 1 hour for changes to take effect.
|
|
||||||
|
|
||||||
### How do I setup Google Analytics?
|
|
||||||
You can edit it in `config.toml` and either use a V3 (UA-) or V4 (G-) tag.
|
|
||||||
|
|
||||||
### How do I change the content on the home page?
|
|
||||||
To edit the main home page, open `/content/_index.md`.
|
|
||||||
|
|
||||||
### How do I change the colours?
|
|
||||||
You can change the theme by editing `assets/custom.scss`. More details on customization and themeing can be found in the [customization guide](notes/config.md).
|
|
||||||
|
|
||||||
### How do I add images?
|
|
||||||
You can put images anywhere in the `/content` folder.
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
Example image (source is in content/notes/images/example.png)
|
|
||||||
![Example Image](/content/notes/images/example.png)
|
|
||||||
```
|
|
||||||
|
|
||||||
### My Interactive Graph and Backlinks aren't up to date
|
|
||||||
By default, the `linkIndex.json` (which Quartz needs to generate the Interactive Graph and Backlinks) are not regenerated locally. To set that up, see the guide on [local editing](notes/editing.md)
|
|
||||||
|
|
||||||
### Can I use React/Vue/some other framework?
|
|
||||||
Not out of the box. You could probably make it work by editing `/layouts/_default/single.html` but that's not what Quartz is designed to work with. 99% of things you are trying to do with those frameworks you can accomplish perfectly fine using just vanilla HTML/CSS/JS.
|
|
||||||
|
|
||||||
## Still Stuck?
|
|
||||||
Quartz isn't perfect! If you're still having troubles, file an issue in the GitHub repo with as much information as you can reasonably provide. Alternatively, you can message me on [Twitter](https://twitter.com/_jzhao) and I'll try to get back to you as soon as I can.
|
|
||||||
|
|
||||||
🐛 [Submit an Issue](https://github.com/jackyzha0/quartz/issues)
|
|
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
Before Width: | Height: | Size: 1.1 MiB |
BIN
static/icon.png
BIN
static/icon.png
Binary file not shown.
Before Width: | Height: | Size: 17 KiB |
Loading…
Reference in New Issue
Block a user