I'm trying to develop a CSS library where I style each element on an example HTML page.
However, I came across those two elements (<cite>
<blockquote>
) whose examples must be shared with since they are always used together. Here is the example code:
<blockquote>
<p>It was a bright cold day in April, and the clocks were striking thirteen.</p>
<footer>
First sentence in <cite><a href="http://www.george-orwell.org/1984/0.html"><i>Nineteen Eighty-Four</i></a></cite> by George Orwell (Part 1, Chapter 1).
</footer>
</blockquote>
(Code by MDN contributors, page link above.)
Thus, to demonstrate those two elements, I have to place examples into two directories which look like this:
+-- cite
+-- index.css
+-- index.html
+-- blockquote
+-- index.css
+-- index.html
Thus, I am generating duplicate code which I want to avoid since I will need to update those examples in the future when, let's say, MDN docs change. Of course, there's more to it.
I have researched the StackExchange network and surprised to not find a question asking about this, so I must have not used the correct keywords. Please suggest.
Since this question is not specific about HTML, I'm not appending any tags.
Please help me on what is the best way to make one file appear in two directories. If that is not possible, maybe limiting it to only files of some types would help.
If that is still not possible, I'd like to know the best way to handle this.
index.html
approach seems not sufficient for me due to the reliance on itself. It seems that MDN uses this method as well. I prefer a File System based approach though.cite
andblockquote
are not related at all and don't have to be used together. You can use cite also outside a blockquote context for any citation you want. The first sentence seems incomplete ("and it an"?). You don't explain why your directory structure has to look that way (many other ways are thinkable).