Skip to content

Commit

Permalink
Discuss redirects & 404 errors in website template
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaillat committed Sep 8, 2024
1 parent f689682 commit 9cfe4c3
Show file tree
Hide file tree
Showing 63 changed files with 782 additions and 470 deletions.
31 changes: 30 additions & 1 deletion content/design/d5.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Minimalist Hugo Template for Academic Websites"
date: 2024-07-16
lastmod: 2024-08-29
lastmod: 2024-09-08
url: /d5/
author: "Pascal Michaillat"
description: "This template produces a personal academic website with Hugo. The website has a minimalist design and is hosted on GitHub Pages."
Expand Down Expand Up @@ -372,6 +372,35 @@ Hugo will generate a new content file called `my-new-research-material.md` and p

---

## Redirects

It is easy to handle redirects on a Hugo website by using the `aliases` parameter within the page front matter. This feature allows you to define old URLs that should redirect to a new page. This is particularly useful when you change the URL structure or move content around in your website, and you want to ensure that visitors are redirected from the old URLs to the new one. This ensures that visitors using the old URLs still find the right content.

The template includes an example showing how to set up redirects using the `aliases` parameter. The redirects are set up in the `/courses/course1/index.md` file. In the preamble, the following snippet of code sets up redirects from old PDF files to the current course page:

```yml
aliases:
- /courses/course2/slides4.pdf
- /courses/course2/slides1.pdf
- /courses/course2/slides3.pdf
- /courses/course2/slides2.pdf
- /courses/course2/notes3.pdf
- /courses/course2/notes4.pdf
- /courses/course2/ps3.pdf
- /courses/course2/ps4.pdf
- /courses/course1/quiz1.pdf
- /courses/course1/quiz2.pdf
- /courses/course2/quiz3.pdf
- /courses/course2/quiz4.pdf
- /courses/course1/ps1.pdf
```

Hugo will then automatically generate the necessary redirect HTML pages during the build process. These HTML pages will be stored in the `public` folder. When a visitor navigates to any of the URLs listed in the aliases (such as `baseURL/courses/course2/slides4.pdf`), they will be redirected to the page where the alias is defined (`baseURL/courses/course1/`).

This method is useful to manage redirects and ensure a seamless user experience when restructuring any part of your website. It is also useful to handle 404 issues since outdated links will automatically point to the correct content, preventing users from landing on the [404 error page](https://pascalmichaillat.org/hugo-website/404/).

---

## Public folder

The `public` folder contains the fully generated static website files that are ready to be deployed to GitHub Pages. When you run the `hugo` command, Hugo processes your content, templates, and other project files and generates a static website. The resulting output is placed in the `public` folder by default.
Expand Down
4 changes: 2 additions & 2 deletions content/papers/1.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: "Do Matching Frictions Explain Unemployment? Not in Bad Times"
date: 2012-06-01
lastmod: 2024-08-21
lastmod: 2024-09-08
url: /1/
aliases:
- /1.html
- /uploads/7/0/2/0/70200055/1.pdf
- /uploads/7/0/2/0/70200055/1a.pdf
- /uploads/7/0/2/0/70200055/1p.pdf
tags: ["business cycles", "DMP model", "frictional unemployment", "job rationing", "matching model", "recessions", "unemployment", "wage rigidity"]
tags: ["business cycles", "DMP model", "frictional unemployment", "job rationing", "matching model", "recessions", "rationing unemployment", "wage rigidity"]
author: "Pascal Michaillat"
description: "This paper proposes a matching model of the labor market with job rationing: unemployment persists even without matching frictions. Published in AER, 2012."
summary: "This paper proposes a matching model of the labor market with job rationing: unemployment does not disappear in the absence of matching frictions. In recessions, job rationing drives the rise of unemployment, whereas matching frictions contribute little to it."
Expand Down
3 changes: 2 additions & 1 deletion content/papers/13.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ aliases:
- /tags/vacancies/
- /tags/efficiency/
- /tags/inefficiency/
tags: ["Beveridge curve", "business cycles", "efficient unemployment rate", "full employment", "job vacancies", "labor-market tightness", "unemployment", "unemployment gap"]
- /tags/recession-threshold/
tags: ["Beveridge curve", "business cycles", "DMP model", "efficient unemployment rate", "full employment", "job vacancies", "labor-market tightness", "unemployment gap"]
author: ["Pascal Michaillat","Emmanuel Saez"]
description: "This paper argues that in the United States the full-employment rate of unemployment (FERU) is the geometric average of the unemployment and vacancy rates."
summary: "This paper argues that in the United States the full-employment rate of unemployment (FERU) is the geometric average of the unemployment and vacancy rates. Between 1930 and 2023, the FERU averages 4.1% and is very stable."
Expand Down
6 changes: 3 additions & 3 deletions content/papers/16.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
title: "Has the Recession Started?"
date: 2024-09-06
url: /16/
tags: ["job vacancies", "Michez rule", "recession indicator", "recession probability", "recession threshold", "recessions", "Sahm rule", "unemployment"]
tags: ["job vacancies", "Michez rule", "recession indicator", "recession probability", "threshold rule", "recessions", "Sahm rule", "unemployment"]
author: ["Pascal Michaillat","Emmanuel Saez"]
description: "This note uses unemployment and job vacancy data to build a real-time recession indicator. It shows that the US may have been in recession since April 2024."
summary: "This note combines unemployment and job vacancy data to build a new Sahm-type recession rule. The rule shows that the US economy may have entered a recession as early as April 2024. In August 2024, the probability that the US economy is in a recession is 48%."
description: "This note uses data on unemployment and job vacancies to build a real-time recession indicator. It shows that the US may be in recession since March 2024."
summary: "This note combines unemployment and job vacancy data to build a new Sahm-type recession rule. The rule shows that the US economy may have entered a recession as early as March 2024. In August 2024, the probability that the US economy is in a recession is 48%."
cover:
image: "/16s.png"
alt: "Recession indicator for the United States, 1960–2024"
Expand Down
3 changes: 1 addition & 2 deletions content/papers/3.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ aliases:
- /uploads/7/0/2/0/70200055/3a.pdf
- /uploads/7/0/2/0/70200055/3p.pdf
- /tags/tightness/
- /tags/keynesian-unemployment/
- /tags/demand-shocks/
tags: ["business cycles", "economic slack", "labor-market tightness", "matching model", "price rigidity", "product-market tightness", "unemployment", "wage rigidity"]
tags: ["business cycles", "economic slack", "Keynesian unemployment", "labor-market tightness", "matching model", "price rigidity", "product-market tightness", "wage rigidity"]
author: ["Pascal Michaillat","Emmanuel Saez"]
description: "This paper develops a model of unemployment fluctuations in which the labor and product markets have a matching structure. Published in QJE, 2015."
summary: "This paper develops a model of unemployment fluctuations. The innovation is to represent the labor and product markets with a matching structure. The model simultaneously features Keynesian unemployment, classical unemployment, and frictional unemployment."
Expand Down
2 changes: 1 addition & 1 deletion content/papers/7.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ aliases:
- /uploads/7/0/2/0/70200055/7p.pdf
- /uploads/7/0/2/0/70200055/7_slides.pdf
- /tags/monetary-multiplier/
tags: ["business cycles", "matching model", "monetary policy", "sufficient statistics", "unemployment gap", "wealth in the utility", "wealth tax", "zero lower bound"]
tags: ["business cycles", "Keynesian unemployment", "matching model", "monetary policy", "sufficient statistics", "wealth in the utility", "wealth tax", "zero lower bound"]
author: ["Pascal Michaillat","Emmanuel Saez"]
description: "This paper develops a policy-oriented business-cycle model with fluctuating unemployment and long zero-lower-bound episodes. Published in OEP, 2022."
summary: "This paper develops a policy-oriented business-cycle model with fluctuating unemployment and long zero-lower-bound episodes. The innovations are that producers and consumers meet through a matching function, and wealth enters the utility function."
Expand Down
10 changes: 5 additions & 5 deletions public/1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="index, follow">
<title>Do Matching Frictions Explain Unemployment? Not in Bad Times | Pascal Michaillat</title>
<meta name="keywords" content="business cycles, DMP model, frictional unemployment, job rationing, matching model, recessions, unemployment, wage rigidity">
<meta name="keywords" content="business cycles, DMP model, frictional unemployment, job rationing, matching model, recessions, rationing unemployment, wage rigidity">
<meta name="description" content="This paper proposes a matching model of the labor market with job rationing: unemployment persists even without matching frictions. Published in AER, 2012.">
<meta name="author" content="Pascal Michaillat">
<link rel="canonical" href="https://pascalmichaillat.org/1/">
Expand All @@ -24,7 +24,7 @@
<meta property="og:url" content="https://pascalmichaillat.org/1/" />
<meta property="og:image" content="https://pascalmichaillat.org/1s.png" /><meta property="article:section" content="papers" />
<meta property="article:published_time" content="2012-06-01T00:00:00+00:00" />
<meta property="article:modified_time" content="2024-08-21T00:00:00+00:00" />
<meta property="article:modified_time" content="2024-09-08T00:00:00+00:00" />

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="https://pascalmichaillat.org/1s.png" />
Expand Down Expand Up @@ -60,13 +60,13 @@
"name": "Do Matching Frictions Explain Unemployment? Not in Bad Times",
"description": "This paper proposes a matching model of the labor market with job rationing: unemployment persists even without matching frictions. Published in AER, 2012.",
"keywords": [
"business cycles", "DMP model", "frictional unemployment", "job rationing", "matching model", "recessions", "unemployment", "wage rigidity"
"business cycles", "DMP model", "frictional unemployment", "job rationing", "matching model", "recessions", "rationing unemployment", "wage rigidity"
],
"articleBody": " Paper Online appendix Code and data Abstract This paper proposes a search-and-matching model of unemployment in which jobs are rationed: the labor market does not clear in the absence of matching frictions. This job shortage arises in an economic equilibrium from the combination of some wage rigidity and diminishing marginal returns to labor. In recessions, job rationing is acute, driving the rise in unemployment, whereas matching frictions contribute little to unemployment. Intuitively in recessions, jobs are lacking, the labor market is slack, and recruiting is easy and inexpensive, so matching frictions do not matter much. In a calibrated model, cyclical fluctuations in the composition of unemployment are large.\nFigure 5: Rationing and frictional unemployment in the United States, 1964–2009 Citation Michaillat, Pascal. 2012. “Do Matching Frictions Explain Unemployment? Not in Bad Times.” American Economic Review 102 (4): 1721–1750. https://doi.org/10.1257/aer.102.4.1721 .\n@article{M12, author = {Pascal Michaillat}, year = {2012}, title = {Do Matching Frictions Explain Unemployment? Not in Bad Times}, journal = {American Economic Review}, volume = {102}, number = {4}, pages = {1721--1750}, url = {https://doi.org/10.1257/aer.102.4.1721}} Related material Presentation slides Nontechnical summary for CentrePiece (2012) PhD dissertation (2010) – My PhD dissertation at UC Berkeley is the basis for this paper. Chapter 2 in particular provides intuition for the main results of the paper based on an elementary, urn-ball model of the labor market. ",
"wordCount" : "224",
"inLanguage": "en",
"image":"https://pascalmichaillat.org/1s.png","datePublished": "2012-06-01T00:00:00Z",
"dateModified": "2024-08-21T00:00:00Z",
"dateModified": "2024-09-08T00:00:00Z",
"author":{
"@type": "Person",
"name": "Pascal Michaillat"
Expand Down Expand Up @@ -229,7 +229,7 @@ <h5 id="related-material">Related material</h5>
<li><a href="https://pascalmichaillat.org/tags/job-rationing/">job rationing</a></li>
<li><a href="https://pascalmichaillat.org/tags/matching-model/">matching model</a></li>
<li><a href="https://pascalmichaillat.org/tags/recessions/">recessions</a></li>
<li><a href="https://pascalmichaillat.org/tags/unemployment/">unemployment</a></li>
<li><a href="https://pascalmichaillat.org/tags/rationing-unemployment/">rationing unemployment</a></li>
<li><a href="https://pascalmichaillat.org/tags/wage-rigidity/">wage rigidity</a></li>
</ul>
</footer>
Expand Down
6 changes: 3 additions & 3 deletions public/13/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="index, follow">
<title>u* = √uv | Pascal Michaillat</title>
<meta name="keywords" content="Beveridge curve, business cycles, efficient unemployment rate, full employment, job vacancies, labor-market tightness, unemployment, unemployment gap">
<meta name="keywords" content="Beveridge curve, business cycles, DMP model, efficient unemployment rate, full employment, job vacancies, labor-market tightness, unemployment gap">
<meta name="description" content="This paper argues that in the United States the full-employment rate of unemployment (FERU) is the geometric average of the unemployment and vacancy rates.">
<meta name="author" content="Pascal Michaillat,&thinsp;Emmanuel Saez">
<link rel="canonical" href="https://pascalmichaillat.org/13/">
Expand Down Expand Up @@ -60,7 +60,7 @@
"name": "u* = √uv",
"description": "This paper argues that in the United States the full-employment rate of unemployment (FERU) is the geometric average of the unemployment and vacancy rates.",
"keywords": [
"Beveridge curve", "business cycles", "efficient unemployment rate", "full employment", "job vacancies", "labor-market tightness", "unemployment", "unemployment gap"
"Beveridge curve", "business cycles", "DMP model", "efficient unemployment rate", "full employment", "job vacancies", "labor-market tightness", "unemployment gap"
],
"articleBody": " Paper Code and data Abstract This paper aims to compute the unemployment rate $u^\\ast$ that is consistent with full employment in the United States. First, it argues that the most appropriate economic translation of the legal notion of full employment is social efficiency. Here efficiency requires to minimize the nonproductive use of labor—both unemployment and recruiting. The nonproductive use of labor is measured by the number of jobseekers and vacancies, $u + v$. Through the Beveridge curve, the numbers of vacancies and jobseekers are inversely related, $uv = \\text{constant}$. With such symmetry the labor market is efficient when there are as many jobseekers as vacancies ($u = v$), inefficiently tight when there are more vacancies than jobseekers ($v \u003e u$), and inefficiently slack when there are more jobseekers than vacancies ($u \u003e v$). Accordingly, the full-employment rate of unemployment (FERU) is the geometric average of the unemployment and vacancy rates: $u^\\ast = \\sqrt{uv}$. Between 1930 and 2023, the FERU averages 4.1% and is quite stable—it always remains between 2.5% and 6.6%.\nFigure 10A: Unemployment and vacancy rates in the United States, 1930–2023 Figure 11A: Full-employment rate of unemployment in the United States, 1930–2023 Citation Michaillat, Pascal, and Emmanuel Saez. 2024. “u* = √uv.” arXiv:2206.13012v3. https://doi.org/10.48550/arXiv.2206.13012 .\n@techreport{MS24, author = {Pascal Michaillat and Emmanuel Saez}, year = {2024}, title = {$u^* = \\sqrt{uv}$}, number = {arXiv:2206.13012v3}, url = {https://doi.org/10.48550/arXiv.2206.13012}} Related material Presentation slides ",
"wordCount" : "232",
Expand Down Expand Up @@ -222,11 +222,11 @@ <h5 id="related-material">Related material</h5>
<ul class="post-tags">
<li><a href="https://pascalmichaillat.org/tags/beveridge-curve/">Beveridge curve</a></li>
<li><a href="https://pascalmichaillat.org/tags/business-cycles/">business cycles</a></li>
<li><a href="https://pascalmichaillat.org/tags/dmp-model/">DMP model</a></li>
<li><a href="https://pascalmichaillat.org/tags/efficient-unemployment-rate/">efficient unemployment rate</a></li>
<li><a href="https://pascalmichaillat.org/tags/full-employment/">full employment</a></li>
<li><a href="https://pascalmichaillat.org/tags/job-vacancies/">job vacancies</a></li>
<li><a href="https://pascalmichaillat.org/tags/labor-market-tightness/">labor-market tightness</a></li>
<li><a href="https://pascalmichaillat.org/tags/unemployment/">unemployment</a></li>
<li><a href="https://pascalmichaillat.org/tags/unemployment-gap/">unemployment gap</a></li>
</ul>
</footer>
Expand Down
Loading

0 comments on commit 9cfe4c3

Please sign in to comment.